Skill scoped permission suggestions

From ychampion/cskill-agents · View interactive version

Skill scoped permission suggestions is an AI agent skill from the GitHub repository ychampion/cskill-agents. Suggest the narrowest permission scope by mapping a file path to its enclosing skill directory before prompting the user.

How to use this skill

Skill file

SKILL: Skill-Scoped Permission Suggestions

Domain: safety-worktrees

Trigger: Apply this when Claude is asking for filesystem permission that can be narrowed to a single skill directory.

Source Pattern: Distilled from reviewed repo-safety, packaging, and worktree-management patterns.

Core Method

Leverage the skill path parser to detect when a target file resides inside .claude/skills/<skill-name> (project or global). Once matched, compute a gitignore-style prefix such as /.claude/skills/<skill-name>/** and offer that as the minimal scope for the permission prompt. This keeps the permission dialogue focused on the skill under edit and prevents giving blanket access to the entire .claude tree.

Key Rules

Example Application

When editing skills/my-skill/SKILL.md, call this method before showing the permission prompt so you can recommend granting /.claude/skills/my-skill/** instead of the entire .claude directory.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.