mcpField
S
skill-downloader

skill-downloader

github.com/nicepkgAgent 工作流288339 次安装40 周前更新
代码仓库

关于 skill-downloader

用于从 GitHub、压缩包、直接 URL 或本地目录下载并安装 Claude Code 技能的工具。它会验证技能文件及其元数据,并支持自动识别来源类型。

主要功能

  1. 01支持多种技能来源
  2. 02自动识别来源类型
  3. 03验证 SKILL.md 与 YAML 元数据
  4. 04检测恶意内容模式

适用场景

  1. 01从 GitHub 安装指定技能
  2. 02从压缩包导入技能
  3. 03检查技能包有效性

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/nicepkg/ai-workflow --skill skill-downloader

安装后在 Claude Code 中输入/skill-downloader确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

scripts/
download_from_archive.py
download_from_github.py
download_skill.py

详细介绍

技能下载器

从多个来源下载并安装 Claude Code 技能。

支持的来源

来源类型示例
GitHub 仓库https://github.com/user/repo、github.com/user/repo
压缩归档文件.zip、.tar.gz、.tgz、.skill(重命名后的 zip)
直接 URL指向归档文件或技能文件夹的 URL

用法

从 GitHub 下载
python scripts/download_from_github.py <repo-url> <skill-path> --output <target-dir>

示例:

# Official Anthropic skills
python scripts/download_from_github.py https://github.com/anthropics/skills skills/docx --output ./.claude/skills/

# Community skills (root level)
python scripts/download_from_github.py https://github.com/gked2121/claude-skills social-repurposer --output ./.claude/skills/

# Nested skill path
python scripts/download_from_github.py https://github.com/MadAppGang/claude-code skills/content-brief --output ./.claude/skills/
从归档文件下载
python scripts/download_from_archive.py <url-or-path> --output <target-dir>

示例:

# From URL
python scripts/download_from_archive.py https://example.com/skills/my-skill.zip --output ./.claude/skills/

# From local file
python scripts/download_from_archive.py ./downloads/my-skill.tar.gz --output ./.claude/skills/

# .skill files (renamed zip)
python scripts/download_from_archive.py https://skillhub.club/download/awesome-skill.skill --output ./.claude/skills/
统一下载命令
python scripts/download_skill.py <source> --output <target-dir>

自动检测来源类型:

  • GitHub URL → 使用 git 稀疏检出
  • 归档文件 URL/路径 → 下载并解压
  • 目录路径 → 直接复制

示例:

# Auto-detect GitHub
python scripts/download_skill.py https://github.com/anthropics/skills/tree/main/skills/docx --output ./.claude/skills/

# Auto-detect archive
python scripts/download_skill.py https://example.com/my-skill.zip --output ./.claude/skills/

验证

所有下载方式都会验证:

  1. 技能文件夹包含 SKILL.md
  2. SKILL.md 包含有效的 YAML frontmatter,且具有 name 和 description
  3. 未检测到恶意内容模式

输出结构

下载的技能会放置在:

<output-dir>/
└── <skill-name>/
    ├── SKILL.md        # Required
    ├── scripts/        # Optional
    └── ...

错误处理

错误原因解决方案
技能已存在目标目录已存在使用 --force 覆盖
未找到 SKILL.md技能包无效确认来源中包含 SKILL.md
归档文件无效文件损坏或格式不受支持检查文件完整性
网络错误下载失败重试或检查 URL

与 Workflow Creator 集成

与 workflow-creator 搭配使用时,将技能下载到工作流的 .claude/skills/ 目录:

# Create workflow first
python /path/to/workflow-creator/scripts/create_workflow.py my-workflow --path ./workflows

# Then download skills
python scripts/download_skill.py https://github.com/anthropics/skills/tree/main/skills/docx --output ./workflows/my-workflow/.claude/skills/

技能来源参考

常见的技能仓库:

评论

支持 Markdown