WS

wshuyi/skill-snapshot-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

29 stars 质量 48 趋势 11MIT

Claude Code 技能用于创建带有版本控制的技能快照

概览

一个Claude代码技能,用于创建带有版本控制的技能快照。将备份存储在私有的GitHub仓库中,必要时恢复任何版本。 - : 保存、恢复、列出和不同技能版本 - : 自动创建并同步到私有仓库 - : 自动识别需要备份的技能 - : 每个快照都被标记(例如 my-skill/v1,my-skill/v2) 将技能快照文件夹复制到你的Claude Code技能目录中: - GitHub CLI(gh)已安装并认证- Git 安装 - macOS 或 Linux(使用 bash 脚本)

概述(AI 翻译)

中文文档

一个Claude代码技能,用于创建带有版本控制的技能快照。将备份存储在私有的GitHub仓库中,必要时恢复任何版本。

特色

  • 快照管理:保存、恢复、列出和差异技能版本
  • 私有 GitHub 存储:自动创建并同步到私有仓库
  • 智能扫描:自动识别需要备份的技能
  • 版本标签:每个快照都被标记(例如 my-skill/v1、my-skill/v2)

安装

将skill-snapshot文件夹复制到你的Claude Code技能目录:

命令

指挥 描述
init 初始化私有 GitHub 仓库
scan 扫描技能并识别需要支援的技能
save [message] 保存快照
restore [version] 恢复到特定版本
list [skill] 列出所有快照
diff [version] 将电流与快照进行比较

使用示例

首次布置

修改前先保存

当东西破碎时还原

扫描备选候选人

跳过规则

scan 命令会自动跳过:

规则 理由

本页由 AI 翻译,技术细节请以原文为准。

README

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 [message] Save a snapshot
restore [version] Restore to a specific version
list [skill] List all snapshots
diff [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

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add wshuyi/skill-snapshot-skill
新手?先看 mcpskill.org 教程 →