>
Developer

Stop Guessing in Copilot CLI and Start Typing Slash Commands That Actually Save Time

Stop Guessing in Copilot CLI and Start Typing Slash Commands That Actually Save Time

I spent my first week with Copilot CLI (GitHub’s terminal-based coding assistant that runs in your shell, not a chat window) treating it like a standard chat interface. I typed full sentences, waited for the model to respond, and hoped the AI understood what I meant. It worked, but it felt slow and fuzzy. Then someone pointed me at the slash commands, and the whole thing clicked. Slash commands are direct levers that switch models, check your token budget, compact bloated context, and resume old sessions. If you are new to Copilot CLI, learning these is the single fastest way to go from “this is neat” to “this is part of my workflow.”

Slash commands turn vague chat into precise control

Copilot CLI lives in your terminal, which means you are already trained to type commands with intention. Slash commands extend that habit into the AI layer itself. Instead of asking the model to guess whether you want to refactor, explain something, or write a test, you prefix your intent with a forward slash and tell Copilot exactly what mode to enter. The difference between a conversation and a dashboard is that the latter executes. The former wanders.

When you type / on its own, you get a scrollable list of every slash command currently available. That moment is worth memorizing. It is your map. Every time GitHub updates Copilot CLI, that list is where new capabilities appear first. I keep a sticky note on my monitor that says “Type / first. Ask second.”

  • Type / any time to see the full list of supported slash commands
  • Slash commands are the primary control surface, not an optional add-on
  • Think of them as your command center rather than a hidden menu
  • The list updates over time, so recheck it after major releases

The mental shift is small but important. A chat interface invites you to be polite. “Could you please take a look at this function and maybe refactor it if you have time?” A command interface invites you to be direct. /refactor or /explain. You stop hedging. The tool stops hedging. The result is fewer wasted tokens and faster results.

The four commands that actually save me time

I have tried most of the available slash commands. Four of them earned a permanent place in my muscle memory. If you only learn these on day one, you will be ahead of most Copilot CLI users.

  • /model swaps the underlying large language model. Run it and you see every model currently available to your account, with capabilities, cost multipliers, and any plan restrictions. I switch between a fast model for refactoring and a reasoning model for architecture planning.
  • /context shows your current token usage, system overhead, and available buffer. It is your fuel gauge for the context window (the model’s working memory, which is finite). Run it before any long task.
  • /compact summarizes your current conversation into a condensed form so you can keep going without losing continuity. The tool auto-compacts near the limit, but doing it manually gives you control over the transition.
  • /clear wipes the session entirely. Use this when you are switching projects or shifting from debugging to feature design. A clean session forces precision. Old context leaks in otherwise.

Notice that none of these are about “asking the AI a question.” They are about controlling the environment around the AI. That is the part most users miss. The model is not the bottleneck. The context and the mode are.

When the commands do not work as expected

Slash commands are not magic. There are moments where they fail silently or behave in ways that surprise you. Knowing the rough edges up front saves debugging time.

First, the /model list is filtered by your account and organization settings. If you are inside a company that has restricted model access, you may see only one or two options regardless of your personal plan. The cost multiplier column is the part most users miss. Some models are ten times the cost of others on a metered plan. Picking the wrong model is like renting a moving truck to grab coffee.

Second, /compact is destructive. It does not save your old conversation anywhere you can recover. The tool summarizes, but the verbatim history is gone. I learned this the hard way by compacting a long debugging session and then realizing I wanted the exact error message from prompt forty.

Third, slash commands are not always synchronized across Copilot surfaces. The CLI’s slash list is not identical to the GitHub web editor’s slash list or the VS Code extension’s slash list. They share a philosophy but not a vocabulary. Do not assume /commit in the CLI does what /commit does in the editor.

  • /model availability depends on your plan and organization settings, not just your personal subscription
  • /compact is destructive: the verbatim history is lost after compaction, even if the summary remains
  • Slash commands differ across CLI, VS Code, and the web editor; do not assume cross-surface parity
  • Some slash commands require permissions or tokens your account may not have granted

Trade-offs

Slash commands are not free. The biggest cost is the learning curve. I spent two full afternoons just running / and reading every option. That is two afternoons I did not spend shipping code. For a developer who lives in the terminal, this pays off within a week. For someone who uses Copilot CLI twice a month, the curve is probably not worth it.

There is also a behavioral trap. Once you internalize slash commands, you start treating every chat interface the same way. You type / in tools that do not support it, expecting the same control surface. That habit is mildly embarrassing but not harmful. The bigger trap is the opposite: you avoid chat interfaces entirely because they feel imprecise. Some tasks genuinely benefit from conversational interaction. Use the right tool.

Finally, slash commands are not stable. GitHub adds, renames, and removes them between releases. The / list I memorized six months ago has at least three commands that no longer exist and two new ones I have not yet learned. If you build a workflow that depends on a specific command, pin your Copilot CLI version and read the release notes before upgrading.

Slash commands in Copilot CLI are a clean win for terminal-first developers who use the tool daily. For occasional users, the learning curve is real and the payoff is delayed. Skip them if you only open Copilot CLI once a week. Learn them if you live there.

What I would tell past me

If I could send a message back to the version of me that spent a week typing full sentences into Copilot CLI, I would say four things.

  • Type / first, ask second. The slash list is your map. Treat it like man or --help. Read it before you need it.
  • Run /context before any task longer than ten minutes. Running out of context mid-task is the most common silent failure mode.
  • /compact is for staying, /clear is for leaving. Compact when you are deep in a single thread. Clear when you are switching gears. The two are not interchangeable.
  • Do not assume slash commands match across Copilot surfaces. The CLI, the editor, and the web UI have overlapping but distinct vocabularies. Test before you rely.

Slash commands are not glamorous. They are not the feature GitHub markets on the homepage. They are the feature that turns Copilot CLI from “a chat window in my terminal” into “a tool I actually use every day.” Learn the four that matter. Ignore the rest until you need them.

Leave a comment