Forge-core RescopePrompt
Tighten a prompt-shaped document's tool scope to the narrowest set it actually uses. USE WHEN an adopted or authored skill declares allowed-tools: '*', omits the frontmatter field entirely, or grants tools the workflow never invokes.
install
source · Clone the upstream repo
git clone https://github.com/N4M3Z/forge-core
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/N4M3Z/forge-core "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/RescopePrompt" ~/.claude/skills/n4m3z-forge-core-rescopeprompt && rm -rf "$T"
manifest:
skills/RescopePrompt/SKILL.mdsource content
RescopePrompt
Narrow a skill's
allowed-tools frontmatter to the tools the workflow actually invokes. Implicit "*" and undeclared scope are treated as bugs. Referenced by ForgeAdopt as the rescope transform.
What to narrow
— treat as declaration of intent, not trust; enumerate explicitlyallowed-tools: "*"- Missing
— add the field with the narrowest set the skill needsallowed-tools - Overbroad grants (for example
when the skill only reads files) — stripBash - Comma-separated strings with trailing whitespace, duplicates, or inconsistent casing — normalize
Procedure
- Read the skill body end-to-end.
- Identify every tool the workflow invokes. Watch for indirect invocation (a Bash command calling a tool the skill uses).
- Start from zero. Add only the tools the workflow actually uses.
- Prefer read-only scope (
,Read
,Grep
) over write or exec when the workflow allows.Glob - If the skill invokes shell commands, grant
but note the expected command family in a comment or the description.Bash - Write the result as a comma-separated list in the frontmatter.
Evidence required per tool
| Tool | Grant only if the skill… |
|---|---|
| Read | reads a file |
| Grep | searches file contents |
| Glob | enumerates file paths |
| Edit | modifies an existing file |
| Write | creates or overwrites a file |
| Bash | invokes shell commands |
| Skill | composes other skills as build steps |
| WebFetch | retrieves remote content over HTTP |
Constraints
- Never grant
on speculation — find the command the skill runsBash
is never an acceptable final value; if the skill genuinely needs everything, the skill is doing too much*- Do not grant tools to "future-proof" the skill — add them when the workflow adds them
- Document unusual grants in the skill body when the reason isn't obvious from the workflow