mcpField
S
skill-developer

skill-developer

github.com/parcadeiAgent 工作流3.9k488 次安装40 周前更新
代码仓库

关于 skill-developer

用于指导 Claude Code 用户创建技能的元技能,也涵盖基于 MCP 流水线的技能。它提供目录结构、模板、示例和检查清单。

主要功能

  1. 01说明 SKILL.md 结构和 frontmatter
  2. 02提供技能目录布局
  3. 03展示 MCP 流水线脚本的搭建
  4. 04介绍可选的触发条件配置
  5. 05附带创建检查清单

适用场景

  1. 01创建新的 Claude Code 技能
  2. 02将脚本转换为技能
  3. 03构建串联 MCP 工具的技能

MCP 相关

它说明如何编写串联 MCP 工具的脚本并将其封装为技能,包含模板和通过 `runtime.mcp_client` 调用工具的示例。

安装

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

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill skill-developer

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

详细介绍

技能开发者

用于创建新 Claude Code 技能的元技能,包括封装 MCP 流水线的技能。

适用场景

  • “为 X 创建一个技能”
  • “帮我创建一个新技能”
  • “把这个脚本改成一个技能”
  • “如何创建技能?”

技能结构

技能位于 .claude/skills/<skill-name>/:

.claude/skills/my-skill/
├── SKILL.md          # Required: Main skill definition
├── scripts/          # Optional: Supporting scripts
└── templates/        # Optional: Templates, examples
SKILL.md 格式
---
name: skill-name
description: Brief description (shown in skill list)
allowed-tools: [Bash, Read, Write]  # Optional: restrict tools
---

# Skill Name

## When to Use
[When Claude should discover this skill]

## Instructions
[Step-by-step instructions for Claude to follow]

## Examples
[Usage examples]

创建 MCP 流水线技能

要创建新的 MCP 链式脚本并将其封装为技能:

步骤 1:使用模板

复制 multi-tool-pipeline 模板:

cp $CLAUDE_PROJECT_DIR/scripts/multi_tool_pipeline.py $CLAUDE_PROJECT_DIR/scripts/my_pipeline.py

参考模板模式:

cat $CLAUDE_PROJECT_DIR/.claude/skills/multi-tool-pipeline/SKILL.md
cat $CLAUDE_PROJECT_DIR/scripts/multi_tool_pipeline.py
步骤 2:自定义脚本

编辑新脚本,将所需的 MCP 工具串联起来:

async def main():
    from runtime.mcp_client import call_mcp_tool
    args = parse_args()

    # Chain your MCP tools (serverName__toolName)
    result1 = await call_mcp_tool("server1__tool1", {"param": args.arg1})
    result2 = await call_mcp_tool("server2__tool2", {"input": result1})

    print(result2)
步骤 2:创建技能

创建 .claude/skills/my-pipeline/SKILL.md:

---
name: my-pipeline
description: What the pipeline does
allowed-tools: [Bash, Read]
---

# My Pipeline Skill

## When to Use
- [Trigger conditions]

## Instructions

Run the pipeline:

\`\`\`bash
uv run python -m runtime.harness scripts/my_pipeline.py --arg1 "value"
\`\`\`

### Parameters
- `--arg1`: Description

## MCP Servers Required
- server1: For tool1
- server2: For tool2
步骤 3:添加触发条件(可选)

添加到 .claude/skills/skill-rules.json:

{
  "skills": {
    "my-pipeline": {
      "type": "domain",
      "enforcement": "suggest",
      "priority": "medium",
      "description": "What it does",
      "promptTriggers": {
        "keywords": ["keyword1", "keyword2"],
        "intentPatterns": ["(pattern).*?(match)"]
      }
    }
  }
}

参考文件

如需完整详情,请阅读:

cat $CLAUDE_PROJECT_DIR/.claude/rules/skill-development.md
cat $CLAUDE_PROJECT_DIR/.claude/rules/mcp-scripts.md

快速检查清单

  • SKILL.md 包含 frontmatter(名称、描述)
  • “适用场景”部分清晰明了
  • 指令可以直接复制粘贴使用
  • 如有需要,已记录 MCP 服务
  • 已将触发条件添加到 skill-rules.json(可选)

本仓库中的示例

查看现有技能,了解相关模式:

ls $CLAUDE_PROJECT_DIR/.claude/skills/
cat $CLAUDE_PROJECT_DIR/.claude/skills/commit/SKILL.md
cat $CLAUDE_PROJECT_DIR/.claude/skills/firecrawl-scrape/SKILL.md

评论

支持 Markdown