copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

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

Open AungMyoKyaw opened this issue 4 months ago • 2 comments

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"

AungMyoKyaw avatar Nov 18 '25 18:11 AungMyoKyaw

I’d also love to see Copilot CLI support the same prompt-file variable system that GitHub Copilot for VS Code already has. VS Code prompt-files allow using variables like ${input:…}, ${file}, ${workspaceFolder}, and ${selectedText}, which makes prompts much more flexible ((as documented here: https://code.visualstudio.com/docs/copilot/customization/prompt-files ).

Bringing these same input variables, file/workspace context variables, and selection variables to the CLI would make prompt-files portable across editor and terminal workflows. It would also let teams maintain a single set of prompts that work consistently in both environments.

Thanks for considering!

Ilorix avatar Nov 29 '25 07:11 Ilorix

I adapted this entire Claude Superpowers to work with GitHub Copilot Chat leveraging prompts, but it doesn't work with Github copilot cli. It would be great to be able to do things like this in GitHub Copilot CLI to compete with Claude Code's CLI capabilities.

FWIW, there also seems to be a growing list of feature requests asking for different types of "slash commands" to be added to the CLI tool. Adding this capability could resolve most of those requests without needing to explicitly accept and integrate features for each.

drewpayment avatar Dec 01 '25 15:12 drewpayment

I also would like to see this feature. At the moment I use Den Delimarsky's tip to use Speckit commands from Copilot CLI: Ask the agent to accept custom slash commands from the prompts found in .github/prompts.

roperi avatar Dec 05 '25 10:12 roperi

Since Claude Code (2.1.3-) has now merged the concepts of commands and skills and made is configurable (default: true) to make skills available as slash-commands, we basically already have this functionallity in copilot-cli as well via skills.

What I'm missing most in copilot-cli is just showing the skills as auto-completed slash-commands. Preferably configurable via user-invocable metadata field as Claude Code (https://code.claude.com/docs/en/skills).

Having pure "custom prompts" aka slash-cmds would of course be nice to keep compatibility with VS Code, but it's already frustrating that Claude Code and Github Copilot (VS Code) can't source these from the same folder, so therefor I think going straight for skills that has become a standard cross AI agents from different vendors makes more sense.

Referrence: https://www.reddit.com/r/AI_Agents/comments/1qavf10/claude_codes_slash_commands_skills_merge_a_step/

msundman78 avatar Jan 13 '26 19:01 msundman78

+1 — this is a key missing capability. Slash commands are essential for efficient CLI workflows and reuse.

plusplusoneplusplus avatar Jan 15 '26 15:01 plusplusoneplusplus

I think this is one of the most useful and basic features a coding cli needs. Claude code, Codex-cli, cursor-cli, gemini-cli, you name it they have this because it just seems like the bare minimum.

Bigsy avatar Jan 19 '26 09:01 Bigsy

+1 this is a big deal and can seems like a small gap to close, with very big impact on dev experince

barakd avatar Jan 20 '26 09:01 barakd

+1 why is this missing in the first place ?!?!? can we have consistent cli tooling?