@zgeoff/skill-gate 0.1.1 → 0.2.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/skill-gate",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "A Claude Code PreToolUse hook that denies an edit until the session loads the skills the path needs, and warns on a Bash command that writes a gated path",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -35,7 +35,7 @@
35
35
  "typecheck": "tsc"
36
36
  },
37
37
  "dependencies": {
38
- "@zgeoff/std": "0.1.1",
38
+ "@zgeoff/std": "0.2.0",
39
39
  "ts-pattern": "5.9.0"
40
40
  },
41
41
  "devDependencies": {
@@ -55,7 +55,7 @@ export async function runSkillGate(): Promise<never> {
55
55
  process.exit(0);
56
56
  }
57
57
 
58
- const availableSkills = await collectAvailableSkills(path.join(projectDir, '.claude', 'skills'));
58
+ const availableSkills = await readAvailableSkills(path.join(projectDir, '.claude', 'skills'));
59
59
  const transcript = await readTranscript(resolveSessionTranscriptPath(input));
60
60
 
61
61
  const loaded = collectLoadedSkills(transcript);
@@ -142,7 +142,7 @@ async function checkBashCommand(check: BashCheck): Promise<void> {
142
142
  process.exit(0);
143
143
  }
144
144
 
145
- const skills = await collectAvailableSkills(path.join(check.projectDir, '.claude', 'skills'));
145
+ const skills = await readAvailableSkills(path.join(check.projectDir, '.claude', 'skills'));
146
146
  const sessionTranscript = await readTranscript(resolveSessionTranscriptPath(check.hookInput));
147
147
 
148
148
  const sessionLoads = collectLoadedSkills(sessionTranscript);
@@ -183,7 +183,7 @@ function toProjectPath(projectDir: string, absolute: string): string {
183
183
  return path.relative(projectDir, absolute).split(path.sep).join('/');
184
184
  }
185
185
 
186
- async function collectAvailableSkills(skillsDir: string): Promise<readonly string[]> {
186
+ async function readAvailableSkills(skillsDir: string): Promise<readonly string[]> {
187
187
  const skills: string[] = [];
188
188
 
189
189
  const scan = new Bun.Glob('*/SKILL.md').scan({ cwd: skillsDir, followSymlinks: true });