The Hermes Agent Cookbook
Free recipes / Tools, MCP and Automation

A Code Review Skill for Hermes Agent

A skill that reviews uncommitted changes or a branch diff in a git repository and reports bugs, risks and missing tests by severity, without editing a single file.

You write code with or without Hermes and want a consistent second pair of eyes before you commit, merge or deploy. Saves about 30 minutes

The recipe

--- name: code-review description: Review uncommitted changes or a branch diff in a git repository and report bugs, security risks and missing tests by severity, without editing files. Use when the user asks to review code, check a diff, look over a branch before merging, or asks whether changes are ready. version: 1.0.0 metadata: hermes: tags: [code, review, git] category: software-development requires_toolsets: [terminal, file] --- # Code Review ## When to Use - The user wants a review of current changes, a branch or named files in a git repository. - Not for fixing what you find. Offer fixes after the review and wait for a yes. ## Procedure 1. Run `git rev-parse --show-toplevel`. If this is not a git repository, stop and say so. 2. Uncommitted work: `git status` and `git diff`. A branch: `git log --oneline [BASE_BRANCH]..HEAD` and `git diff [BASE_BRANCH]...HEAD`. 3. Read AGENTS.md and any linter or test config, so you judge by this project's rules. 4. For each changed file, read enough surrounding code with read_file to understand callers and edge cases. Never judge a hunk in isolation. 5. Check in this order: correctness and edge cases, error handling, security (input validation, secrets in code, injection, unsafe shell or file use), data loss, tests for the changed behavior, then readability. 6. Give extra attention to [REVIEW_FOCUS]. 7. Run the test command only if AGENTS.md lists it as safe. Otherwise ask first. ## Output - Verdict in one line: ready, ready after small fixes, or not ready. - Findings grouped as Blocker, Should fix and Nit. Each has file and line, what is wrong, why it matters and a short suggested fix. - Missing tests, then anything you did not review. ## Pitfalls - This skill is read-only. Never edit, stage, commit, push, stash or reset. - Never invent line numbers. Quote the code you mean. - Do not report style preferences as bugs. Follow the existing style. - For large diffs, review the riskiest files first and say what you skipped. ## Verification - Every Blocker points at code you actually read in this session. - The verdict matches the findings.

Fill in these brackets

[BASE_BRANCH]e.g. main; the branch your work gets merged into
[REVIEW_FOCUS]e.g. anything that touches payments, user input or database queries

Pro tip

Save it as ~/.hermes/skills/software-development/code-review/SKILL.md and call it with /code-review. Run hermes skills list first: if a built-in or installed skill already uses that name, pick another one so the two do not compete.

Variation

Make a second version for writing instead of code: it reviews a document diff for unclear claims, missing sources and tone, with the same read-only rule and the same three severity levels.

Written for Hermes Agent v0.21.x. Check commands against your version with hermes --version. This site is independent and not affiliated with Nous Research.

Want 14 more like this, free?

Get the Hermes Starter Pack: 15 recipes for setup, SOUL.md, memory, skills, scheduled jobs, Telegram and approvals.

More free recipes: Connect an MCP Server to Hermes Agent · Limit Which Tools an MCP Server Exposes in Hermes

No spam. Confirm your email with one click and the PDF is yours.

Need the whole set? The Hermes Agent Cookbook has 100 recipes for $27.