qhkm

Safeshell — AI skill for Claude Code

AI community

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