Fix: allow skill's bundled node helpers under strict-permission harnesses (#301) (#310)

The skill declared only `Bash(npx impeccable *)` in allowed-tools, but Setup and the no-arg menu shell out to `node {{scripts_path}}/*.mjs`. Under a default-deny Claude Code allowlist those calls are blocked, so Setup fails on context.mjs.

Add a provider-aware `Bash(node {{scripts_path}}/*)` entry and resolve {{scripts_path}} in the frontmatter (the build previously substituted it only in the body). Provider-aware rather than the hardcoded `.claude/...` path the issue suggested, since five providers honor allowed-tools with different script dirs.
This commit is contained in:
Abdul Wahab
2026-06-25 17:16:32 -07:00
committed by GitHub
parent d2ab4ddee6
commit b7d2ad5589
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ export function createTransformer(config) {
skillBody = skillBody.replace(/\{\{scripts_path\}\}/g, scriptsPath);
if (bodyTransform) skillBody = bodyTransform(skillBody, skill);
const content = `${frontmatter}\n\n${skillBody}`;
const content = `${frontmatter}\n\n${skillBody}`.replace(/\{\{scripts_path\}\}/g, scriptsPath);
writeFile(path.join(skillDir, 'SKILL.md'), content);
if (writeOpenAIMetadata) {
+1
View File
@@ -5,6 +5,7 @@ argument-hint: "[{{command_hint}}] [target]"
user-invocable: true
allowed-tools:
- Bash(npx impeccable *)
- Bash(node {{scripts_path}}/*)
license: Apache 2.0
---