@spardutti/claude-skills 2.33.7 → 2.33.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.mjs +4 -2
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { confirm } from "@inquirer/prompts";
4
4
  import chalk from "chalk";
5
- import { readFileSync } from "node:fs";
5
+ import { readFileSync, existsSync } from "node:fs";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import { dirname, join } from "node:path";
8
8
  import { fetchSkills, fetchCommands, fetchAgents } from "../lib/github.mjs";
@@ -10,6 +10,7 @@ import { promptSkillSelection, promptCommandSelection, promptRemoval } from "../
10
10
  import { installSkills, installCommands, installRequiredAgents } from "../lib/install.mjs";
11
11
  import { makeLocalSource } from "../lib/local.mjs";
12
12
  import { runPostInstall } from "../lib/post-install.mjs";
13
+ import { setupHook } from "../lib/setup-hook.mjs";
13
14
  import {
14
15
  readManifest, writeManifest, computeOrphans, computeRemovals, scanInstalled, removeArtifacts,
15
16
  MANIFEST_FILE,
@@ -20,7 +21,7 @@ const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-
20
21
  const CWD = process.cwd();
21
22
 
22
23
  // `--sync`: re-install everything the manifest records (refreshed to the latest
23
- // catalog) and prune anything removed upstream — no interactive menu.
24
+ // catalog), refresh hooks the project already has, and prune anything removed upstream.
24
25
  async function runSync(manifest, catalog) {
25
26
  if (!manifest) {
26
27
  console.log(` ${chalk.yellow("Nothing to sync")} — no manifest in this project. Run without --sync first.\n`);
@@ -38,6 +39,7 @@ async function runSync(manifest, catalog) {
38
39
  if (skills.length > 0) { console.log(); await installSkills(skills); }
39
40
  if (commands.length > 0) { console.log(); await installCommands(commands); }
40
41
  const { installed } = await installRequiredAgents(commands, catalog.agents, CWD);
42
+ if (existsSync(join(CWD, ".claude", "hooks", "skill-gate.sh"))) { console.log(); await setupHook(CWD); }
41
43
 
42
44
  await writeManifest(CWD, {
43
45
  catalogVersion: pkg.version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "2.33.7",
3
+ "version": "2.33.8",
4
4
  "description": "Guardrails for Claude Code — best-practice skills, planning commands, and delivery gates.",
5
5
  "type": "module",
6
6
  "repository": {