← All guides

Guide

Hermes Agent Coding Workflow: From Prompt to Working Code

A repeatable loop for building code with Hermes Agent: write a prompt it can build from, get a plan, build and test in small steps, and save every working step. Plus when to hand a big project to Claude Code or Codex.

Checked on 12 October 2026 against Hermes Agent 0.21.5, the version hosted bots run.

The short version

  1. Prompt: describe the goal, the stack, and what "done" means.
  2. Plan: have Hermes write a plan and wait for your OK.
  3. Build: one small step at a time.
  4. Test: run the tests after every step.
  5. Commit: save each working step to git, then repeat from step 3.

Hermes can do all of this on its own box. A hosted Hermes bot has git, Node.js, npm, Python and uv installed, a terminal it can run commands in, and file tools to read and edit code. What makes the result good or bad is mostly the loop around it, which is what the rest of this guide covers.

Pick the right lane for the project size

ProjectWhere to run itWhy
Small: a script, a fix, one featureHermes chatFast, works from your phone, no setup
Medium: a small app, a few dozen filesHermes chat + a GitHub repoThe repo keeps history and lets you review every change
Large: a big existing codebase, long sessionsA Coding Harness with Claude Code or CodexThose tools are built for deep multi-file work, and you can use your own subscription

Step 1: Write a prompt Hermes can build from

Vague prompts get vague code. Give Hermes four things: the goal, the stack, a checkable definition of done, and the constraints. The last line matters most: asking for a plan first stops it from writing 400 lines in the wrong direction.

Goal: a small web app where I paste a list of URLs and get back
each page's title and status code.

Stack: Python 3 + FastAPI, plain HTML front end, no database.

Done when:
- GET / shows the form, POST /check returns a table
- bad URLs show an error row instead of crashing
- tests in tests/ pass with: pytest -q

Constraints: keep it in one repo folder called url-checker,
no paid APIs, explain any new dependency before adding it.

Start with a plan. Do not write code until I approve it.

For an existing project, ask Hermes to scan the repo and write an AGENTS.md file in its root folder with the project's conventions: how to run it, how to test it, and what not to touch. Add your own rules too, such as "never edit generated files" or "run lint before every commit", and at the start of each new chat ask Hermes to read that file first.

Step 2: Get a plan with /plan

Send /plan followed by the task. Hermes looks around with read-only commands, writes a markdown implementation plan into .hermes/plans/, and does not change any code. Read it, push back on anything you disagree with, and only then say "go ahead with step 1". Fixing a plan costs one message; fixing the code it would have produced costs many.

Slash commands work in any chat app connected to your bot, such as Telegram or Discord.

Step 3: Build in small steps and test each one

Ask for one step of the plan at a time, and ask Hermes to run the tests at the end of each step and show you the result. If the project has no tests yet, make "write a test for this" part of every step. Hermes ships with a test-driven-development skill that follows exactly this pattern: write a failing test, make it pass, then clean up.

When you trust the direction and want Hermes to keep going on its own, use /goal with a clear finish line, for example /goal all tests in tests/ pass and the README explains how to run the app. Hermes keeps working across turns until it judges the goal met. By default a goal gets 20 turns; if it runs out or gets stuck, it pauses and tells you why. Use /goal status to check on it, /goal resume to continue a paused goal, and /goal clear to cancel it, after which Hermes stops once its current turn finishes.

For work that splits cleanly, such as front end and back end, or three independent bug fixes, ask Hermes to use sub-agents. It can run several in parallel and only shows you their summaries.

Step 4: Save every working step to GitHub

Git is your undo button. Ask Hermes to commit after each step that passes its tests, with a message that says what changed. Then a bad step costs you one git revert, not an afternoon.

  1. Create a repo on GitHub for the project.
  2. Create a fine-grained token at github.com/settings/personal-access-tokens, limited to that one repo, with read and write access to Contents.
  3. Tell Hermes the repo URL and give it the token. Its built-in github skill walks through the git setup.
  4. From then on, ask it to push after each commit, and review the diffs on GitHub when you want a closer look.

Note that /undo only rewinds the conversation. It does not change files on disk, which is another reason to rely on git.

Step 5: Debug and review

When something breaks, paste the full error and ask Hermes to find the cause before it changes anything. Its systematic-debugging skill makes it reproduce the bug, find the root cause, and only then fix it, instead of trying random changes. Before you call a feature done, ask for a review of the changes since the last release; the requesting-code-review skill covers that. Other built-in skills worth knowing are spike for quick throwaway experiments, simplify-code for cleanup, and codebase-inspection for getting oriented in an unfamiliar repo.

If a session gets long and Hermes starts losing track, send /compress to summarise the conversation and free up context, or start a fresh chat and point it at the repo and plan file.

Large projects: hand them to a Coding Harness

For a big existing codebase, Claude Code and Codex are the better tools. A Coding Harness is a separate cloud box with Claude Code, Codex, OpenCode, Aider and other coding CLIs installed. You sign in with your own Claude or ChatGPT subscription, the same way you would on your laptop, and your code and logins persist across resets.

  1. On the dashboard, open the Coding tab on the deploy card, pick an agent and create the box. It counts as one instance on your plan.
  2. Click Open Terminal on its card and sign in to the CLI you picked.
  3. Clone your repo and work as you normally would with that tool.
  4. Optional: click Telegram on the card to give the box its own Telegram bot, so you can start runs from your phone.

A setup that works well: Hermes researches, writes the plan and the issue list, and handles small fixes; the harness does the large edits; both push to the same GitHub repo.

Pick a model that can code

The model matters more for code than for chat. Small models handle a single function fine but lose the thread on multi-file changes. Use the strongest model you have access to from your bot's model picker. If you have an Ollama Cloud subscription, connect it with the Ollama Cloud key guide and pick one of the larger models. On 12 October 2026 Ollama listed coding-capable options such as kimi-k2.7-code, kimi-k3 and glm-5.3.

Useful commands

CommandWhat it does
/plan <task>Writes a markdown plan to .hermes/plans/ without changing any code
/goal <text>Sets a standing goal Hermes keeps working on until it is met or its turn budget runs out
/undoRewinds the last turn of the conversation and lets you re-prompt
/retryResends your last message
/compressSummarises a long conversation to free up context

Using OpenClaw instead

The same loop works on an OpenClaw bot. OpenClaw can also run commands, edit files and use git, and it ships with github, coding-agent and spike skills. The commands above are Hermes commands, so on OpenClaw ask for each step in plain words. See OpenClaw + GitHub for the repo setup.

Frequently asked questions

Does this workflow work on OpenClaw bots?

Mostly, yes. OpenClaw bots can also run commands, edit files and use git, and they ship with GitHub and coding skills. The slash commands in this guide (/plan, /goal, /undo) are Hermes commands, so on OpenClaw ask for the same steps in plain words: "write a plan first and wait for my OK", "run the tests after each step".

Should I use Hermes or Claude Code / Codex for coding?

Use Hermes for small and medium tasks you want to drive from chat, including from your phone. For a large codebase or long sessions, Claude Code and Codex are built for that job, and you can run them in a Coding Harness with your own Claude or ChatGPT subscription. Many people use both: Hermes for planning, research and small fixes, the harness for the heavy edits.

Where does Hermes keep the code it writes?

In your bot's own storage, which persists across restarts. Open the Files button on your bot's card on the dashboard to browse or download it, or the Terminal button to look around yourself. For anything you care about, push it to a GitHub repo so it lives somewhere you control.

Which model is best for coding with Hermes?

The strongest model you have access to. Code quality drops quickly on small models, especially on multi-file changes. With your own Ollama Cloud key, pick one of the larger models rather than the free starter ones. You can switch models from your bot's model picker at any time.

How do I undo a change Hermes made?

Use git. If every working step is committed, you can always ask Hermes to "revert the last commit" or go back to a known-good one. /undo only rewinds the conversation, not the files on disk.

Related guides

Get a hosted Hermes bot

Deploy Hermes Agent in under a minute and start your first coding task from chat.

Deploy Hermes