โ—† Vibe EngineeringSMIT ยท AI Agentic Engineering Urdu
Class 7 ยท 7.1

Commands, shortcuts & configuration deep-dive

A second day inside Claude Code. Master the everyday commands, the three C's that manage your context window, the shortcut keys, and how the .claude folder and the @ trick actually work.

๐ŸŽฏ Goal: fluent command-line controlโฑ Read: 12 min๐Ÿงญ Type: deep dive

01Where we are: the coding-agent landscape

Welcome to week two, day two โ€” a second day living inside Claude Code, going deeper. Before we touch a single command, hold the whole map in your head. Every tool we've met falls into one of three camps, and it's worth seeing them side by side once more.

IDEs PLUGINS CLI Cursor Antigravity (Gemini) Windsurf GitHub Copilot Codex (in VS Code) โ˜… Claude Code Codex CLI ยท Gemini CLI OpenCode ยท AMP A fast-moving field โ€” but the CLI camp is where the agentic revolution really lives.
The three families of coding agents. Today we stay firmly in Claude Code โ€” the tool that set the pace for the whole CLI camp.
Following along in a different tool?

If you fell for OpenCode or AMP yesterday, use them all week โ€” most of what follows carries over. Commands are almost always a slash plus a name once you're inside the tool; only the exact names differ. Keep an eye on the resources, because this category changes weekly.

02Discovering commands โ€” the two-second trick

Inside Claude, typing a / (slash) runs a command that is handled by the tool itself โ€” it is not sent to the model. You never have to memorise the list. There are two ways to surface everything on demand:

Type / then press โ†“

Scroll the full menu of commands, each with a one-line description. This alone tells you almost everything you need.

Run /help

A compact summary of the important commands plus the shortcut keys โ€” a great cheat-sheet while the muscle memory forms.

Press Esc to leave any of these overlay screens and get back to the prompt.

03The commands you'll use every day

A handful of commands come up constantly. Here's the working set, grouped by what they're for.

CommandWhat it doesWhen you reach for it
/initExplores the project and writes a fresh CLAUDE.md.First time in a new project (though writing it by hand is often better).
/modelShows the current model and lets you switch.Dropping from Opus to a cheaper model, or back up for hard work.
/statusThe lay of the land: version, settings, session & weekly usage.A quick health check.
/contextThe memory printout โ€” what's filling the window right now.All the time. Your single most-used command.
/compactCompresses the conversation so you can keep going.Proactively, before the window forces it mid-task.
/clearWipes conversation history โ€” like starting fresh.Deliberately resetting to re-read CLAUDE.md.
/config, /usage, /statsSettings, usage detail, and a pleasing per-day token chart.Tracking how much you're using the platform.

The three C's: context, compact, clear

These belong together because they all manage the same precious resource โ€” the context window. Understanding how they relate is the difference between smooth sessions and ones that go off the rails.

/context Look โ€” don't touch Visualise what's in the window /compact Compress & keep going Summarise; history survives /clear Wipe & restart Blank slate, re-reads CLAUDE.md Left to right: increasingly destructive. Reach for the gentlest one that does the job.
Compact on your terms, not its

Letting Claude auto-compact in the middle of a task can cause a loss of coherence and send work off the rails. Run /compact yourself at a natural break. You can even add instructions โ€” /compact keep the API design decisions โ€” though many prefer to put that kind of durable information in CLAUDE.md and stay in control of it.

A clean-slate workflow that works

One reliable rhythm: keep your CLAUDE.md and plan.md up to date (tell Claude to maintain them), then /clear โ€” or quit with Ctrl+C twice and relaunch โ€” and run /context to confirm a fresh, tidy start. It's faster and more predictable than nursing a long conversation. Compacting works well too; it's simply a matter of taste.

04Shortcut keys worth knowing

You'll pick up more over time, but four earn their place early.

KeysEffect
Shift+TabCycle modes: accept-edits on โ†’ plan mode โ†’ normal. Accept-edits auto-approves file edits (not the same as full YOLO).
Ctrl+OToggle the detailed transcript โ€” the full, gory trace of the agent's thinking.
Ctrl+EExpand/collapse a thinking trace so you can read all of it.
Ctrl+BSend the current job to run in the background while you keep typing commands.
Ctrl+Shift+`(VS Code) Open a completely fresh terminal โ€” handy to shed stale environment variables.
Plan mode is less necessary now

Plan mode forces Claude to plan before acting. With strong models like Opus it's used less than it once was โ€” the model tends to decide for itself when planning is worthwhile. Good to know it's there; no need to force it every time.

05Under the hood: the .claude folder

As you've worked, a .claude directory has quietly appeared at the top of your project. Inside is a settings JSON file โ€” and every time you pressed 2 ("yes, and don't ask again") Claude wrote a line into it recording what it's now allowed to do.

.claude/settings.local.json
{
  "permissions": {
    "allow": [
      "Bash(git add:*)",
      "Bash(docker build:*)",
      "Edit(src/**)"
    ],
    "deny": []
  }
}

You can edit this file directly โ€” add abilities, or remove a permission by deleting its line โ€” for instant control. There's also a /permissions command to view, add and remove rules from inside Claude, but hand-editing the JSON is often quicker.

06The @ trick: pulling files into context

Inside Claude Code, an @ stands for the contents of a file path. It works both in a prompt and inside memory files, and it's the key to composing your instructions from smaller pieces.

CLAUDE.md
# Detailed plan
@docs/plan.md            # inlines the whole plan file here

# One-file trick: make CLAUDE.md == AGENTS.md
@AGENTS.md               # maintain a single file for Claude Code AND Copilot
Handy

@ a directory

Referencing a folder brings in a listing of its files โ€” not their contents โ€” a cheap way to give Claude a map.

Careful

@ a big file

Inlining a long file fills the context window fast. Powerful, but use with intent โ€” watch /context after.

The single-source trick

Want the same guidance for Claude Code and GitHub Copilot? Don't write a full CLAUDE.md. Instead make its entire contents a single line: @AGENTS.md. Now CLAUDE.md simply is AGENTS.md, and you maintain one file instead of two.

โœ“ Key takeaways

  • Slash runs tool commands, not model prompts โ€” discover them with / + โ†“ or /help.
  • The three C's manage the window: /context looks, /compact compresses, /clear wipes. Reach for the gentlest one.
  • Compact yourself at a natural break โ€” don't let it auto-compact mid-task.
  • Learn Shift+Tab, Ctrl+O, Ctrl+B early.
  • Permissions live in .claude/settings โ€” editable by hand or via /permissions.
  • @path inlines a file (or lists a folder) in prompts and memory โ€” the basis of composable instructions.