An extra reviewer that never takes the wheel.

Hammer reads the diff and the pull-request checkout with a small set of read-only tools, checks its own findings, and leaves one review with inline comments plus a summary. It never edits files, runs your code, pushes, approves, or merges.

Read-only by design

The reviewer can read files, search, and see the diff. It cannot write, execute, push, approve, or merge.

Few, checked comments

A verification pass scores every candidate against the code and drops weak or out-of-diff findings before they post.

Incremental by default

Each push reviews only new changes, does not repeat earlier findings, and resolves threads whose code was fixed.

Your key, your runner

Anthropic, OpenAI, Gemini, Azure OpenAI, or any compatible gateway. Your code goes only to the model provider you configure.

Read-only is not a setting you can loosen.

The reviewer can read files, list directories, search, see the diff, and read the PR discussion. That is the whole tool set. There is no shell, no package install, no network tool, and no path outside the checkout.

Attacker-controlled

Untrusted input

PR title, body, comments, filenames, and file contents are treated as data, never as instructions.

untrusted data

Read-only reviewer

A scoped PR-head checkout with hooks disabled and config read from the base branch.

read-only toolsbase-branch configsecret-scanned output
review comments only
  • One review

    Inline comments anchored to changed lines, plus one summary for the run.

  • No side effects

    No file edits, command execution, package installs, pushes, approvals, or merges.

  • Narrow token

    Contents read and pull requests write; optionally statuses write for comment-triggered reviews.

Pull requests from forks are not reviewed automatically by the default workflow, because they do not receive repository secrets. A maintainer can run /hammer review instead.

It checks its own findings before you do.

The first pass produces candidate findings. A second pass reopens the code, confirms the trigger, relocates the lines, and scores each finding from 0 to 10. Anything below the threshold never becomes a comment.

  1. 01

    Review

    Read the diff and the surrounding code with read-only tools.

  2. 02

    Verify

    Re-open the code, confirm the trigger, and score each finding from 0 to 10.

  3. 03

    Post

    Keep verified, in-diff findings as one review with inline comments and a summary.

  4. 04

    Next push

    Review only what changed, suppress repeats, and resolve threads whose code was fixed.

  • Scores, not confidence

    A finding below verify_threshold is dropped, even if the reviewer was confident about it.

  • No duplicate noise

    Fingerprints ignore line numbers, so code moving by ten lines does not repost the same finding.

  • Threads close when fixed

    Threads whose flagged lines changed and whose finding was not reported again are resolved on the next run.

A review that reads like a review.

One high-severity finding, anchored to the line that caused it, with the fix in context. Everything else stays in the summary, so the diff remains readable.

https://github.com/acme/api/pull/128/files
acme/apiPublic
WatchFork 84Star 2.1k

Pull requests / #128

Retry webhook delivery with backoff Open

maya wants to merge 4 commits into main from webhooks/retry

Reviewed
hammer[bot] reviewed just now
2 findings

Hammer Review · 2 findings (1 high)

  • Highsrc/webhook/client.ts:88Retries a non-idempotent POST without an idempotency key
  • Mediumsrc/webhook/client.ts:120Backoff has no upper bound
Reviewed 7 files at a1b2c3d · skipped 2 · claude-sonnet-5-5 · 41k tokens · $0.09
src/webhook/client.ts+18 −4
@@ -84,7 +84,13 @@ export async function deliver(event: WebhookEvent) {
  1. 8484export async function deliver(event: WebhookEvent) {
  2. 8585 const headers = { 'content-type': 'application/json' }
  3. 86 for (let attempt = 1; attempt <= 3; attempt++) {
  4. 87 await post(url, event, { headers, attempt })
  5. 88 }
  6. 8689}
  7. hammer[bot] just now
    High · correctness

    Retries a non-idempotent POST without an idempotency key. A timeout after the server commits will deliver the webhook twice.

    headers: { ...headers, 'Idempotency-Key': event.id },
    Verified 9/10Rule: webhooks-idempotentHammer
@@ -118,4 +124,7 @@ async function backoff(attempt: number) {
  1. 118124 return 1000 * 2 ** attempt
  2. 125 // retry immediately after a provider timeout
1 earlier thread resolved after its flagged lines changed.

Illustrative review with sample data. Posts as github-actions[bot] by default, or as hammer[bot] through the hosted platform.

Your rules, in your repository.

.github/hammer.yml holds rules, path instructions, ignores, severity thresholds, and review limits. Hammer reads it from the base branch, so a pull request cannot change the rules that review it. It also reads AGENTS.md, CLAUDE.md, and CONTRIBUTING.md as guidance.

.github/hammer.yml
1min_severity: medium2max_comments: 103fail_on: none4ignore:5  - "**/*.snap"6  - "docs/generated/**"7rules:8  - id: no-raw-sql9    text: Queries must go through the db helper, never string-built SQL.10path_instructions:11  - path: "src/api/**"12    text: Check that every handler validates input and returns typed errors.13verify: true14verify_threshold: 6
  • Base branch wins

    Config and repository guidance come from the base branch, not from the pull request under review.

  • Rule ids show up

    A finding that cites a house rule names its id in the comment, so the rule stays traceable.

  • Gate on purpose

    Set fail_on: high to fail the job and let branch protection block the merge.

Your key. Your runner. Your code path.

Hammer runs inside your GitHub Actions workflow with the model key you already have. Your code is sent only to the model provider you choose, and Hammer collects no telemetry.

Model clients

  • Anthropic
  • OpenAI
  • Gemini
  • Azure OpenAI
  • OpenAI-compatible

Any Linux runner

A bundled Node 24 action on GitHub-hosted, Blacksmith, or self-hosted Linux, x64 and arm64.

Visible spend

Every run reports tokens and, when pricing is known, cost. Add token or cost limits when you want a hard stop.

One outbound path

Your code goes only to the configured model provider. There is no Hammer telemetry.

Post as hammer[bot] without building an App.

The optional hosted platform issues a short-lived GitHub App token, scoped to one repository, so Hammer can post as the bot. A repository admin signs in with GitHub, installs the Hammer App, and registers the repository. The platform never sees your code or your model key.

Your runner · your key

Your workflow

Runs the Action with your model key and an optional repository key.

repository key

Token broker

Verifies the repository registration, then mints one short-lived installation token.

GitHub Appone repositoryshort-lived
installation token
  • hammer[bot]

    The review is attributed to the Hammer App instead of github-actions[bot].

  • Rotate a key

    Regenerate from the console; the old key stops working immediately.

  • No App to build

    You do not create, install, or maintain a GitHub App yourself.

Optional. Without a key, Hammer reviews with the workflow token and posts as github-actions[bot].

One workflow file. Then open a pull request.

Add a model key as a repository secret, add the workflow, and let Hammer review the next PR. The bot identity and repository rules are optional.

  1. 01

    Add your model key

    Store ANTHROPIC_API_KEY, OPENAI_API_KEY, or the key for the provider you use as a repository secret.

  2. 02

    Add the workflow

    Use anvia-hq/hammer@v1 with client, model, and api-key. No checkout step is needed.

  3. 03

    Optional: post as Hammer

    Install the Hammer App, register the repository, and pass its key as hammer-api-key.

  4. 04

    Open a pull request

    Hammer reviews it. Add the command trigger to re-run a review with /hammer review.

.github/workflows/hammer-review.yml
1name: Hammer Review23on:4  pull_request:5    types: [opened, synchronize, reopened, ready_for_review]67permissions:8  contents: read9  pull-requests: write1011jobs:12  review:13    concurrency:14      group: hammer-review-${{ github.event.pull_request.number }}15      cancel-in-progress: true16    runs-on: ubuntu-latest17    timeout-minutes: 3018    steps:19      - uses: anvia-hq/hammer@v120        with:21          client: anthropic22          model: claude-sonnet-5-523          api-key: ${{ secrets.ANTHROPIC_API_KEY }}24          hammer-api-key: ${{ secrets.HAMMER_API_KEY }}

The workflow guide adds the issue_comment trigger for /hammer review, /hammer review <focus>, and /hammer help. Commands need write access to the repository.

v1, in the open.

Hammer is dogfooded on its own repository and has run live reviews on GitHub-hosted Linux x64. A first 31-case synthetic evaluation passed its automated metric gate. Human review of review quality, the full evaluation corpus, and wider runner acceptance are still open.

Hammer is AGPL-3.0. The hosted token broker is a separate, private service.

Anvia