Copilot-Spaces
Copilot-Spaces是一款code方向的AI技能,核心价值是Use Copilot Spaces to provide project-specific context to conversations,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Use Copilot Spaces to provide project-specific context to conversations. Use this skill when users mention a "Copilot space", want to load context from a shared knowledge base, discover available spac
mkdir -p ./skills/copilot-spaces && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/copilot-spaces/SKILL.md -o ./skills/copilot-spaces/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# Copilot Spaces
Use Copilot Spaces to bring curated, project-specific context into conversations. A Space is a shared collection of repositories, files, documentation, and instructions that grounds Copilot responses in your team's actual code and knowledge.
Available Tools
MCP Tools (Read-only)
| Tool | Purpose |
|------|---------|
| `mcp__github__list_copilot_spaces` | List all spaces accessible to the current user |
| `mcp__github__get_copilot_space` | Load a space's full context by owner and name |
REST API via `gh api` (Full CRUD)
The Spaces REST API supports creating, updating, deleting spaces, and managing collaborators. The MCP server only exposes read operations, so use `gh api` for writes.
**User Spaces:**
| Method | Endpoint | Purpose |
|--------|----------|---------|
| `POST` | `/users/{username}/copilot-spaces` | Create a space |
| `GET` | `/users/{username}/copilot-spaces` | List spaces |
| `GET` | `/users/{username}/copilot-spaces/{number}` | Get a space |
| `PUT` | `/users/{username}/copilot-spaces/{number}` | Update a space |
| `DELETE` | `/users/{username}/copilot-spaces/{number}` | Delete a space |
**Organization Spaces:** Same pattern under `/orgs/{org}/copilot-spaces/...`
**Collaborators:** Add, list, update, and remove collaborators at `.../collaborators`
**Scope requirements:** PAT needs `read:user` for reads, `user` for writes. Add with `gh auth refresh -h github.com -s user`.
**Note:** This API is functional but not yet in the public REST API docs. It may require the `copilot_spaces_api` feature flag.
When to Use Spaces
- User mentions "Copilot space" or asks to "load a space"
- User wants answers grounded in specific project docs, code, or standards
- User asks "what spaces are available?" or "find a space for X"
- User needs onboarding context, architecture docs, or team-specific guidance
- User wants to follow a structured workflow defined in a Space (templates, checklists, multi-step processes)
Workflow
1. Discover Spaces
When a user asks what spaces are available or you need to find the right space:
Call mcp__github__list_copilot_spacesThis returns all spaces the user can access, each with a `name` and `owner_login`. Present relevant matches to the user.
To filter for a specific user's spaces, match `owner_login` against the username (e.g., "show me my spaces").
2. Load a Space
When a user names a specific space or you've identified the right one:
Call mcp__github__get_copilot_space with:
owner: "org-or-user" (the owner_login from the list)
name: "Space Name" (exact space name, case-sensitive)This returns the space's full content: attached documentation, code context, custom instructions, and any other curated materials. Use this context to inform your responses.
3. Follow the Breadcrumbs
Space content often references external resources: GitHub issues, dashboards, repos, discussions, or other tools. Proactively fetch these using other MCP tools to gather complete context. For example:
- A space references an initiative tracking issue. Use `issue_read` to get the latest comments.
- A space links to a project board. Use project tools to check current status.
- A space mentions a repo's masterplan. Use `get_file_contents` to read it.
4. Answer or Execute
Once loaded, use the space content based on what it contains:
**If the space contains reference material** (docs, code, standards):
- Answer questions about the project's architecture, patterns, or standards
- Generate code that follows the team's conventions
- Debug issues using project-specific knowledge
**If the space contains workflow instructions** (templates, step-by-step processes):
- Follow the workflow as defined, step by step
- Gather data from the sources the workflow specifies
- Produce output in the format the workflow defines
- Show progress after each step so the user can steer
5. Manage Spaces (via `gh api`)
When a user wants to create,
🎯 Best For
- Claude users
- GitHub Copilot users
- Software engineers
- Development teams
- Tech leads
💡 Use Cases
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Copilot-Spaces to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Is Copilot-Spaces compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Copilot-Spaces?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Copilot-Spaces?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/copilot-spaces/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.