{"id":"b0f8068a-489e-4abe-a6b3-e6368f16bd25","shortId":"gHMSjg","kind":"skill","title":"skill-scoped-permission-suggestions","tagline":"Suggest the narrowest permission scope by mapping a file path to its enclosing skill directory before prompting the user.","description":"# SKILL: Skill-Scoped Permission Suggestions\n**Domain:** safety-worktrees  \n**Trigger:** Apply this when Claude is asking for filesystem permission that can be narrowed to a single skill directory.\n**Source Pattern:** Distilled from reviewed repo-safety, packaging, and worktree-management patterns.\n\n## Core Method\nLeverage 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.\n\n## Key Rules\n- Normalize paths and compare lowercased versions so the detection works on both Windows and Unix filesystems.\n- Reject skill names that contain `.` or traversal segments before suggesting scopes to avoid leaking overlapping directories.\n- Always prefer `/.claude/skills/<name>/**` or `~/.claude/skills/<name>/**` over `/.claude/**` whenever the file sits inside a skill.\n- When normalization finds no skill directory, fall back to the default wider scope instead of fabricating a useless pattern.\n\n## Example Application\nWhen 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.\n\n## Anti-Patterns (What NOT to do)\n- Do not re-prompt with the same wide scope if the normalized path already resolves to a skill — that defeats the purpose of scoped access.\n- Don’t rely on raw casing or unnormalized separators; mismatched case would generate invalid patterns and quietly fall through.","tags":["skill","scoped","permission","suggestions","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents","context-engineering"],"capabilities":["skill","source-ychampion","skill-skill-scoped-permission-suggestions","topic-agent-skills","topic-ai-agents","topic-cli","topic-coding-agents","topic-context-engineering","topic-developer-tools","topic-mcp","topic-multi-agent","topic-terminal-ui"],"categories":["cskill-agents"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/ychampion/cskill-agents/skill-scoped-permission-suggestions","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add ychampion/cskill-agents","source_repo":"https://github.com/ychampion/cskill-agents","install_from":"skills.sh"}},"qualityScore":"0.467","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 34 github stars · SKILL.md body (1,763 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:56.571Z","embedding":null,"createdAt":"2026-04-18T22:21:19.420Z","updatedAt":"2026-04-22T00:56:56.571Z","lastSeenAt":"2026-04-22T00:56:56.571Z","tsv":"'/.claude':170 '/.claude/skills':97,166,168 '/.claude/skills/my-skill':215 'access':124,254 'alreadi':243 'alway':164 'anti':223 'anti-pattern':222 'appli':36 'applic':198 'ask':41 'avoid':160 'back':185 'blanket':123 'call':202 'case':260,265 'claud':39,128,220 'claude/skills':83 'compar':135 'comput':89 'contain':152 'core':68 'default':188 'defeat':249 'detect':76,140 'dialogu':113 'directori':20,53,163,183,221 'distil':56 'domain':31 'edit':119,200 'enclos':18 'entir':127,219 'exampl':197 'fabric':193 'fall':184,272 'file':14,80,173 'filesystem':43,147 'find':180 'focus':114 'generat':267 'gitignor':92 'gitignore-styl':91 'give':122 'global':86 'grant':214 'insid':82,175 'instead':191,216 'invalid':268 'keep':110 'key':130 'leak':161 'leverag':70 'lowercas':136 'manag':66 'map':12 'match':88 'method':69,204 'minim':103 'mismatch':264 'name':150 'narrow':48 'narrowest':8 'normal':132,179,241 'offer':99 'overlap':162 'packag':62 'parser':74 'path':15,73,133,242 'pattern':55,67,196,224,269 'permiss':4,9,29,44,107,112,208 'prefer':165 'prefix':94 'prevent':121 'project':84 'prompt':22,108,209,233 'purpos':251 'quiet':271 'raw':259 're':232 're-prompt':231 'recommend':213 'reject':148 'reli':257 'repo':60 'repo-safeti':59 'resid':81 'resolv':244 'review':58 'rule':131 'safeti':33,61 'safety-worktre':32 'scope':3,10,28,104,158,190,238,253 'segment':155 'separ':263 'show':206 'singl':51 'sit':174 'skill':2,19,25,27,52,72,117,149,177,182,247 'skill-scop':26 'skill-scoped-permission-suggest':1 'skill-skill-scoped-permission-suggestions' 'skills/my-skill/skill.md':201 'sourc':54 'source-ychampion' 'style':93 'suggest':5,6,30,157 'target':79 'topic-agent-skills' 'topic-ai-agents' 'topic-cli' 'topic-coding-agents' 'topic-context-engineering' 'topic-developer-tools' 'topic-mcp' 'topic-multi-agent' 'topic-terminal-ui' 'travers':154 'tree':129 'trigger':35 'unix':146 'unnorm':262 'useless':195 'user':24 'version':137 'whenev':171 'wide':237 'wider':189 'window':144 'work':141 'worktre':34,65 'worktree-manag':64 'would':266","prices":[{"id":"b29b1bac-2902-4207-9cdd-38a236e64bfd","listingId":"b0f8068a-489e-4abe-a6b3-e6368f16bd25","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"ychampion","category":"cskill-agents","install_from":"skills.sh"},"createdAt":"2026-04-18T22:21:19.420Z"}],"sources":[{"listingId":"b0f8068a-489e-4abe-a6b3-e6368f16bd25","source":"github","sourceId":"ychampion/cskill-agents/skill-scoped-permission-suggestions","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/skill-scoped-permission-suggestions","isPrimary":false,"firstSeenAt":"2026-04-18T22:21:19.420Z","lastSeenAt":"2026-04-22T00:56:56.571Z"}],"details":{"listingId":"b0f8068a-489e-4abe-a6b3-e6368f16bd25","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"skill-scoped-permission-suggestions","github":{"repo":"ychampion/cskill-agents","stars":34,"topics":["agent-skills","ai-agents","cli","coding-agents","context-engineering","developer-tools","mcp","multi-agent","terminal-ui"],"license":"mit","html_url":"https://github.com/ychampion/cskill-agents","pushed_at":"2026-04-04T14:13:23Z","description":"Agent skills for coding CLIs, multi-agent runtimes, context engines, MCP extensions, and terminal tooling. Instead of using claude code's source code, give your agent skills to create your own!","skill_md_sha":"287046e8f576b2184bf0c4439bd803dc4b4ae125","skill_md_path":"skills/skill-scoped-permission-suggestions/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/skill-scoped-permission-suggestions"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"skill-scoped-permission-suggestions","description":"Suggest the narrowest permission scope by mapping a file path to its enclosing skill directory before prompting the user."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/skill-scoped-permission-suggestions"},"updatedAt":"2026-04-22T00:56:56.571Z"}}