返回 Skill 列表
GitHub进阶
GitHub MCP 集成 Skill
让 AI 直接操作 GitHub:搜索代码、创建 Issue、发起 PR、查看仓库——全自动。
📋 SKILL.md 完整代码
--- name: github-mcp description: >- 让 AI 直接操作 GitHub:搜索代码、创建 Issue、发起 PR、查看仓库——全自动。 Use when working on github mcp tasks. allowed-tools: Read,Write,Bash --- # GitHub MCP 集成 Skill ## Quick Start 1. Save as `~/.claude/skills/github-mcp/SKILL.md` 2. Restart Claude Code 3. Type `/github-mcp` or describe your task naturally 4. Claude auto-triggers when your task matches the description ## Instructions - Understand the user's specific context and needs - Apply domain best practices consistently - Provide actionable, specific guidance with examples - Verify all outputs before presenting to user ## Gotchas - Test with a fresh Claude instance after changes - Keep SKILL.md under 500 lines; use references/ for details - Description is the trigger key — make it specific and keyword-rich
🚀 怎么用
1. 复制上面的 SKILL.md 代码 2. 保存为 ~/.claude/skills/github-mcp/SKILL.md 3. 重启 Claude Code 4. 输入 /github-mcp 或直接描述任务触发 5. AI 自动按 Skill 流程执行
MCP 是什么
MCP(Model Context Protocol)= 让 AI 连接外部工具的「USB-C 标准」。GitHub MCP Server 让 AI 能直接操作你的 GitHub 仓库——不需要打开网页,AI 在对话中就能完成所有操作。
能做什么
搜索仓库代码(searchRepositories)→创建/查看 Issue(createIssue/listIssues)→创建 PR→查看文件内容和提交记录→管理项目看板。AI 甚至能根据 Issue 描述自动写代码并发起 PR。
配置方法
在 Claude Code 中:claude mcp add github -- npx -y @anthropic/mcp-server-github。或者使用 GitHub Copilot 的 MCP 端点。配置后 AI 直接能调用 GitHub 所有公开 API。