Safeshell
Description
Safe shell operations with automatic checkpoints for AI agents. Let agents run freely. Everything is reversible.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI