A Guide to Slash Commands in the GitHub Copilot App

Learn how slash commands in the GitHub Copilot app can help you plan, implement, and review code more efficiently, acting as powerful shortcuts for your AI development workflow.

axonn bots
axonn bots
·4 min read
This guide provides an overview of slash commands in the GitHub Copilot app, including `/plan` for task breakdown, `/spar` for stress-testing ideas, `/autopilot` for implementation, `/rubber-duck` for a second opinion, `/canvas` for interactive interfaces, and `/orchestrate` for coordinating complex efforts across multiple repositories. These commands are designed to streamline coding workflows, allowing developers to move faster and more efficiently.

The GitHub Copilot app is more than just a chat interface. It comes with a powerful set of slash commands that act as shortcuts, helping you manage sessions, navigate projects, and customize your Copilot workflow. Typing a single slash (/) opens up a world of possibilities, letting you move faster and stay focused.

If you're coming from the Copilot CLI, you'll notice a key difference. The CLI commands are designed around a terminal-first workflow, like adding directories or managing terminal access. The app's commands, however, are tailored for the multi-session workflow that the desktop app provides. While some commands like /help and /explain work in both places, the app-specific commands are about managing workflows.

Planning Your Code

Good code starts with a good plan. The /plan command helps you break down a task before you start writing code. It switches your session into a planning mode, where Copilot helps you think through your approach, identify potential challenges, and decide what needs to happen next.

Use it to break down new feature ideas before jumping into implementation. Have Copilot identify files, components, and dependencies so you have a clearer path forward. You can also use it to map out complex changes, uncovering potential risks and developing an incremental migration plan. If you know something is wrong but aren't sure where to start, /plan can help you explore possible causes and outline the steps needed to diagnose and resolve the problem.

Pressure-Testing Your Ideas

Sometimes the best way to validate an idea is to challenge it. /spar is like that one teammate who raises their hand and asks, "Have we thought about what happens when this goes wrong?" It helps you pressure-test your approach by having Copilot question your assumptions and point out potential risks or tradeoffs before you commit to a solution.

Pitch your plan to use Redis for caching and have Copilot question your invalidation strategy. Ask Copilot to debate the pros and cons of REST versus GraphQL for your application. Walk through a database migration and have Copilot identify edge cases. Share an optimization you're considering and ask Copilot to point out hidden bottlenecks or simpler alternatives.

Letting Copilot Drive

Once you have a plan, the next step is turning that idea into working code. /autopilot helps you work through implementation, make changes, and iterate as needed. Instead of managing each individual step, give Copilot a goal and let it work through the steps needed to complete the task.

Hand off a task and let Copilot work through the implementation steps. It can add support for exporting user reports as CSV files, identify files that need changes, implement the feature, and update any relevant tests. Use it for tasks that require multiple steps, such as updating dependencies, refactoring code, or improving documentation.

Getting a Second Opinion

The /rubber-duck command gives you something even better than a fresh set of eyes: a different model to independently review your work. It helps surface blind spots, question assumptions, and catch issues your primary model may have missed. It uses a different model than the one you are currently chatting with to provide a second opinion, which is especially useful for complex refactors, architectural decisions, and migration plans.

Before you start implementing a complex feature, have a different model review your plan and point out assumptions or missing steps. After making significant changes, ask /rubber-duck to critique the approach and highlight anything that could be simplified or improved. Before rolling out a complex migration, use a second model to independently evaluate your approach and identify rollout or reliability concerns.

Beyond the Chat Window

Not every problem is best solved through a chat window. /canvas lets you create interactive interfaces directly from a conversation with Copilot. Instead of working through information in a long chat, you can turn it into a visualization, dashboard, or custom workflow you can interact with.

Coordinating Large Efforts

Not every task fits neatly into a single workflow. /orchestrate helps you coordinate work across sessions and repositories by breaking larger efforts into smaller tasks that can move forward in parallel.

When a feature touches multiple codebases, /orchestrate can help you track the work and coordinate updates across each repository. For larger projects, Copilot can divide the work into focused efforts so multiple pieces can move forward together.

You don't need to memorize any commands to get started. Pick a few that match how you work and build from there. The autocomplete menu has your back for the rest.