SuperAPI AI 工具集

copilot-spaces

办公与效率

查看项目

更新于 10-15 21:52

技能介绍

用途:把项目专属的上下文(仓库、文件、文档、指令)整理为共享的 Space,让 Copilot 的回答基于团队真实的代码与知识,适用于按项目规范回答、生成代码、排障,以及执行 Space 中定义的模板、清单或多步流程。

主要能力:MCP 只读工具 mcp__github__list_copilot_spaces 列出当前用户可访问的 Space;mcp__github__get_copilot_space 按 owner 和 name 加载完整内容。写入操作通过 gh api 走 REST API:用户级 /users/{username}/copilot-spaces,组织级在 /orgs/{org}/copilot-spaces/...,协作者在 .../collaborators 下增删改查。

使用方式:先列出 Space 并匹配 owner_login,再按区分大小写的精确名称加载;Space 内容常引用 issue、项目面板、仓库文件等外部资源,可用其他 MCP 工具继续抓取补全上下文。写入前先从列表端点取得编号,例如更新指令:gh api users/{username}/copilot-spaces/{number} -X PUT -f general_instructions="...";创建:gh api users/{username}/copilot-spaces -X POST -f name="My New Space" -f general_instructions="..." -f visibility="private";删除:gh api users/{username}/copilot-spaces/{number} -X DELETE。可更新字段包括 name、description、general_instructions、icon_type、icon_color、visibility、base_role、resources_attributes。

限制:Space 名称区分大小写;内容可能超过 20KB,返回临时文件时建议用 grep 或 view_range 局部读取;资源列表更新会整体替换,增删需带全部现有资源;写入需要 PAT 的 user 权限,可用 gh auth refresh -h github.com -s user 刷新;该 API 尚未进入公开文档,可能需要 copilot_spaces_api 功能开关;404 常见于写入权限不足或名称错误。未提供部分:具体定价、可用地区与配额资料暂未提供。