ychampion/cskill-agents/dangerous-config-file-protection
Claude Code and agent skill by ychampion/cskill-agents
- community
Checking that the SKILL.md file is still in the repository.
Keep writes out of sensitive dotfiles and claude folders by checking canonicalized basenames before granting permission.
Install
npx vskill@latest install ychampion/cskill-agents/dangerous-config-file-protectionSKILL.md
SKILL: Dangerous Config File Protection
Domain: sensitive-paths Trigger: Guard every filesystem modification that touches .git, .claude, .gitconfig, or other config-critical paths before running the tool. Source Pattern: Distilled from reviewed permission, shell-safety, and worktree-management implementations.
Core Method
Maintain explicit lists of filenames and directories that should never be touched automatically. Before allowing any tool action, expand the requested path, normalize casing, and compare the basename or enclosing directory against those lists. If a match appears, decline the action or require a human permission grant with the narrowest scope possible.
Key Rules
- Normalize to lowercase and POSIX separators before comparing, matching Windows/macOS semantics.
- Check both file-level names (e.g.,
.gitconfig) and directories (e.g.,.git,.claude,.vscode) to block entire trees that hold secrets or tooling. - Prefer generating narrow permission scopes when the path lives inside a controlled skill directory; otherwise, deny outright.
- Log each blocked attempt with a sanitized path so operators can trace why the denial happened.
Example Application
When the user asks to edit ~/.claude/skills/confidential-skill/SKILL.md, detect that the path enters .claude, normalize it, and refuse the automatic edit while suggesting a narrower permission grant instead of broad config-directory access.
Anti-Patterns (What NOT to do)
- Don’t rely on loose wildcard matching that can accidentally miss or overmatch sensitive config paths.
- Don’t skip casing normalization; mixed-case variants of the same protected path must behave the same.
Security
- Security scanPassed, 95 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/dangerous-config-file-protection/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/dangerous-config-file-protection)