Where the repeated typing actually happens
Open a Claude Code session on a real repository and watch the first exchange. The same sentences come back every time: explain this file before touching it, run the tests after every change, follow the style of the neighbouring module, keep the answer short, leave the lock file alone. None of these lines is hard to type. The problem is that you keep typing them.
Repetition falls into three buckets, and each bucket has a different correct home. Mixing the buckets is why some teams end up with a commands folder nobody opens and a memory file that reads like a novel.
- Session habits: how you want the agent to behave during one conversation, such as starting clean, compressing context, or switching to a different model.
- Task recipes: prompts you reuse for one kind of work, such as adding a test, writing a changelog entry, or reviewing a diff against the team rules.
- Repository rules: facts that are always true here, such as the build command, the folder layout, and the naming conventions.
The comparison in this lap places every approach against those three buckets, so the choice at the end is obvious rather than a matter of taste.
Built-in commands that replace the prompts you type every session
Claude Code already ships with slash commands for session habits, so those prompts never need to be hand-written again.
- /clear stands in for the long reset paragraph at the top of a new task, and it keeps unrelated context out of the current work.
- /compact replaces the plea to summarise the conversation so far and carry only the decisions forward.
- /init replaces the instruction to inspect the repository and document the build, the test command, and the layout.
- /model replaces the sentence where you ask for a different model per task, for example dropping to Claude Haiku 4.5 for mechanical edits and moving up to Claude Opus 5.5 for a difficult refactor.
- /resume replaces the explanation of what you were doing last time, because the previous session is still there.
- /config and /help replace the discovery questions about settings and available commands.
Placed beside typed prompts, the built-ins win on session habits: they are short, they are consistent, and they exist in every project without setup. Their limit is that their behaviour is fixed. A built-in command cannot know that your test script has a particular name, that review comments must reference the rule they came from, or that a changelog entry has a fixed shape. That is where custom commands take over.
Custom commands beside CLAUDE.md, one comparison and two jobs
Custom commands are markdown files. Project commands live in .claude/commands and travel with the repository, while personal commands live in ~/.claude/commands and follow you between projects. The file body becomes the prompt, $ARGUMENTS holds whatever you pass after the command name, and frontmatter can carry a description and an allowed-tools list so the command opens with exactly the permissions the task needs.
CLAUDE.md works differently: it is loaded into context automatically, so its guidance applies to every turn without being called. Side by side, the division of labour is easy to see.
- Trigger: a custom command runs when you call it and can be aimed at one file or one argument, while CLAUDE.md is present in every turn of every session in the repository.
- Arguments: commands accept $ARGUMENTS, so one file can handle a whole family of tasks; CLAUDE.md cannot take arguments.
- Change cadence: conventions change rarely and task recipes change often, so the stable material belongs in CLAUDE.md and the evolving material belongs in commands.
- Context weight: CLAUDE.md travels with the conversation as it grows, so keep it short and factual; commands add their weight only when you invoke them.
- Sharing: both can be committed for the team, and personal commands in your home directory stay yours alone.
The practical rule is this: anything you would tell a new colleague on their first morning goes in CLAUDE.md, and anything you would paste into the prompt for a specific kind of task becomes a command. A small set of well-named commands beats a large catalogue, because you will only call what you can remember when the pressure is on.
Hooks and small shortcuts in the same comparison
Hooks belong in the comparison because they remove typing by removing the step. A hook is a script that runs on a defined event, such as before a tool call, after a tool call, or when the agent stops. You write the rule once and it holds whether or not you remembered to ask.
- Automatic versus manual: a hook fires on its event every time, while a command fires only when you call it.
- Deterministic versus judgement: hooks suit checks and formatting that have one correct answer, while commands suit instructions where you still want to steer the wording.
- Failure behaviour: a hook can block a tool call that breaks a rule, and a command can only ask nicely in a prompt.
- Maintenance: a hook needs a script and a place to run it, while a command is a markdown file you can read and edit in the repository.
Three smaller shortcuts also cut repeated typing. The ! prefix runs a shell command in the session and folds its output into the conversation, so you stop narrating the command you just ran. The @ mention pulls a file in by name instead of asking the agent to find it. The # prefix writes a fact into memory, which is the right place for a preference you would otherwise retype forever.
The checklist before the green light
Here is the recommendation, stated plainly. Make custom slash commands the backbone of your setup, keep CLAUDE.md short and stable, let hooks carry the mechanical checks, and rely on the built-ins for session hygiene. That order works because it puts the tools you call most often in the files you edit most often, while the always-on guidance stays small enough to read in one sitting.
- Write three to five commands for the tasks you repeat most, and give each one a name you can type without thinking.
- Add $ARGUMENTS to the commands that take a file, a ticket, or a scope, so one command covers many cases.
- Trim CLAUDE.md to the facts that are true in every session, and move anything procedural into a command.
- Add one hook for the rule you keep forgetting to ask for, such as running the test script after a change or blocking an edit to a locked file.
- Use /clear at task boundaries and /compact when the conversation grows long, instead of typing reset prompts.
Once the commands are in place, the model behind them matters less than you might expect, because the instruction quality is doing the work. For quick mechanical calls you can point a command at Claude Haiku 4.5 and reserve Claude Opus 5.5 for the tasks that deserve it, which keeps a pay-as-you-go setup honest about where each token goes.
That is also where SwiftRelay fits. It is a pay-as-you-go relay for Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok and other models, it works with Claude Code, Codex, Gemini CLI and any OpenAI-compatible SDK, and billing is per token. Point Claude Code at the bare host api.fastapirelay.com, and add /v1 when you use an OpenAI SDK. New accounts get a small gift credit, and inviting friends earns 14% of their top-ups. Sign up for a SwiftRelay account, drop your first command into .claude/commands, and let the repeated typing stop there.