
Safe Mode
Three protection levels for AI coding sessions: cautious mode warns before running dangerous commands like rm -rf or git push --force, lockdown mode restricts file edits to a single directory tree, and clear mode turns everything off. The PreToolUse hooks intercept Bash, Edit, and Write operations before they execute. I like the session-scoped lockdown for focused refactoring when you want Claude touching one module and nothing else. The pattern matching is solid, covering the usual footguns plus a few I hadn't thought about like piped curl to shell. This isn't a substitute for version control, but it's a reasonable guardrail when working in unfamiliar codebases or letting AI make sweeping changes.
- skills.sh installs
- 164
- GitHub stars
- 2.9K
- last updated
- Jun 8, 2026
Install
$ npx -y skills add rohitg00/pro-workflow --skill safe-mode --agent claude-codeInstalls into .claude/skills of the current project.
Files
Safe Mode
Three levels of protection against destructive operations during AI coding sessions.
Note: These hooks are skill-scoped — they only activate when you invoke
/safe-mode. The globalpermission-request.jshook in hooks.json provides always-on alerting for dangerous commands. Safe-mode adds opt-in blocking and directory restrictions on top of that.
Modes
Cautious Mode
/safe-mode cautious
Intercepts Bash commands before execution. Warns on dangerous patterns but does not block — the user decides.
Flagged patterns:
| Pattern | Risk |
|---|---|
rm -rf / rm -r | Recursive deletion |
DROP TABLE / DROP DATABASE | SQL data loss |
TRUNCATE | SQL data destruction |
git push --force / git push -f | Remote history rewrite |
git reset --hard | Local history loss |
git clean -f | Untracked file deletion |
git checkout . / git restore . | Discard all changes |
chmod 777 | World-writable permissions |
curl or wget piped to a shell | Piped remote execution |
> /dev/sda / dd if= | Disk-level operations |
:(){ :|:& };: | Fork bombs |
sudo rm | Elevated deletion |
Sponsors
Details
- Repository
- github.com/rohitg00/pro-workflow
- Category
- Automation & Workflows
- First seen
- Jun 11, 2026
More from rohitg00/pro-workflow
All 35- Plan Interrogate163
- Batch Orchestration162
- Bug Capture162
- Agent Teams161
- Permission Tuner161
- Sprint Status159
- Llm Gate158
- Wiki Query157
- Wiki Builder156
- Survey Generator154
- Wiki Research Loop154
- Wiki Viewer153
- Skill Optimizer140
- Module Map
- Token Efficiency239
- Pro Workflow213
- Wrap Up210
- Deslop203
- Context Optimizer196
- Learn Rule194
- Session Handoff191
- Smart Commit190
- Compact Guard189
- Insights186