L
o
a
d
i
n
g
.
.
.
https://michele.zonca.org

ai

The /goal command in Claude Code

By Michele Zonca

#ai

#tools

#claude-code

16 May 2026

1 minutes to read

May 16, 2026

Claude Code has a /goal slash command that lets you state a high-level objective at the start of a session. The idea is straightforward: instead of asking Claude to do one thing at a time and hoping it infers the broader context, you tell it upfront what you are ultimately trying to accomplish.

The difference shows up in how Claude frames its responses. Without a goal, it responds to each request in isolation. With one set, it tends to flag when a step you are asking for is in tension with the larger objective, or suggest an approach you did not ask for but that fits better. It is closer to the way a collaborator works than a command executor.

I have found it useful in two situations. The first is long refactoring sessions where individual steps are easy but the direction matters. Telling Claude “the goal is to remove the ORM dependency from the data layer” means it treats each file edit in that context, rather than just executing whatever I ask. The second is when I am exploring an unfamiliar codebase with a specific question in mind. Setting a goal lets me ask vague questions without losing the thread.

The mechanic is simple: type /goal followed by a plain description of what you want to end up with. No special syntax. Claude acknowledges it and proceeds. You can update it mid-session if your intent shifts.

It is a small feature, but it improves how I structure sessions. The instinct when using a coding assistant is to issue commands: do this, change that, fix this. A goal statement asks a different question first: what am I actually trying to achieve?