wshuyi/skill-snapshot-skill

Claude Code skill for creating snapshots of skills with version control

License:MITLanguage:Shell130

Deep Analysis

Version control and snapshot management for Claude Code skills, using private GitHub repository for backup storage, supporting save, restore, list, compare

Core Features

Technical Implementation

Highlights
  • Fills gap - Skills themselves have no version control, this solves it
  • Private storage - auto-creates private repo to protect code
  • Smart skip - doesn't backup external installs, existing Git, large files
  • Incremental versions - v1, v2... clear version history
  • Chinese friendly - complete Chinese documentation
Use Cases
  • Create backup before skill modification
  • Rollback to old version when problems occur
  • Track skill evolution history
  • Compare current version with historical version differences
  • Identify which skills need backup
Limitations
  • Requires GitHub CLI installed and authenticated
  • Only supports macOS/Linux
  • Depends on Git
  • Private repo has storage limits
  • Symlinked skills not backed up
Tech Stack
GitHub CLIGitBashClaude Code Skills

Skill Snapshot

δΈ­ζ–‡ζ–‡ζ‘£

A Claude Code skill for creating snapshots of your skills with version control. Store backups in a private GitHub repository and restore any version when needed.

Features

  • Snapshot Management: Save, restore, list, and diff skill versions
  • Private GitHub Storage: Automatically creates and syncs to a private repository
  • Smart Scanning: Automatically identifies which skills need backup
  • Version Tags: Each snapshot is tagged (e.g., my-skill/v1, my-skill/v2)

Installation

Copy the skill-snapshot folder to your Claude Code skills directory:

cp -r skill-snapshot ~/.claude/skills/

Commands

Command Description
init Initialize private GitHub repository
scan Scan skills and identify which need backup
save <skill> [message] Save a snapshot
restore <skill> [version] Restore to a specific version
list [skill] List all snapshots
diff <skill> [version] Compare current with a snapshot

Usage Examples

First-time Setup

User: Initialize skill snapshots
Claude: [Executes init - creates private repo]

Save Before Modifying

User: Save my-skill snapshot before I modify it
Claude: [Executes save my-skill "pre-modification backup"]
Output: Saved snapshot my-skill/v1

Restore When Things Break

User: my-skill is broken, restore to v1
Claude: [Executes restore my-skill v1]
Output: Restored to my-skill/v1

Scan for Backup Candidates

User: Which skills need backup?
Claude: [Executes scan]
Output:
  [Needs Backup]
    βœ“ my-skill (5 files, 68K) [Has: my-skill/v1]
    β—‹ new-skill (3 files, 12K) [Not backed up]

  [Skipped]
    βœ— external-plugin - Symlink (externally installed)
    βœ— git-managed-skill - Has its own Git version control

Skip Rules

The scan command automatically skips:

Rule Reason
archive/ directory Archived skills
Symlinks Externally installed skills
skill-snapshot itself The snapshot tool itself
Contains .git/ Has its own version control
Contains .venv/ or node_modules/ Contains large dependencies
Size > 10MB Too large
Missing SKILL.md Not a valid skill

Requirements

  • GitHub CLI (gh) installed and authenticated
  • Git installed
  • macOS or Linux (uses bash scripts)

Storage Structure

~/.claude/skill-snapshots/          # Local repository
β”œβ”€β”€ my-skill/
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── scripts/
β”œβ”€β”€ another-skill/
β”‚   └── SKILL.md
└── README.md

GitHub Tags:
β”œβ”€β”€ my-skill/v1
β”œβ”€β”€ my-skill/v2
└── another-skill/v1

License

MIT License - see LICENSE