diff --git a/docs/en-gb/projects/claude-code-skill-manager/index.mdx b/docs/en-gb/projects/claude-code-skill-manager/index.mdx new file mode 100644 index 0000000..7647880 --- /dev/null +++ b/docs/en-gb/projects/claude-code-skill-manager/index.mdx @@ -0,0 +1,216 @@ +--- +title: Claude Code Skills Manager +--- + +import { Tabs, Tab } from "@rspress/core/theme" + +## Introduction + +Claude Code Skills Manager (`ccsm`) is a CLI tool for discovering, installing, and managing Claude Code skills from Git-based marketplace repositories. It lets you register any public Git repository that exposes a `skills.json` manifest as a skill source, then search, install, update, and remove skills through a single command-line interface. + +Skills are deployed directly into Claude Code's own skills directory (`~/.claude/skills/`), where Claude Code picks them up automatically at startup. + +## Installation + + + + Download the latest binary for your platform from the [Releases page](https://onixbyte.dev/onixbyte/claude-code-skill-manager/releases). + + | Platform | Binary | + |----------|--------| + | Linux (amd64) | `ccsm-linux-amd64` | + | macOS (amd64) | `ccsm-darwin-amd64` | + | Windows (amd64) | `ccsm-windows-amd64.exe` | + + Place the binary somewhere on your `PATH` and rename it to `ccsm` (or `ccsm.exe` on Windows). + + + ```bash + git clone https://onixbyte.dev/onixbyte/claude-code-skill-manager.git + cd claude-code-skill-manager + cargo install --path . + ``` + Requires a Rust toolchain (install via [rustup.rs](https://rustup.rs)). + + + ```bash + git clone https://onixbyte.dev/onixbyte/claude-code-skill-manager.git + cd claude-code-skill-manager + cargo build --release + ``` + The binary will be at `target/release/ccsm` (or `ccsm.exe` on Windows). + + + +## Quick Start + +### Registering a marketplace + +A marketplace is any public Git repository with a `skills.json` manifest at its root. Register one with: + +```bash +ccsm marketplace add https://github.com/example/skills +``` + +CCSM fetches the manifest and caches it locally. You can register as many marketplaces as you need. + +### Browsing and installing skills + +```bash +# Search across all registered marketplaces +ccsm search + +# Search with a keyword filter +ccsm search git + +# Install a skill by name +ccsm install my-awesome-skill + +# If the same name exists in multiple marketplaces, disambiguate +ccsm install my-skill --marketplace my-marketplace +``` + +### Managing installed skills + +```bash +# List installed skills +ccsm list + +# Show details about an installed skill +ccsm info my-awesome-skill + +# Update all installed skills to their latest versions +ccsm update + +# Update a specific skill +ccsm update my-awesome-skill + +# Remove a skill +ccsm remove my-awesome-skill +``` + +### Marketplace management + +```bash +# List all registered marketplaces +ccsm marketplace list + +# Refresh cached manifests (all marketplaces) +ccsm marketplace update + +# Refresh a specific marketplace +ccsm marketplace update my-marketplace + +# Remove a marketplace +ccsm marketplace remove my-marketplace +``` + +### Install modes + +CCSM supports two deploy modes: + +| Mode | Behaviour | Use case | +|------|-----------|----------| +| `copy` (default) | Files are physically copied to `~/.claude/skills//` | Normal use — safe and self-contained | +| `link` | A symlink is created pointing to the local store | Skill development — changes to source files are picked up immediately | + +Set the default mode in your config, or override per install: + +```bash +ccsm install my-skill --link +``` + +## Creating Your Own Skill Marketplace + +A marketplace is simply a public Git repository containing a `skills.json` manifest. There is no server component, no authentication, and no API key — CCSM reads the manifest directly from the Git forge's raw file endpoint. + +### Marketplace repository structure + +``` +your-marketplace-repo/ + skills.json # Required: the manifest + README.md # Optional +``` + +### The `skills.json` manifest + +```json +{ + "name": "My Marketplace", + "version": "1.0.0", + "skills": [ + { + "name": "my-skill", + "description": "A short description shown in search results", + "repository": "https://github.com/user/skill-repo", + "branch": "main" + }, + { + "name": "another-skill", + "description": "A skill that lives in a monorepo subdirectory", + "repository": "https://github.com/user/monorepo", + "branch": "main", + "path": "skills/another-skill" + } + ] +} +``` + +**Top-level fields:** + +| Field | Required | Description | +|-------|----------|-------------| +| `name` | Yes | Marketplace display name | +| `version` | No | Arbitrary version string for your own tracking | +| `skills` | No | Array of skill entries (defaults to `[]`) | + +**Skill entry fields:** + +| Field | Required | Description | +|-------|----------|-------------| +| `name` | Yes | Unique skill identifier (used with `ccsm install `) | +| `description` | Yes | One-line summary shown in `ccsm search` output | +| `repository` | Yes | Public Git repository URL for the skill | +| `branch` | No | Git branch to install from (tries `main` first, falls back to `master`) | +| `path` | No | Subdirectory within the repository where the skill files live — enables monorepos hosting multiple skills | + +### How it works + +1. **Manifest fetching** — CCSM constructs a raw-file URL from the marketplace repository URL and fetches `skills.json` from either the `main` or `master` branch. This works with GitHub, Gitea, GitLab, and any Git forge that exposes raw file endpoints. + +2. **Skill downloading** — When a user installs a skill, CCSM downloads the skill repository archive (ZIP or tar.gz) from the Git forge, extracts it, and deploys the files to `~/.claude/skills//`. + +3. **Monorepo support** — If a skill entry specifies a `path`, CCSM navigates into that subdirectory after extraction before deploying, so a single repository can host multiple skills. + +### What goes in a skill repository + +Each skill repository is a standard Claude Code skill directory. At minimum it should contain a `SKILL.md` manifest file: + +``` +my-skill-repo/ + SKILL.md # Claude Code skill manifest + script.py # Supporting files + templates/ + template.txt +``` + +### Publishing steps + +1. Create a **public** Git repository with a `skills.json` at the root, following the format above. +2. Push it. +3. Anyone can register it with `ccsm marketplace add `. + +## How CCSM Stores Data + +| Path | Purpose | +|------|---------| +| `~/.claude/skills/` | Claude Code's skills directory — where skills are deployed | +| `~/.config/ccsm/config.json` | CCSM configuration (registered marketplaces, default mode) | +| `~/.config/ccsm/marketplaces/` | Cached marketplace manifests | +| `~/.config/ccsm/skills/` | Downloaded skill files (local store) | + +On Windows, `~/.config/` resolves to `C:\Users\\AppData\Roaming\`. + +## Licence + +Claude Code Skills Manager is open-source software released under the MIT Licence. diff --git a/docs/en-gb/projects/index.md b/docs/en-gb/projects/index.md index 8becd7e..97f170b 100644 --- a/docs/en-gb/projects/index.md +++ b/docs/en-gb/projects/index.md @@ -16,6 +16,10 @@ Explore open-source projects developed by OnixByte. - **[Helix](/projects/helix)** — An enterprise application template with Spring Boot backend and React frontend, featuring JWT auth, RBAC, user and organisation management, and Microsoft Entra ID integration. - **[Delta Force Guide](/projects/delta-force-guide)** — A web app providing a searchable library of firearm modification codes for the game _Delta Force: Havvk Ops_, with a React SPA and Spring Boot REST API. +## Developer Tools + +- **[Claude Code Skills Manager](/projects/claude-code-skill-manager)** — A CLI tool for discovering, installing, and managing Claude Code skills from Git-based marketplace repositories. + ## Vite Plugins - **[Port Checker](/projects/vite-plugins/port-checker)** — Warns when the Vite dev server listens on a browser-restricted port, preventing silent connection failures. diff --git a/docs/zh-hans/projects/claude-code-skill-manager/index.mdx b/docs/zh-hans/projects/claude-code-skill-manager/index.mdx new file mode 100644 index 0000000..3c59bca --- /dev/null +++ b/docs/zh-hans/projects/claude-code-skill-manager/index.mdx @@ -0,0 +1,216 @@ +--- +title: Claude Code Skills Manager +--- + +import { Tabs, Tab } from "@rspress/core/theme" + +## 介绍 + +Claude Code Skills Manager(`ccsm`)是一个 CLI 工具,用于从基于 Git 的 Marketplace 仓库中发现、安装和管理 Claude Code Skills。你可以将任何公开的、包含 `skills.json` 清单的 Git 仓库注册为 Skill 来源,然后通过统一的命令行界面搜索、安装、更新和移除 Skills。 + +Skills 会被直接部署到 Claude Code 自身的 Skills 目录(`~/.claude/skills/`)中,Claude Code 启动时会自动加载。 + +## 安装 + + + + 从 [Releases 页面](https://onixbyte.dev/onixbyte/claude-code-skill-manager/releases) 下载对应平台的最新二进制文件。 + + | 平台 | 二进制文件 | + |------|-----------| + | Linux (amd64) | `ccsm-linux-amd64` | + | macOS (amd64) | `ccsm-darwin-amd64` | + | Windows (amd64) | `ccsm-windows-amd64.exe` | + + 将二进制文件放到 `PATH` 中的某个目录,并重命名为 `ccsm`(Windows 上为 `ccsm.exe`)。 + + + ```bash + git clone https://onixbyte.dev/onixbyte/claude-code-skill-manager.git + cd claude-code-skill-manager + cargo install --path . + ``` + 需要 Rust 工具链(通过 [rustup.rs](https://rustup.rs) 安装)。 + + + ```bash + git clone https://onixbyte.dev/onixbyte/claude-code-skill-manager.git + cd claude-code-skill-manager + cargo build --release + ``` + 二进制文件位于 `target/release/ccsm`(Windows 上为 `ccsm.exe`)。 + + + +## 快速开始 + +### 注册 Marketplace + +Marketplace 可以是任何在根目录包含 `skills.json` 清单的公开 Git 仓库。通过以下命令注册: + +```bash +ccsm marketplace add https://github.com/example/skills +``` + +CCSM 会拉取清单并缓存到本地。你可以根据需要注册任意数量的 Marketplace。 + +### 浏览和安装 Skills + +```bash +# 搜索所有已注册 Marketplace 中的 Skills +ccsm search + +# 通过关键词过滤 +ccsm search git + +# 按名称安装 Skill +ccsm install my-awesome-skill + +# 如果多个 Marketplace 中存在同名 Skill,可指定 Marketplace +ccsm install my-skill --marketplace my-marketplace +``` + +### 管理已安装的 Skills + +```bash +# 列出已安装的 Skills +ccsm list + +# 查看已安装 Skill 的详细信息 +ccsm info my-awesome-skill + +# 更新所有已安装的 Skills 到最新版本 +ccsm update + +# 更新指定 Skill +ccsm update my-awesome-skill + +# 移除 Skill +ccsm remove my-awesome-skill +``` + +### Marketplace 管理 + +```bash +# 列出所有已注册的 Marketplace +ccsm marketplace list + +# 刷新缓存的清单(所有 Marketplace) +ccsm marketplace update + +# 刷新指定 Marketplace +ccsm marketplace update my-marketplace + +# 移除 Marketplace +ccsm marketplace remove my-marketplace +``` + +### 安装模式 + +CCSM 支持两种部署模式: + +| 模式 | 行为 | 适用场景 | +|------|------|----------| +| `copy`(默认) | 将文件物理复制到 `~/.claude/skills//` | 日常使用 — 安全且自包含 | +| `link` | 创建指向本地存储的符号链接 | Skill 开发 — 对源文件的修改会立即生效 | + +可在配置中设置默认模式,也可在安装时单独指定: + +```bash +ccsm install my-skill --link +``` + +## 自建 Skill Marketplace + +Marketplace 本质上就是一个包含 `skills.json` 清单的公开 Git 仓库。不需要服务器组件,不需要认证,也不需要 API 密钥 —— CCSM 会直接从 Git 托管平台的 raw 文件端点读取清单。 + +### Marketplace 仓库结构 + +``` +your-marketplace-repo/ + skills.json # 必需:清单文件 + README.md # 可选 +``` + +### `skills.json` 清单格式 + +```json +{ + "name": "My Marketplace", + "version": "1.0.0", + "skills": [ + { + "name": "my-skill", + "description": "在搜索结果中显示的简短描述", + "repository": "https://github.com/user/skill-repo", + "branch": "main" + }, + { + "name": "another-skill", + "description": "位于 monorepo 子目录中的 Skill", + "repository": "https://github.com/user/monorepo", + "branch": "main", + "path": "skills/another-skill" + } + ] +} +``` + +**顶层字段:** + +| 字段 | 必需 | 说明 | +|------|------|------| +| `name` | 是 | Marketplace 的显示名称 | +| `version` | 否 | 用于自行追踪的任意版本号 | +| `skills` | 否 | Skill 条目数组(默认为 `[]`) | + +**Skill 条目字段:** + +| 字段 | 必需 | 说明 | +|------|------|------| +| `name` | 是 | Skill 的唯一标识符(用于 `ccsm install `) | +| `description` | 是 | 在 `ccsm search` 输出中显示的一行摘要 | +| `repository` | 是 | Skill 的公开 Git 仓库 URL | +| `branch` | 否 | 安装时使用的 Git 分支(先尝试 `main`,再回退到 `master`) | +| `path` | 否 | 仓库中 Skill 文件所在的子目录 — 支持单个仓库托管多个 Skills | + +### 工作原理 + +1. **清单拉取** — CCSM 根据 Marketplace 仓库 URL 构建 raw 文件 URL,从 `main` 或 `master` 分支获取 `skills.json`。兼容 GitHub、Gitea、GitLab 以及任何提供 raw 文件端点的 Git 托管平台。 + +2. **Skill 下载** — 当用户安装 Skill 时,CCSM 从 Git 托管平台下载 Skill 仓库的归档文件(ZIP 或 tar.gz),解压后将文件部署到 `~/.claude/skills//`。 + +3. **Monorepo 支持** — 如果 Skill 条目指定了 `path`,CCSM 会在解压后进入该子目录再进行部署,从而支持单个仓库托管多个 Skills。 + +### Skill 仓库的内容 + +每个 Skill 仓库都是一个标准的 Claude Code Skill 目录。至少需要包含一个 `SKILL.md` 清单文件: + +``` +my-skill-repo/ + SKILL.md # Claude Code Skill 清单 + script.py # 辅助文件 + templates/ + template.txt +``` + +### 发布步骤 + +1. 创建一个**公开**的 Git 仓库,在根目录放置符合上述格式的 `skills.json`。 +2. 推送上去。 +3. 任何人都可以通过 `ccsm marketplace add ` 注册使用。 + +## 数据存储位置 + +| 路径 | 用途 | +|------|------| +| `~/.claude/skills/` | Claude Code 的 Skills 目录 —— Skills 的部署目标 | +| `~/.config/ccsm/config.json` | CCSM 配置文件(已注册的 Marketplace、默认模式) | +| `~/.config/ccsm/marketplaces/` | 缓存的 Marketplace 清单 | +| `~/.config/ccsm/skills/` | 下载的 Skill 文件(本地存储) | + +在 Windows 上,`~/.config/` 对应 `C:\Users\\AppData\Roaming\`。 + +## 许可证 + +Claude Code Skills Manager 是采用 MIT 许可证发布的开源软件。 diff --git a/docs/zh-hans/projects/index.md b/docs/zh-hans/projects/index.md index 97e0907..cf51b6b 100644 --- a/docs/zh-hans/projects/index.md +++ b/docs/zh-hans/projects/index.md @@ -16,6 +16,10 @@ title: 项目 - **[Helix](/projects/helix)** — 企业级应用模板,后端使用 Spring Boot,前端使用 React,集成 JWT 认证、RBAC 权限管理、用户与组织管理以及 Microsoft Entra ID 集成。 - **[Delta Force Guide](/projects/delta-force-guide)** — 为游戏《三角洲行动》提供可搜索枪械改装代码库的 Web 应用,包含 React 单页应用和 Spring Boot REST API。 +## 开发者工具 + +- **[Claude Code Skills Manager](/projects/claude-code-skill-manager)** — 用于从基于 Git 的 Marketplace 仓库中发现、安装和管理 Claude Code Skills 的 CLI 工具。 + ## Vite 插件 - **[Port Checker](/projects/vite-plugins/port-checker)** — 当 Vite 开发服务器监听浏览器限制的端口时发出警告,避免无响应的连接失败。