A guide to slash commands in the GitHub Copilot app (opens in new tab)
Slash commands in the GitHub Copilot app provide quick, context-aware shortcuts for planning work, challenging decisions, automating implementation, and reviewing ideas. Unlike CLI commands, which manage terminal-oriented concerns such as directories and working paths, app commands focus on multi-session workflows and agent behavior. The post presents slash commands as a way to work faster while staying focused in the Copilot app.
What Slash Commands Are
- Type
/in the chat composer to open an autocomplete menu of commands available in the current context. - The app manages project context visually, so commands such as
/add-dirand/cwd—common in the CLI—are unnecessary. - Some commands, including
/clearand/model, work in both the CLI and the app. - App-specific commands emphasize session navigation, project management, and controlling Copilot’s working mode.
Planning Work with /plan
/plan helps users think through a task before implementation and switches the session into Plan mode.
- Break down new features by identifying files, components, dependencies, and implementation steps.
- Prepare large refactors with an incremental migration strategy and risk assessment.
- Investigate bugs by exploring possible causes and creating a diagnostic and repair plan.
- Example:
/plan I need to add two-factor authentication to our application. Help me break down the work involved, identify what files need to change, and outline an implementation approach.
Challenging Ideas with /spar
/spar acts as a critical reviewer, questioning assumptions and highlighting risks, tradeoffs, and edge cases.
- Pressure-test architecture decisions such as using Redis for caching.
- Compare alternatives like REST versus GraphQL or synchronous versus asynchronous processing.
- Review database and infrastructure migration plans for rollout risks.
- Evaluate proposed performance optimizations for hidden costs or unintended effects.
Implementing with /autopilot
/autopilot turns a high-level goal into an implementation workflow and switches the session into Autopilot mode.
- Ask Copilot to implement features, update files, and modify tests.
- Use it for multi-step maintenance work, including dependency upgrades, refactoring, and documentation updates.
- Example tasks include adding CSV report exports or upgrading a React project while addressing breaking changes and running the test suite.
Reviewing Ideas with /rubber-duck
/rubber-duck provides an independent perspective for thinking through problems and debugging. The article introduces it as a more useful alternative to explaining an issue to a pet, but the supplied text ends before describing its full capabilities or examples.
Use /plan to clarify the work, /spar to test the approach, and /autopilot to carry out the implementation. These commands complement the app’s visual workflow by making common Copilot interactions immediately accessible from the chat composer.