Skip to content

Feature Request: Support custom slash commands from .github/prompts directory #618

@AungMyoKyaw

Description

@AungMyoKyaw

Feature Request: Custom Slash Commands Support

Description

The GitHub Copilot CLI should support custom slash commands (similar to Claude Code's custom commands) by reading prompt files from a .github/prompts/ directory, just like the GitHub Copilot VS Code extension does.

Current Behavior

Currently, when using copilot and typing a slash command, only built-in commands are available. Custom prompt files stored in .github/prompts/*.prompt.md are not recognized or available as slash commands.

Expected Behavior

When users have prompt files in their repository like:

  • .github/prompts/openspec-apply.prompt.md
  • .github/prompts/openspec-archive.prompt.md
  • .github/prompts/openspec-proposal.prompt.md

These should automatically appear as available slash commands when using the Copilot CLI, allowing users to select and use these custom prompts in their current session.

Proposed File Structure

.github/prompts/
├── openspec-apply.prompt.md
├── openspec-archive.prompt.md
└── openspec-proposal.prompt.md

Example Expected UX

  1. User runs copilot
  2. User types /
  3. The following options appear:
    • /openspec-apply (from .github/prompts/openspec-apply.prompt.md)
    • /openspec-archive (from .github/prompts/openspec-archive.prompt.md)
    • /openspec-proposal (from .github/prompts/openspec-proposal.prompt.md)
    • [built-in commands...]

Benefits

  • Consistency with GitHub Copilot VS Code extension behavior
  • Enables repository-specific custom commands and workflows
  • Improves developer productivity with reusable prompts
  • Supports team-wide standardization of common operations

References

  • This functionality already exists in GitHub Copilot VS Code extension
  • Similar feature exists in Claude Code as "custom commands"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions