Many developers treat slash commands as glorified keyboard shortcuts: /compact when context fills up, /clear or /rewind when a thread goes off the rails, /diff to inspect edits. Those are useful, but they only handle session hygiene—they do not change how the Agent actually works.

What creates a real gap in daily engineering velocity is a different group of workflow commands that rewrite the Agent’s reasoning and execution protocol—forcing it to interview you and align on design before a large change (/grill-me + /plan), spinning up multi-perspective deep reasoning for stubborn bugs (/boost), dispatching well-scoped tasks to run and self-verify while you step into a meeting or go to sleep (/goal), and turning a half-hour debugging detour into a permanent rule for future sessions (/learn).

Following the natural order of real development work, and aligned with antigravity.google/docs/commands and the /learn reference, this guide maps out the trigger boundaries, combinations, and pitfalls of these core workflow commands.

Antigravity core workflow slash commands and use-case map


1. Two Kinds of Slash Commands: Session Hygiene vs. Execution Protocols

We already covered session-management commands such as /clear, /compact, /diff, /rewind, /fork, and /context in #2, so I will not repeat that baseline table here. Start with one clean mental split:

  • Session management: Manipulates the state of the current conversation (clearing, compacting, rolling back, forking, switching models). On the next turn, the Agent still follows its default single-turn loop.
  • Workflow orchestration: Directly alters the Agent’s behavioral protocol—blocking immediate code edits, forcing it to interrogate your requirements first, preventing premature stops, or spinning up multi-role subagents.

Only 8 workflow commands are worth keeping in daily memory. Here are their boundaries and cost profiles:

Command What It Changes When to Use It Cost & Availability
/grill-me Inverts control: the Agent interviews you one question at a time Fuzzy ideas, undefined boundaries, risk of missing implicit decisions Low; all plans
/plan Enters read-only exploration and drafts a structured plan for review Cross-file edits, refactors, unfamiliar legacy code Medium; all plans
/boost Launches multi-agent deep reasoning and strict multi-perspective verification Stubborn concurrency bugs, race conditions, complex algorithms, deep research High; Paid plans
/goal Blocks premature stops and loops on verified evidence until criteria pass Long-running unattended tasks with crisp acceptance criteria Medium to high; all plans
/learn Scans recent corrections, drafts a Proposal, then persists a Rule or Skill Right after correcting a recurring mistake or resolving an environment/debugging pitfall Low; all plans
/teamwork Provisions isolated workspaces and splits parallel builder/critic subagents Multi-hour or multi-day repo-wide migrations and large open-ended research Very high; Paid plans
/schedule Registers a one-shot timer or recurring cron trigger Checking build status on a cadence or revisiting a task automatically later Scales with trigger frequency
/browser Delegates web navigation and page debugging to the browser subagent Frontend UI verification, reproducing interactive bugs, inspecting console logs Medium; scales with page turns

Do not overlook an old favorite: /compact [focus]. Technically a session-management command, it plays a central role inside long /grill-me, /plan, and /goal chains—once design alignment wraps up and before coding begins, running a focused compaction to retain only the final decisions makes downstream execution far steadier.


2. Lock Down Requirements Before Writing Code: /grill-me + /plan

A common mistake is tossing a vague prompt straight at the Agent: “Move user imports to an async queue, and add retries and error notifications while you’re at it.” The Agent quietly edits a dozen files, and only at the end do you discover its queue choice, idempotency key, and failure callback look nothing like what you had in mind—leaving git checkout . as the only way out.

Using /grill-me and /plan together shifts that rework before the first line of code is written. Their roles are distinct:

  • Requirements are clear, but the blast radius is large → Go straight to /plan. The Agent scans the repository read-only, produces a reviewable plan (which files change, how they change, and how to verify), and pauses for your inline annotations or scope adjustments. It will not touch code until you click Proceed (or explicitly confirm).
  • You have not finished thinking through the trade-offs yourself → Start with /grill-me. It flips control and behaves like a thorough technical reviewer, asking one concrete question at a time (typically placing its recommended option first) to surface hidden decisions: “Should duplicate imports deduplicate by email or external ID? Reject files over 10 MB outright or chunk them? After 3 failed retries, write to a dead-letter table or fire an alert?”

Once /grill-me nails down the key decisions, follow up with /plan in the same session—the resulting plan rarely drifts off target. When unsure which path fits a task, follow this decision flow:

One practical detail: if /grill-me took a dozen back-and-forth turns to settle the design, your thread is now cluttered with rejected alternatives. Before entering /plan, run:

1
/compact Keep only the 5 finalized design decisions and API constraints; discard all rejected alternatives discussed earlier

That locks in the agreed decisions without letting discarded options pollute implementation.


3. Deep Reasoning vs. Unattended Execution: Don’t Mix Up /boost and /goal

Both commands sound heavyweight, so newcomers often confuse them—yet they solve completely different problems: /boost solves “cannot think deep enough,” while /goal solves “stops too early.”

1. /boost: Heavy Artillery for Problems Standard Reasoning Cannot Crack

Even with --effort dialed up, a regular session still pushes forward along a single reasoning thread. Standard mode tends to spin in circles on:

  • Intermittent deadlocks, race conditions, and corrupted async state machines;
  • Root-cause analysis across tightly coupled modules (fixing unit test A quietly regresses module B);
  • Deep profiling and trade-off analysis for algorithm, SQL, or rendering bottlenecks.

/boost (available on Paid plans) invokes a multi-agent deep-reasoning pipeline: it decomposes the problem for deeper exploration, cross-examines candidate approaches from multiple angles, and runs stricter verification.

The trade-off is straightforward: longer latency and noticeably higher token consumption than standard sessions. Treat it as a specialist tool rather than a default gear—never burn /boost on routine CRUD, styling tweaks, or boilerplate unit tests. Switch to it selectively when standard mode fails to find the real root cause after two rounds, or when you know up front that a core change carries high risk.

2. /goal: Long-Running Autonomous Mode That Rewrites Stop Conditions

In normal chat, the Agent has a natural bias toward stopping early: after editing a batch of files, running half the tests, or hitting a minor error, it politely hands control back—*”I’ve updated the first two modules; would you like me to fix this failure next?”* That is fine while you are watching the screen, but frustrating if you want to step into a one-hour meeting or leave a full migration running overnight.

/goal <objective> changes that stopping rule:

  • Whenever the Agent tries to end a turn prematurely, the runtime intercepts it and demands real execution evidence (test exit codes, build logs, file contents, or page checks) against every requirement—if anything is still unmet, it keeps debugging, editing, and re-testing until all criteria actually pass;
  • Only one active goal is allowed per session—starting a new /goal automatically cancels the previous one;
  • To stop early at any time, press Esc to interrupt, tell the Agent in plain text to cancel the current goal, or click Stop in the UI.

/goal does not bypass your existing permissions or terminal sandbox settings. The official docs call this out explicitly: if you are still in per-command approval mode, or if a command needs to exit the sandbox for network access, the Agent will still pause on the approval prompt waiting for you. Leaving a job overnight only to find it stalled on a permission dialog at minute three is the most common wasted run. Before launching a long goal, confirm the workspace can run self-contained inside the sandbox (for example, auto mode with all test dependencies available locally).

Also, /goal has no hard cap on iteration turns. If your objective is vague (such as /goal optimize the entire backend), the Agent will either spin in loops burning quota or rewrite modules it had no business touching. To make a /goal prompt rock-solid, include four elements:

  1. Clear definition of done: Which exact files, functions, or behaviors must be delivered to count as complete;
  2. Execution cadence: Instruct it to migrate one small slice and verify before touching the next, rather than stacking fifty edits into one giant breakage;
  3. Hard boundaries: Which directories, public APIs, database schemas, or dependency versions are strictly off-limits;
  4. Machine-verifiable criteria: Pin exact commands that must exit with code 0 (tests, typecheck, lint, build)—no subjective sign-off.

Here is the template I copy directly for unattended runs:

1
2
3
4
5
/goal Refactor all synchronous state updates under src/orders/ to an event-driven flow. Complete only when all criteria below pass:
1. Scope & done: Only edit src/orders/ and tests/orders/, and add unit tests covering state transitions;
2. Execution cadence: Run the matching unit tests after migrating each submodule, and proceed only after they pass;
3. Hard boundaries: Do not modify external API response fields, database migration files, or package.json dependencies;
4. Acceptance criteria: `pnpm test tests/orders`, `pnpm typecheck`, and `pnpm lint` all exit 0, and `git diff --stat` shows no unrelated file changes.

Reviewing a /plan first and then handing these four elements to /goal improves completion reliability by an order of magnitude compared to launching blind.

3. Three Other Specialized Commands at a Glance

  • /teamwork (Paid plans): When a task outgrows a single /goal thread—such as a repo-wide framework upgrade or migrating dozens of modules in parallel—use it to spin up a multi-agent team. The lead Agent interviews you to lock boundaries, creates isolated workspaces, splits work across parallel builders and critics, and pulls you in at milestones.
  • /schedule: Use when you need “check the CI pipeline result in 10 minutes” or “inspect background logs every 30 minutes.” Backed by one-shot timers or recurring cron triggers, so you never have to block a terminal with shell sleep loops.
  • /browser: Hand frontend changes or UI bug investigations directly to the browser subagent so it can open pages, drive interactions, and inspect console and network logs—no more pasting screenshots back and forth by hand.

4. The Most Underrated Feedback Loop: Turn Pitfalls into Durable Rules with /learn

The most annoying thing when coding with an agent is rarely its first mistake—it is opening a fresh session two days later and watching it step into the exact same trap: forgetting the required env var for legacy unit tests, reformatting untouched files, or reaching for a library your team deprecated months ago.

Many people try to solve this by hand-maintaining a massive AGENTS.md, which quickly goes stale and gets abandoned. Antigravity builds a lightweight feedback loop right into the CLI: /learn.

Execution flow of /learn from debugging pitfall to persisted Rule or Skill

Per antigravity.google/docs/commands/learn, /learn does not blindly paste your last complaint into a config file. It follows a strict four-step pipeline:

  1. Two invocation modes:
    • Run bare /learn right after untangling an environment quirk or correcting the Agent mid-thread;
    • Or pass an explicit instruction: /learn Always pass --pool=forks when running vitest in this repo, otherwise CI runners OOM.
  2. Traces the conversation for turning points: When run without arguments, it scans recent turns for correction signals (such as “no”, “use this instead”, or “still failing”), diffs failed attempts against the final working fix, and distills the actual root cause and remedy instead of dumping a blow-by-blow transcript.
  3. Auto-classifies and prefers updating existing files:
    • A standing guardrail, naming convention, environment constraint, or pitfall ban → saved as a Rule;
    • A reusable multi-step procedure with specific command flags → saved as a Skill (backed by SKILL.md).
    • Better yet, it explicitly prefers updating an existing Rule/Skill file (such as appending a missing edge case or fixing a stale flag) instead of spawning duplicate files every time.
  4. Drafts a Proposal first; writes only after your approval: This is the safeguard that makes /learn genuinely trustworthy—it never silently rewrites your config behind your back. It presents a readable Proposal showing which file it plans to edit, the exact lines to add or modify, and why it is worth persisting, then waits for your confirmation. If the conversation contains no reusable takeaway, it simply says there is nothing worth recording and exits.

A high-leverage habit: Whenever you spend more than 10 minutes helping the Agent work through an environment quirk, build flag, or unwritten team convention, **do not rush to /clear**—run /learn first. Spending 20 seconds to approve the Proposal saves every future session in that repository from repeating the same mistake for months.


5. Daily Command Playbooks & Pitfalls

Mapped back to a real workday, these commands boil down to four repeatable routes:

Scenario Recommended Command Chain Core Goal
Clear small edit / writing unit tests Run directly in auto mode Zero ceremony, fastest feedback loop
Medium-to-large feature with fuzzy requirements /grill-me → /compact → /plan → Execute Eliminate rework before editing line one
Well-scoped, time-consuming batch refactor /plan → /goal (with 4-part criteria) Approve the plan once, then run unattended with self-checks
Stubborn low-level bug stuck for 2+ turns /boost → follow up with /learn once fixed Isolate the root cause from multiple angles, then prevent recurrence

Finally, four pitfalls I have either hit myself or seen teams trip over—avoiding them saves both time and quota:

  1. Do not treat /boost as an always-on turbo button: It is not a free intelligence upgrade. Turning /boost on for small edits buys slower turnaround and higher quota burn with little upside. Start with standard mode and a sensible --effort level; escalate to /boost only when genuinely stuck.
  2. Leaving hard boundaries and exit-code checks out of /goal invites drift: Without stating what is off-limits and which commands must exit 0, an unattended loop can take shortcuts—deleting failing tests, downgrading dependencies, or endlessly refactoring unrelated code.
  3. Custom Skills also register as /<skill-name>—watch for name collisions: Every Skill in your project or global directory is exposed directly as a slash command (run /skills to list everything loaded). Avoid naming Skills plan, goal, learn, compact, config, or resume so they do not shadow or conflict with built-in commands.
  4. Disable slash expansion in headless -p scripts: When automation pipes user input, PR descriptions, error logs, or git diff into agy -p, any line that happens to start with /plan, /learn, or a custom /<skill-name> could be expanded unintentionally. Pass --disable-slash-commands (or set "disableSlashCommands": true in a dedicated settings file) to lock piped input strictly to plain text.

Series Navigation