skill-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill 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/ - 如需显式指定目标根目录,可使用 参数或设置
--targetSKILL_MANAGER_TARGET_DIR=/path/to/.codex - 从全局配置目录(如 )调用时,会尝试通过 git 自动发现项目本地目录,并打印告警
~/.claude
When performing installation, listing, uninstallation, or update operations, the script will search upward from the calling directory for Agent configuration directories:
- When called in or its subdirectories, the target is
/Users/maoking/.codex/Users/maoking/.codex/skills/ - When the project root directory contains ,
.codex/, or.claude/, the target is the.openclaw/orskills/under the corresponding configuration directorycommands/ - When called within ,
.codex/skills/, or.claude/skills/, the target is its parent configuration directory.openclaw/skills/ - To explicitly specify the target root directory, use the parameter or set
--targetSKILL_MANAGER_TARGET_DIR=/path/to/.codex - When called from a global configuration directory (such as ), it will attempt to automatically discover the local project directory via git and print a warning
~/.claude
支持的来源类型
Supported Source Types
本地路径(符号链接)
Local Path (Symbolic Link)
bash
undefinedbash
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/
undefinedskill-manager install ~/commands/
undefinedGitHub 仓库根目录(克隆,删除 .git)
GitHub Repository Root (Clone, delete .git)
bash
skill-manager install https://github.com/owner/skill-repo
skill-manager install owner/skill-repobash
skill-manager install https://github.com/owner/skill-repo
skill-manager install owner/skill-repoGitHub 子目录(稀疏克隆,删除 .git)
GitHub Subdirectory (Sparse Clone, delete .git)
bash
undefinedbash
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
undefinedskill-manager install jgtolentino/insightpulse-odoo/main/docs/claude-code-skills/community
undefined工作流程
Workflow
安装
Installation
- 检测来源类型 - 自动识别本地路径、GitHub 仓库或子目录
- 检测 Item 类型 - 自动识别是 Skill(目录)还是 Command(.md 文件)
- 检测是否为集合目录 - 检查目录是否包含多个 items
- 批量处理模式 - 如果是集合目录,遍历所有 items 并分别安装
- 本地来源 - 创建符号链接,保持与源同步更新
- GitHub 仓库根 - 使用 浅克隆
git clone --depth 1 - GitHub 子目录 - 使用稀疏克隆(sparse checkout)仅获取指定目录
- 冲突处理 - 已存在时先备份为 ,然后安装新版本
.backup
- Detect Source Type - Automatically identify local path, GitHub repository, or subdirectory
- Detect Item Type - Automatically identify whether it is a Skill (directory) or Command (.md file)
- Detect Collection Directory - Check if the directory contains multiple items
- Batch Processing Mode - If it is a collection directory, traverse all items and install them separately
- Local Source - Create symbolic link to keep in sync with source updates
- GitHub Repository Root - Use for shallow clone
git clone --depth 1 - GitHub Subdirectory - Use sparse checkout to only fetch the specified directory
- Conflict Handling - If already exists, back up as first, then install the new version
.backup
安装命令
Installation Commands
bash
undefinedbash
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
undefinedscripts/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.shDisplays 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.jsonbash
scripts/check.shChecks 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 listDisplays detailed records of all installed Skills, including:
- Installation time
- Source URL
- Current version
- Description information
识别规则
Identification Rules
Skill 目录规则
Skill Directory Rules
一个目录被视为有效的 skill 目录,如果它包含:
- 文件(标准 skill)
SKILL.md - 或 文件(变体)
skill.md - 或 /
.codex/.claude子目录.openclaw
A directory is considered a valid skill directory if it contains:
- file (standard skill)
SKILL.md - Or file (variant)
skill.md - Or /
.codex/.claudesubdirectory.openclaw
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 files
.md
使用示例
Usage Examples
bash
undefinedbash
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
undefinedpython3 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、密码等敏感信息 |
| Category | Description |
|---|---|
| Dangerous Code Patterns | Command execution, sensitive file access, data leakage, code obfuscation, privilege escalation, etc. |
| Skill-Specific Risks | Installation hooks, MCP server configuration, etc. |
| Prompt Security | Prompt injection, data collection instructions, execution instructions, deceptive descriptions, etc. |
| Hardcoded Credentials | API 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| 字段 | 说明 |
|---|---|
| Skill 目录名 |
| 原始安装来源(本地路径或 GitHub URL) |
| |
| 初始安装时间(ISO 8601) |
| 最后版本更新时间 |
| 最后一次更新检查时间(仅远程) |
| 安装时的版本号 |
| 当前已安装版本 |
| 远程最新版本 |
| 安装时的 Git commit hash(仅远程) |
| 安装时使用的 Git branch(仅远程) |
| 完整 GitHub URL,含子目录路径(仅远程) |
| Skill 在仓库中的子路径(仅子目录安装) |
| Skill 描述 |
| 主页 URL |
Each installed Skill is recorded in , containing the following fields:
assets/skill-registry.json| Field | Description |
|---|---|
| Skill directory name |
| Original installation source (local path or GitHub URL) |
| |
| Initial installation time (ISO 8601) |
| Last version update time |
| Last update check time (remote only) |
| Version number at installation |
| Currently installed version |
| Latest remote version |
| Git commit hash at installation (remote only) |
| Git branch used at installation (remote only) |
| Full GitHub URL including subdirectory path (remote only) |
| Subpath of the Skill in the repository (subdirectory installation only) |
| Skill description |
| 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