ychampion/cskill-agents/case-normalized-sensitive-path-guards
Claude Code and agent skill by ychampion/cskill-agents
- community
Checking that the SKILL.md file is still in the repository.
Normalize filesystem paths and reject matches that try to spoof sensitive directories with mixed case or alternate separators.
Install
npx vskill@latest install ychampion/cskill-agents/case-normalized-sensitive-path-guardsSKILL.md
SKILL: Case-Normalized Sensitive Path Guards
Domain: sensitive-paths Trigger: Use whenever user input targets .claude, dotfiles, or other dangerous locations on case-insensitive filesystems such as Windows and macOS. Source Pattern: Distilled from reviewed permission, shell-safety, and worktree-management implementations.
Core Method
Normalize 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.
Key Rules
- Always canonicalize separators (
/vs\) with an OS-aware helper so sensitive paths still match across shells and platforms. - Reject normalized paths that end with the dangerous list entries, even if the original case or separator mix was different.
- Use this normalized result once per decision and reuse it for multiple rules (path scope detection, dangerous file detection, etc.) to avoid double work.
- Keep the normalization utility deterministic; it should never return a trimmed path that differs semantically from the original.
Example Application
Before 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.
Anti-Patterns (What NOT to do)
- Don’t compare raw paths directly; that misses exploits that only change letter casing or mix separators.
- Avoid normalizing only once per session — do it every time a new path is evaluated so dynamic paths stay protected.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/case-normalized-sensitive-path-guards/SKILL.md
Popularity
- Repository stars
- 36
- Repository forks
- 7
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ychampion/cskill-agents/case-normalized-sensitive-path-guards)