skill-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Manager

Skill Manager

管理 Claude Code、Codex 和 OpenClaw Skills/Commands 的安装、同步、卸载和列表查看。
Manage installation, synchronization, uninstallation, and listing of Claude Code, Codex, and OpenClaw Skills/Commands.

前置条件

Prerequisites

  • Git 已安装(用于 GitHub 克隆)
  • 有写入目标 Agent 配置目录的权限,例如
    .codex/skills/
    .claude/skills/
    .openclaw/skills/
  • Git is installed (for GitHub cloning)
  • Have write permissions to the target Agent configuration directories, such as
    .codex/skills/
    ,
    .claude/skills/
    ,
    .openclaw/skills/

安装行为

Installation Behavior

  • 本地路径 (Skill) → 符号链接(保持与源同步)
  • 本地路径 (Command) → 符号链接(保持与源同步)
  • 本地集合目录 → 批量符号链接
  • GitHub 仓库/子目录 → 克隆后删除 .git(静态复制)+ 自动安全检查
  • Local Path (Skill) → Symbolic link (keeps in sync with source)
  • Local Path (Command) → Symbolic link (keeps in sync with source)
  • Local Collection Directory → Batch symbolic links
  • GitHub Repository/Subdirectory → Clone then delete .git (static copy) + automatic security check

目标目录识别

Target Directory Identification

执行安装、列表、卸载、更新时,脚本会从调用目录向上查找 Agent 配置目录:
  • /Users/maoking/.codex
    或其子目录调用时,目标为
    /Users/maoking/.codex/skills/
  • 在项目根目录包含
    .codex/
    .claude/
    .openclaw/
    时,目标为对应配置目录下的
    skills/
    commands/
  • .codex/skills/
    .claude/skills/
    .openclaw/skills/
    内调用时,目标为其上级配置目录
  • 如需显式指定目标根目录,可使用
    --target
    参数或设置
    SKILL_MANAGER_TARGET_DIR=/path/to/.codex
  • 从全局配置目录(如
    ~/.claude
    )调用时,会尝试通过 git 自动发现项目本地目录,并打印告警
When performing installation, listing, uninstallation, or update operations, the script will search upward from the calling directory for Agent configuration directories:
  • When called in
    /Users/maoking/.codex
    or its subdirectories, the target is
    /Users/maoking/.codex/skills/
  • When the project root directory contains
    .codex/
    ,
    .claude/
    , or
    .openclaw/
    , the target is the
    skills/
    or
    commands/
    under the corresponding configuration directory
  • When called within
    .codex/skills/
    ,
    .claude/skills/
    , or
    .openclaw/skills/
    , the target is its parent configuration directory
  • To explicitly specify the target root directory, use the
    --target
    parameter or set
    SKILL_MANAGER_TARGET_DIR=/path/to/.codex
  • When called from a global configuration directory (such as
    ~/.claude
    ), it will attempt to automatically discover the local project directory via git and print a warning

支持的来源类型

Supported Source Types

本地路径(符号链接)

Local Path (Symbolic Link)

bash
undefined
bash
undefined

单个 skill 目录

Single skill directory

skill-manager install ~/skills/pdf-tool
skill-manager install ~/skills/pdf-tool

单个 command 文件

Single command file

skill-manager install ~/commands/deepresearch.md
skill-manager install ~/commands/deepresearch.md

包含多个 skills 的目录(批量安装)

Directory containing multiple skills (batch installation)

skill-manager install ~/skills/external-skills/
skill-manager install ~/skills/external-skills/

包含多个 commands 的目录(批量安装)

Directory containing multiple commands (batch installation)

skill-manager install ~/commands/
undefined
skill-manager install ~/commands/
undefined

GitHub 仓库根目录(克隆,删除 .git)

GitHub Repository Root (Clone, delete .git)

bash
skill-manager install https://github.com/owner/skill-repo
skill-manager install owner/skill-repo
bash
skill-manager install https://github.com/owner/skill-repo
skill-manager install owner/skill-repo

GitHub 子目录(稀疏克隆,删除 .git)

GitHub Subdirectory (Sparse Clone, delete .git)

bash
undefined
bash
undefined

完整 URL 到子目录

Full URL to subdirectory

简写格式:owner/repo/branch/path/to/skills-directory

Short format: owner/repo/branch/path/to/skills-directory

skill-manager install jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community
undefined
skill-manager install jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community
undefined

工作流程

Workflow

安装

Installation

  1. 检测来源类型 - 自动识别本地路径、GitHub 仓库或子目录
  2. 检测 Item 类型 - 自动识别是 Skill(目录)还是 Command(.md 文件)
  3. 检测是否为集合目录 - 检查目录是否包含多个 items
  4. 批量处理模式 - 如果是集合目录,遍历所有 items 并分别安装
  5. 本地来源 - 创建符号链接,保持与源同步更新
  6. GitHub 仓库根 - 使用
    git clone --depth 1
    浅克隆
  7. GitHub 子目录 - 使用稀疏克隆(sparse checkout)仅获取指定目录
  8. 冲突处理 - 已存在时先备份为
    .backup
    ,然后安装新版本
  1. Detect Source Type - Automatically identify local path, GitHub repository, or subdirectory
  2. Detect Item Type - Automatically identify whether it is a Skill (directory) or Command (.md file)
  3. Detect Collection Directory - Check if the directory contains multiple items
  4. Batch Processing Mode - If it is a collection directory, traverse all items and install them separately
  5. Local Source - Create symbolic link to keep in sync with source updates
  6. GitHub Repository Root - Use
    git clone --depth 1
    for shallow clone
  7. GitHub Subdirectory - Use sparse checkout to only fetch the specified directory
  8. Conflict Handling - If already exists, back up as
    .backup
    first, then install the new version

安装命令

Installation Commands

bash
undefined
bash
undefined

使用脚本安装

Install using script

scripts/install.sh [--target <dir>] <source>
scripts/install.sh [--target <dir>] <source>

示例

Examples

scripts/install.sh ~/dev/my-skills/pdf-tool scripts/install.sh ~/dev/my-commands/deepresearch.md scripts/install.sh ~/dev/my-skills/ scripts/install.sh ~/dev/my-commands/ scripts/install.sh https://github.com/anthropics/claude-code scripts/install.sh jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community
scripts/install.sh ~/dev/my-skills/pdf-tool scripts/install.sh ~/dev/my-commands/deepresearch.md scripts/install.sh ~/dev/my-skills/ scripts/install.sh ~/dev/my-commands/ scripts/install.sh https://github.com/anthropics/claude-code scripts/install.sh jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community

显式指定目标(从非项目目录调用时使用)

Explicitly specify target (use when calling from non-project directory)

scripts/install.sh --target /path/to/project/.claude ~/dev/my-skills/pdf-tool
undefined
scripts/install.sh --target /path/to/project/.claude ~/dev/my-skills/pdf-tool
undefined

列出已安装 Items

List Installed Items

bash
scripts/list.sh
显示当前识别到的 Agent 配置目录下所有已安装的 items 及其类型(符号链接或克隆)。
bash
scripts/list.sh
Displays all installed items under the currently identified Agent configuration directory and their types (symbolic link or cloned).

卸载

Uninstallation

bash
scripts/remove.sh <name>
删除指定的 skill 或 command(自动识别类型)。
bash
scripts/remove.sh <name>
Deletes the specified skill or command (automatically identifies type).

更新

Update

bash
scripts/update.sh [name]
  • 不指定参数:更新所有通过 git 克隆的 skills
  • 指定名称:更新指定的 skill
  • 注意:符号链接的 items 会自动与源同步,无需手动更新
bash
scripts/update.sh [name]
  • No parameter specified: Update all skills cloned via git
  • Specify name: Update the specified skill
  • Note: Symbolically linked items automatically sync with the source, no manual update required

检查更新

Check for Updates

bash
scripts/check.sh
检查所有远程安装 Skills 的更新状态,检测策略:
  • 有版本号 → 直接比较本地与远程版本号
  • 无版本号 → 检查远程仓库最近 Commits,与安装时间对比
  • 子目录安装 → 精确检查 Skill 所在子目录的 Commits
显示:
  • 📦 有可用更新的 Skills
  • ✅ 已是最新版本的 Skills
  • ⚠️ 检查失败的 Skills(无来源信息等)
每次安装和更新都会自动记录到
assets/skill-registry.json
bash
scripts/check.sh
Checks the update status of all remotely installed Skills. Detection strategies:
  • With version number → Directly compare local and remote version numbers
  • Without version number → Check recent Commits in remote repository and compare with installation time
  • Subdirectory installation → Precisely check Commits of the subdirectory where the Skill is located
Displays:
  • 📦 Skills with available updates
  • ✅ Skills already at latest version
  • ⚠️ Skills with failed checks (no source information, etc.)
Each installation and update is automatically recorded in
assets/skill-registry.json
.

查看已安装记录

View Installation Records

bash
python3 scripts/record.py list
显示所有已安装 Skills 的详细记录,包括:
  • 安装时间
  • 来源 URL
  • 当前版本
  • 描述信息
bash
python3 scripts/record.py list
Displays detailed records of all installed Skills, including:
  • Installation time
  • Source URL
  • Current version
  • Description information

识别规则

Identification Rules

Skill 目录规则

Skill Directory Rules

一个目录被视为有效的 skill 目录,如果它包含:
  • SKILL.md
    文件(标准 skill)
  • skill.md
    文件(变体)
  • .codex
    /
    .claude
    /
    .openclaw
    子目录
A directory is considered a valid skill directory if it contains:
  • SKILL.md
    file (standard skill)
  • Or
    skill.md
    file (variant)
  • Or
    .codex
    /
    .claude
    /
    .openclaw
    subdirectory

Command 文件规则

Command File Rules

  • 文件扩展名为
    .md
  • File extension is
    .md

集合目录规则

Collection Directory Rules

  • Skills 集合:包含多个 skill 子目录
  • Commands 集合:包含多个
    .md
    文件
  • Skills Collection: Contains multiple skill subdirectories
  • Commands Collection: Contains multiple
    .md
    files

使用示例

Usage Examples

bash
undefined
bash
undefined

========== 安装 ==========

========== Installation ==========

安装本地单个 skill

Install local single skill

skill-manager install ~/dev/my-skills/pdf-tool
skill-manager install ~/dev/my-skills/pdf-tool

批量安装本地目录下的所有 skills

Batch install all skills under local directory

skill-manager install ~/dev/my-skills/ skill-manager install ../other-project/.claude/skills/
skill-manager install ~/dev/my-skills/ skill-manager install ../other-project/.claude/skills/

在 Codex 全局目录中调用时,安装到 ~/.codex/skills/

When called in Codex global directory, install to ~/.codex/skills/

cd /Users/maoking/.codex skill-manager install ~/dev/my-skills/pdf-tool
cd /Users/maoking/.codex skill-manager install ~/dev/my-skills/pdf-tool

从全局目录调用但安装到指定项目(使用 --target 避免装错位置)

Call from global directory but install to specified project (use --target to avoid wrong location)

skill-manager install --target /path/to/project/.claude ~/dev/my-skills/pdf-tool
skill-manager install --target /path/to/project/.claude ~/dev/my-skills/pdf-tool

从 GitHub 仓库根目录安装

Install from GitHub repository root

skill-manager install https://github.com/anthropics/claude-code skill-manager install anthropics/claude-code
skill-manager install https://github.com/anthropics/claude-code skill-manager install anthropics/claude-code

从 GitHub 子目录安装

Install from GitHub subdirectory

skill-manager install https://github.com/jgtolentino/insightpulse-odoo/tree/main/docs/claude-code-skills/community skill-manager install jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community
skill-manager install https://github.com/jgtolentino/insightpulse-odoo/tree/main/docs/claude-code-skills/community skill-manager install jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community

========== 查看与管理 ==========

========== View & Management ==========

列出已安装的 skills

List installed skills

skill-manager list
skill-manager list

卸载 skill

Uninstall skill

skill-manager remove pdf-tool
skill-manager remove pdf-tool

========== 更新与检查 ==========

========== Update & Check ==========

检查所有 skills 的更新

Check updates for all skills

skill-manager check
skill-manager check

更新所有 git 克隆的 skills

Update all git-cloned skills

skill-manager update
skill-manager update

更新指定 skill

Update specified skill

skill-manager update claude-code
skill-manager update claude-code

查看安装记录

View installation records

python3 scripts/record.py list
undefined
python3 scripts/record.py list
undefined

安全检查

Security Check

从 GitHub 安装 skill 时,会自动进行安全检查(本地安装不检查)。
When installing skills from GitHub, automatic security checks are performed (no checks for local installations).

检测内容

Detection Content

类别说明
危险代码模式命令执行、敏感文件访问、数据外泄、代码混淆、权限提升等
Skill 特有风险安装钩子、MCP 服务器配置等
提示词安全提示注入、数据收集指令、执行指令、欺骗性描述等
硬编码凭证API Key、Token、密码等敏感信息
CategoryDescription
Dangerous Code PatternsCommand execution, sensitive file access, data leakage, code obfuscation, privilege escalation, etc.
Skill-Specific RisksInstallation hooks, MCP server configuration, etc.
Prompt SecurityPrompt injection, data collection instructions, execution instructions, deceptive descriptions, etc.
Hardcoded CredentialsAPI Key, Token, password and other sensitive information

风险等级

Risk Levels

  • 🔴 CRITICAL - 极高风险,强烈建议不要使用
  • 🟠 HIGH - 高风险,需审计后使用
  • 🟡 MEDIUM - 中等风险,使用前请检查
  • 🟢 LOW - 低风险,建议定期检查
  • NONE - 未发现明显风险
  • 🔴 CRITICAL - Extremely high risk, strongly recommended not to use
  • 🟠 HIGH - High risk, use only after auditing
  • 🟡 MEDIUM - Medium risk, check before use
  • 🟢 LOW - Low risk, recommend regular checks
  • NONE - No obvious risks detected

注意事项

Notes

  • 安全检查需要 Python 3 环境,无 Python 时静默跳过
  • 检查发现问题不会阻止安装,仅输出警告报告
  • 建议在安装外部 skill 后仔细阅读安全报告
  • Security check requires Python 3 environment, silently skips if no Python is available
  • Detected issues will not block installation, only output warning reports
  • It is recommended to carefully read the security report after installing external skills

注册表 Schema

Registry Schema

每个已安装的 Skill 记录在
assets/skill-registry.json
中,包含以下字段:
字段说明
name
Skill 目录名
source
原始安装来源(本地路径或 GitHub URL)
install_type
"local"
(符号链接)或
"remote"
(GitHub 克隆)
installed_at
初始安装时间(ISO 8601)
last_updated
最后版本更新时间
last_check_at
最后一次更新检查时间(仅远程)
installed_version
安装时的版本号
current_version
当前已安装版本
latest_version
远程最新版本
install_commit
安装时的 Git commit hash(仅远程)
install_branch
安装时使用的 Git branch(仅远程)
remote_url
完整 GitHub URL,含子目录路径(仅远程)
remote_subpath
Skill 在仓库中的子路径(仅子目录安装)
description
Skill 描述
homepage
主页 URL
Each installed Skill is recorded in
assets/skill-registry.json
, containing the following fields:
FieldDescription
name
Skill directory name
source
Original installation source (local path or GitHub URL)
install_type
"local"
(symbolic link) or
"remote"
(GitHub clone)
installed_at
Initial installation time (ISO 8601)
last_updated
Last version update time
last_check_at
Last update check time (remote only)
installed_version
Version number at installation
current_version
Currently installed version
latest_version
Latest remote version
install_commit
Git commit hash at installation (remote only)
install_branch
Git branch used at installation (remote only)
remote_url
Full GitHub URL including subdirectory path (remote only)
remote_subpath
Subpath of the Skill in the repository (subdirectory installation only)
description
Skill description
homepage
Homepage URL

目录结构

Directory Structure

skill-manager/
├── SKILL.md                    # 本文件
├── CHANGELOG.md                # 变更日志
├── CLAUDE.md                   # AI 开发助手说明
├── LICENSE.txt                 # 许可证
├── scripts/
│   ├── install.sh              # 安装脚本
│   ├── list.sh                 # 列表脚本
│   ├── remove.sh               # 卸载脚本
│   ├── update.sh               # 更新脚本
│   ├── check.sh                # 更新检查脚本
│   ├── auto-check.sh           # 定期自动检查触发器
│   ├── target.sh               # Agent 配置目录识别模块
│   ├── record.py               # 记录管理模块
│   └── security.py             # 安全检查模块
└── assets/                     # 资源文件
    ├── skill-registry.json     # Skill 安装记录(运行时生成)
    └── skill-registry.example.json  # 注册表示例
skill-manager/
├── SKILL.md                    # This file
├── CHANGELOG.md                # Changelog
├── CLAUDE.md                   # AI development assistant instructions
├── LICENSE.txt                 # License
├── scripts/
│   ├── install.sh              # Installation script
│   ├── list.sh                 # Listing script
│   ├── remove.sh               # Uninstallation script
│   ├── update.sh               # Update script
│   ├── check.sh                # Update check script
│   ├── auto-check.sh           # Scheduled automatic check trigger
│   ├── target.sh               # Agent configuration directory identification module
│   ├── record.py               # Record management module
│   └── security.py             # Security check module
└── assets/                     # Resource files
    ├── skill-registry.json     # Skill installation records (generated at runtime)
    └── skill-registry.example.json  # Registry example