← All tips
FREEClaude Code workflow

Loop Engineering guide

Neo ZinoBy Neo Zino - builder of ClockedCode2 min readJul 3, 2026
Example of the Claude Code /goal command: /goal add CSV export to the reports page. Add an Export button that downloads the current filtered rows as a .csv, with a loading state and an error toast on failure. Done when npm run build, npm run lint, and the new reports.test.ts all pass, and clicking Export in the app downloads a CSV matching the on-screen rows. Keep fixing until every one of these is true. Annotated in four parts: /goal is the command that runs the loop; "add CSV export to the reports page" is your goal, in plain words; the Export button, .csv download, loading state, and error toast are the steps to take; and the block starting "Done when" is the finish line, the set of checks that must all pass before it ships.
EXAMPLE · THE /goal COMMAND
> /goal add CSV export to the reports page. Add an Export button that downloads the current filtered rows as a .csv, with a loading state and an error toast on failure. Done when npm run build, npm run lint, and the new reports.test.ts all pass, and clicking Export in the app downloads a CSV matching the on-screen rows. Keep fixing until every one of these is true.
/goal
the command that runs the loop
add CSV export to the reports page
your goal, in plain words
Add an Export button ... an error toast on failure
the steps to take
Done when ... every one of these is true
the finish line: what must be true to ship

Then /goal loops on its own, fixing its own mistakes, and a separate check decides when the goal is truly met, so it will not stop early or fake done.

Normal vibe coding is a babysitting loop. You prompt your AI, it makes a mistake, you re-prompt it, it fixes that and breaks something else, and you go back and forth like this over and over, watching every step. You are the loop. The moment you stop typing, the work stops.

Loop engineering flips that around. Instead of driving each step, you hand the AI one clear goal and a clear finish line, then let it run: it works, checks its own result, fixes its own mistakes, and repeats until the finish line is true. The term was coined by Addy Osmani, and it is how the people building these tools now describe their own workflow. As Boris Cherny, the creator of Claude Code, put it: "I don't prompt Claude anymore. My job is to write loops." It does not replace good prompting, it is a layer on top of it.

In Claude Code you do not have to wire that loop up by hand. The /goal command is the loop: you type /goal followed by one clear objective, and Claude keeps working and fixing its own mistakes until that objective is met, without you re-prompting between steps. The example above points to the parts: the /goal command that runs the loop, your goal in plain words, the steps you want it to take, and the finish line it can actually check.

The one rule that makes or breaks it is that finish line. It has to be objective and machine-checkable, not a vague wish, because /goal has a separate check decide when the objective is truly met. "Make it better" gives it nothing to verify against, so it never knows when it is done. A build passing is a weak finish line on its own, it only proves the code compiles, not that the feature works. The strong ones stack several checks and include real behavior: build and lint clean, the new tests pass, AND the thing actually does what it should when you run it. The more of the finish line the loop can run itself, the closer it gets to genuinely ship-ready before it hands back.

A few goals that work well: "add CSV export to the reports page, done when npm run build, npm run lint, and the new reports.test.ts all pass and clicking Export actually downloads a CSV matching the rows on screen", or "the failing test in auth.test.ts passes without breaking the others, done when npm test shows zero failures". Each one is a finish line Claude can run, not a vibe it has to guess at. Keep the objective that concrete and /goal mostly takes care of the rest.

Free tools

Reference

Cheat Sheet

Every Claude Code slash command, keyboard shortcut, hook event, and CLI flag in one searchable page, checked against the version installed right now.

Try tool
Config generator

Hooks Preset Generator

Pick the automations you want, and get a validated Claude Code hooks block for settings.json, grouped and merged the same way the official examples are.

Try tool
Config generator

Permissions Generator

Pick a safe starting mode and your OS, and get a validated allow/deny permissions block for settings.json in under a minute.

Try tool
Config generator

Output Style Generator

Pick a persona and a tone, and get a valid output-style file with correct frontmatter, ready to save and switch to.

Try tool
Config generator

Subagent Generator

Describe the job in plain English, pick a specialty, and get a complete subagent file ready to save.

Try tool
Config generator

MCP Config Generator

Pick the MCP servers you use and get the exact claude mcp add commands or a ready .mcp.json block, scoped and copy-pasteable.

Try tool
Config generator

Slash Command Generator

Answer 7 quick questions and get a custom Claude Code slash command with valid frontmatter, ready to drop into .claude/commands/.

Try tool
Config generator

Statusline Generator

Toggle the segments you want, watch the exact statusline render live, then copy the tested script and settings.json block.

Try tool
Config generator

settings.json Generator

Pick permission rules, hook presets, env vars, and a model override one step at a time, then copy or download the finished settings.json.

Try tool
Config generator

CLAUDE.md Generator

Answer 7 quick questions, get a tuned CLAUDE.md for your project in 30 seconds.

Try tool
Template library

Claude Code Templates

A curated library of copy-paste Claude Code templates: subagents, hooks, slash commands, settings, and CLAUDE.md starters, each one explained and pulled from a setup that gets used every day.

Try tool
Token scanner

UsageCut

Scan your Claude Code setup in 30 seconds and see exactly what is burning your tokens - bloated context, heavy MCP servers, and settings quietly draining your usage limits.

Try tool

About ClockedCode

What is ClockedCode?

A dashboard with the full curated stack - MCP servers, skills, hooks, settings, subagents, and a tuned global CLAUDE.md - plus a generator that compiles your selections into one master prompt you paste straight into Claude Code.

Who is it for?

Anyone who already uses Claude Code. You check a few boxes and paste a prompt - no scripting, no config spelunking, no terminal gymnastics required.

Which tools are in the stack?

A hand-picked set across three jobs - tools for writing better code, tools for connecting your tools, and tools for checking your work. Every one is something I actually run day to day - curated, never padded to hit a number.

One-time really means forever?

Forever. One payment unlocks lifetime access, and updates ship to you free as the ecosystem changes. No renewal, no surprise upsell.