Safeshell — AI skill for Claude Code
Safe shell operations with automatic checkpoints for AI agents.
How to install Safeshell
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open qhkm/safeshell and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Safeshell does
Safe shell operations with automatic checkpoints for AI agents. Let agents run freely. Everything is reversible.
Alternatives in AI
- Oh My Claudecode — 32 specialized agents and 7 execution modes for Claude Code, with smart model routing and automatic paralleliz 10.9k ★
- Open Researcher — 🔥 Visual AI research assistant that displays real-time thinking, provides split-view analysis, and automatic 634 ★
- Openclaw Auto Dream — Automatic memory consolidation for OpenClaw agents — like sleep for your AI 545 ★
README
SafeShell
**Let agents run freely. Everything is reversible.**
Safe shell operations with automatic checkpoints for AI agents.
Install (One Command)
curl -fsSL https://raw.githubusercontent.com/qhkm/safeshell/main/install.sh | bash
Then restart your terminal. **That's it.**
What It Does
AI agents (Claude Code, Cursor, etc.) run shell commands. Sometimes they make mistakes:
rm -rf ./src # Oops, wrong directory
mv config.json old/ # Overwrote something important
**SafeShell catches these** by creating automatic backups before any destructive command:
rm important-file.txt
# [safeshell] Checkpoint created: 2024-12-12T143022-a1b2c3
# Oh no! Get it back:
safeshell rollback --last
# ✓ Rollback complete!
Commands
# Core
safeshell list # See all checkpoints
safeshell rollback --last # Undo the last destructive command
safeshell rollback # Rollback to specific checkpoint
safeshell status # Show stats
# Cleanup
safeshell clean # Remove old checkpoints (based on retention_days)
safeshell clean --keep 10 # Keep only 10 most recent
safeshell clean --older-than 3d # Remove checkpoints older than 3 days
# Configuration
safeshell config # View all settings
safeshell config get # Get a setting
safeshell config set # Change a setting
# Automatic cleanup
safeshell schedule # View schedule status
safeshell schedule enable # Enable daily auto-cleanup (midnight)
safeshell schedule enable --hourly --keep 20 # Hourly, keep 20
safeshell schedule disable # Disable auto-cleanup
# Setup
safeshell disable # Revert to normal binaries
safeshell enable # Re-enable SafeShell protection
safeshell upgrade # Upgrade to latest version
Why This Approach?
We evaluated several approaches to make AI agents safer:
| Approach | How It Works | Pros | Cons |
|---|
Related Skills
Claude Code Jev Router
Picks the model tier for a delegated Claude Code task before it spawns. Opt-in per repo, reversible in one com
Hyper Hand
Let AI agents (Claude Code, Codex, any MCP client) control Hyper-V Windows VMs: screenshots, mouse, keyboard,
HyperHand
Let AI agents (Claude Code, Codex, any MCP client) control Hyper-V Windows VMs: screenshots, mouse, keyboard,
Safety Guard
Enforces Law 3 (One Thing at a Time) of the 7 Laws of AI Agent Discipline by scoping edits to a directory and
Pii Guard
繁體中文(台灣)個人資料去識別化工具,讓業務文件可以安全地送進 AI 處理 / Reversible Traditional-Chinese (Taiwan) PII de-identification for LLM
Kimi Webbridge Lockdown
Lock Kimi WebBridge (or any debugger-based AI browser-control extension) out of your bank, broker and mailbox
Related Agents
Migration Agent
Creates safe, reversible database migrations with proper indexes, constraints, and zero-downtime strategies. U
Safe Build
Autonomous reversibility-first implementer — executes code/UI changes through the safe-build checkpoint loop (
Git Snapshots
Git and Snapshot system - full git abstraction plus automatic versioned snapshots. Use proactively when the us