SuperAPI AI Directory

skill-installer

Agents & models

View repository

Updated 10-16 08:08

About this skill

Skill Installer

This skill provides a standardized skill installation process: fetch content → security review → confirm installation → write file.

Installation directory:~/.claude/skills/<skill-name>/SKILL.md


Supported input formats

Format Example
GitHub path owner/repo or owner/repo/skill-name
Raw file URL https://raw.githubusercontent.com/...
Third-party platform URL https://skillsmp.com/skills/...
Local file path /path/to/SKILL.md or local directory
Direct paste of content The user pasted the full contents of SKILL.md in the conversation

Execution flow

After receiving the installation request,strictly in orderexecute the following five stages.


Stage one: Parse the source

Based on the input provided by the user, determine the source type and fetch the content:

Source type A: GitHub path (owner/repo or owner/repo/skill-name)

# 1. 获取仓库基本信息
curl -s "https://api.github.com/repos/OWNER/REPO"

# 2. 列出 skills 目录(如果有)
curl -s "https://api.github.com/repos/OWNER/REPO/contents/skills/SKILL_NAME"

# 3. 获取 SKILL.md 原始内容
curl -s "https://raw.githubusercontent.com/OWNER/REPO/main/skills/SKILL_NAME/SKILL.md"
# 如果 main 分支不存在,尝试 master 分支

Record: Stars, last update time, author, file list.

Source type B: Raw file URL

Use the WebFetch tool to directly fetch the URL content. Record: domain source, whether it is a known trusted platform.

Source type C: Third-party platform URL

Use the WebFetch tool to fetch the content. If WebFetch fails (inaccessible),terminate immediately, output:

❌ 安装终止:无法访问来源 URL,内容不可审查,拒绝安装。
建议:请提供 GitHub 仓库路径或直接粘贴 SKILL.md 内容。

Source type D: Local file path

Use the Read tool to read the local SKILL.md file. If it is a directory path, try reading <路径>/SKILL.md。

Source type E: Direct paste of content

The user has already provided the full SKILL.md content in the conversation, so proceed directly to the review stage. Record: the source is "directly provided by the user", with no external source information.


Stage two: Security review (cannot be skipped)

Perform the following review on the fetched SKILL.md content;if any red line is triggered, terminate the installation:

🚨 Red line check (trigger any one → terminate immediately)

Scan the SKILL.md content line by line and check:

□ curl/wget 指向未知域名(非 GitHub/NPM/PyPI 等已知平台)
□ 将数据发送到外部服务器(POST 请求、数据上报)
□ 读取凭证文件:~/.ssh、~/.aws、~/.config、.env、*_key、*_token
□ 读取或修改 MEMORY.md、CLAUDE.md、USER.md 等配置文件
□ 使用 base64 解码后执行
□ eval() 或 exec() 接收外部输入
□ 请求 sudo 或提权操作
□ 读取浏览器 cookies 或 session 数据
□ 混淆代码(大段 base64、压缩代码、hex 编码)
□ 向 IP 地址(非域名)发起网络请求
□ 安装系统级软件包(brew install、apt-get 等)而未明确说明用途

If a red line is triggered:

❌ 安装终止:发现安全红线
红线类型:[具体描述]
位置:[在 SKILL.md 的哪个部分]
原因:[为什么这是危险的]
建议:请联系 skill 作者确认,或放弃安装。

⚠️ Risk assessment (if no red line is triggered, continue, but output the risk level)

Assess the following dimensions:

  • File permissions: which files does the skill need to read and write? Is the scope reasonable?
  • Network access: which external services does it need to access? Is the purpose clear?
  • Command execution: which shell commands does it execute? Are there potential risks?
  • Source credibility: is the author known? Is the repository actively maintained?

Risk level determination:

Level Condition Handling method
🟢 LOW No network/command execution, only text processing Continue automatically
🟡 MEDIUM Has network access or file operations, but the scope is clear Continue, but explain in the confirmation step
🔴 HIGH Accessing credential-type files, executing system commands Requires explicit user confirmation
⛔ EXTREME Any red line Terminate, do not install

Phase 3: Extract Skill metadata

Extract from the frontmatter of SKILL.md:

name: [skill 名称,用作目录名]
description: [skill 描述]

If the frontmatter is missing or incorrectly formatted:

  • Try to infer the skill name from the filename or GitHub path
  • Prompt the user to confirm the name

Directory name rules:

  • Use the name field in the frontmatter
  • All lowercase, words separated by hyphens (kebab-case)
  • Example:my-skill-name

Phase 4: Installation confirmation

Before writing files, show the user an installation summary and request confirmation:

╔══════════════════════════════════════════╗
║           SKILL 安装确认                  ║
╠══════════════════════════════════════════╣
║ Skill 名称:[name]                        ║
║ 安装路径:~/.claude/skills/[name]/        ║
║ 来源:[来源描述]                           ║
║ 风险等级:[🟢/🟡/🔴]                      ║
║ 文件数量:1 个(SKILL.md)                 ║
╠══════════════════════════════════════════╣
║ 审查结果:✅ 未发现安全红线                 ║
║ 注意事项:[如有风险,列出]                  ║
╚══════════════════════════════════════════╝

是否确认安装?(回复"确认"或"是"继续,其他回复取消)

Note: This step must wait for explicit user confirmation and cannot be skipped automatically. When the risk level is 🔴 HIGH, the user must enter "确认安装高风险skill" to continue.


Phase 5: Write files

After user confirmation, perform the installation:

# 1. 创建目录
mkdir -p ~/.claude/skills/[skill-name]

# 2. 写入 SKILL.md
# 使用 Write 工具将内容写入
# ~/.claude/skills/[skill-name]/SKILL.md

# 3. 如果 skill 包含其他文件(scripts/ 等),一并下载写入

After installation is complete, output:

✅ 安装成功

Skill:[name]
路径:~/.claude/skills/[name]/SKILL.md
状态:已激活(下次对话自动加载)

触发方式:[从 description 提取的触发关键词]

If a skill with the same name already exists at the target path:

⚠️  检测到已安装同名 skill:[name]
现有版本:[如果能获取版本信息]
新版本:[如果能获取版本信息]

选项:
1. 覆盖安装(替换现有 skill)
2. 保留现有,取消安装
请选择(1/2):

Quick installation examples

Install from a GitHub repository

安装 anthropics/claude-code-skills/my-skill

Install from a raw URL

安装 https://raw.githubusercontent.com/owner/repo/main/skills/my-skill/SKILL.md

Install from a local path

安装 /Users/me/Downloads/my-skill/SKILL.md

Install by pasting content directly

安装以下 skill:
---
name: my-skill
description: ...
---
# My Skill
...

Uninstall function

When the user says "uninstall skill [name]" or "delete skill [name]", execute:

# 确认目录存在
ls ~/.claude/skills/[name]/

# 请求确认后删除
# 使用 Bash 工具:rm -rf ~/.claude/skills/[name]/

A confirmation prompt must be shown before uninstalling:

⚠️  即将删除 skill:[name]
路径:~/.claude/skills/[name]/
此操作不可撤销。确认删除?(回复"确认"继续)

List installed skills

When the user says "list all skills", "which skills are installed", or "skill list":

ls ~/.claude/skills/

Format and output each skill's name and short description (extracted from the frontmatter).


Security principles

  1. Invisible content = do not install: Any source whose SKILL.md content cannot be obtained is rejected outright
  2. No compromise on red lines: If any red line is triggered, terminate the installation no matter how trustworthy the source is
  3. User makes the final decision: After review passes, the installation decision rests with the user
  4. Transparency principle: All review results and risk assessments are fully visible to the user

Relationship with skill-vetter

skill-installer has a simplified version of the skill-vetter logic built in. If a more detailed security review report is needed (review only, without installing), use skill-vetter。

Recommended workflow:

可疑来源 → 先用 skill-vetter 详细审查 → 确认安全后再用 skill-installer 安装
可信来源 → 直接用 skill-installer(内置审查已足够)

Language

  • Default Chinese
  • If the user inputs in English, output in English