{"id":"605ecff8-79b9-4912-afa1-523d28176155","shortId":"ETNz6k","kind":"skill","title":"case-normalized-sensitive-path-guards","tagline":"Normalize filesystem paths and reject matches that try to spoof sensitive directories with mixed case or alternate separators.","description":"# SKILL: Case-Normalized Sensitive Path Guards\n**Domain:** sensitive-paths\n**Trigger:** Use whenever user input targets `.claude`, dotfiles, or other dangerous locations on case-insensitive filesystems such as Windows and macOS.\n**Source Pattern:** Distilled from reviewed permission, shell-safety, and worktree-management implementations.\n\n## Core Method\nNormalize every candidate path before comparing it against the sensitive-path denylist. That means lowercasing when the platform is case-insensitive and standardizing separators so `\\` and `/` are treated consistently. Compare the normalized path against intact dangerous filenames and directory suffixes, not against the raw user input. This closes bypasses that rely on mixed case or alternate separators to sneak past exact-match checks.\n\n## Key Rules\n- Always canonicalize separators (`/` vs `\\`) with an OS-aware helper so sensitive paths still match across shells and platforms.\n- Reject normalized paths that end with the dangerous list entries, even if the original case or separator mix was different.\n- Use this normalized result once per decision and reuse it for multiple rules (path scope detection, dangerous file detection, etc.) to avoid double work.\n- Keep the normalization utility deterministic; it should never return a trimmed path that differs semantically from the original.\n\n## Example Application\nBefore granting an edit permission to `~/.claude/settings.local.json`, normalize the path, detect that it still ends in `.claude/settings.local.json`, and route it through the strict config-file safety gate.\n\n## Anti-Patterns (What NOT to do)\n- Don’t compare raw paths directly; that misses exploits that only change letter casing or mix separators.\n- Avoid normalizing only once per session — do it every time a new path is evaluated so dynamic paths stay protected.","tags":["case","normalized","sensitive","path","guards","cskill","agents","ychampion","agent-skills","ai-agents","cli","coding-agents"],"capabilities":["skill","source-ychampion","skill-case-normalized-sensitive-path-guards","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/case-normalized-sensitive-path-guards","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,845 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-22T06:56:46.927Z","embedding":null,"createdAt":"2026-04-18T22:20:03.994Z","updatedAt":"2026-04-22T06:56:46.927Z","lastSeenAt":"2026-04-22T06:56:46.927Z","tsv":"'/.claude/settings.local.json':231 'across':157 'altern':23,131 'alway':142 'anti':254 'anti-pattern':253 'applic':224 'avoid':202,277 'awar':150 'bypass':124 'candid':76 'canonic':143 'case':2,21,27,50,95,129,175,273 'case-insensit':49,94 'case-norm':26 'case-normalized-sensitive-path-guard':1 'chang':271 'check':139 'claud':42 'claude/settings.local.json':241 'close':123 'compar':79,105,262 'config':249 'config-fil':248 'consist':104 'core':72 'danger':46,111,168,197 'decis':187 'denylist':86 'detect':196,199,235 'determinist':209 'differ':180,218 'direct':265 'directori':18,114 'distil':60 'domain':32 'dotfil':43 'doubl':203 'dynam':293 'edit':228 'end':165,239 'entri':170 'etc':200 'evalu':291 'even':171 'everi':75,285 'exact':137 'exact-match':136 'exampl':223 'exploit':268 'file':198,250 'filenam':112 'filesystem':8,52 'gate':252 'grant':226 'guard':6,31 'helper':151 'implement':71 'input':40,121 'insensit':51,96 'intact':110 'keep':205 'key':140 'letter':272 'list':169 'locat':47 'lowercas':89 'maco':57 'manag':70 'match':12,138,156 'mean':88 'method':73 'miss':267 'mix':20,128,178,275 'multipl':192 'never':212 'new':288 'normal':3,7,28,74,107,162,183,207,232,278 'origin':174,222 'os':149 'os-awar':148 'past':135 'path':5,9,30,35,77,85,108,154,163,194,216,234,264,289,294 'pattern':59,255 'per':186,281 'permiss':63,229 'platform':92,160 'protect':296 'raw':119,263 'reject':11,161 'reli':126 'result':184 'return':213 'reus':189 'review':62 'rout':243 'rule':141,193 'safeti':66,251 'scope':195 'semant':219 'sensit':4,17,29,34,84,153 'sensitive-path':33,83 'separ':24,99,132,144,177,276 'session':282 'shell':65,158 'shell-safeti':64 'skill':25 'skill-case-normalized-sensitive-path-guards' 'sneak':134 'sourc':58 'source-ychampion' 'spoof':16 'standard':98 'stay':295 'still':155,238 'strict':247 'suffix':115 'target':41 'time':286 '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' 'treat':103 'tri':14 'trigger':36 'trim':215 'use':37,181 'user':39,120 'util':208 'vs':145 'whenev':38 'window':55 'work':204 'worktre':69 'worktree-manag':68","prices":[{"id":"e0261458-55d2-4343-9d5f-43202d1b6d03","listingId":"605ecff8-79b9-4912-afa1-523d28176155","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:20:03.994Z"}],"sources":[{"listingId":"605ecff8-79b9-4912-afa1-523d28176155","source":"github","sourceId":"ychampion/cskill-agents/case-normalized-sensitive-path-guards","sourceUrl":"https://github.com/ychampion/cskill-agents/tree/main/skills/case-normalized-sensitive-path-guards","isPrimary":false,"firstSeenAt":"2026-04-18T22:20:03.994Z","lastSeenAt":"2026-04-22T06:56:46.927Z"}],"details":{"listingId":"605ecff8-79b9-4912-afa1-523d28176155","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"ychampion","slug":"case-normalized-sensitive-path-guards","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":"f6a40d14bc5e157bebd634ae326dd238df80fb67","skill_md_path":"skills/case-normalized-sensitive-path-guards/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/ychampion/cskill-agents/tree/main/skills/case-normalized-sensitive-path-guards"},"layout":"multi","source":"github","category":"cskill-agents","frontmatter":{"name":"case-normalized-sensitive-path-guards","description":"Normalize filesystem paths and reject matches that try to spoof sensitive directories with mixed case or alternate separators."},"skills_sh_url":"https://skills.sh/ychampion/cskill-agents/case-normalized-sensitive-path-guards"},"updatedAt":"2026-04-22T06:56:46.927Z"}}