reviewd CLAUDE.md

A project instruction file describing the conventions, important files, dependencies, and release rules for the reviewd code-review daemon.

In plain words
What is it for?
Use it when working on reviewd, including its command-line interface, review process, configuration, storage, comments, tests, or releases.
Why use it?
It gives an agent the project-specific rules needed to modify or review that code consistently.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/simion/reviewd/claude-md
Clone the repo
git clone --depth 1 https://github.com/simion/reviewd
Per session 798 This file is loaded in full into every session.
When invoked 798 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00798 $0.00798
Opus 5 $0.00399 $0.00399
Sonnet 5 $0.00160 $0.00160
Haiku 4.5 $0.00080 $0.00080

Measured 2d ago against content hash a3652972e5a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

reviewd CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf dist && uv build && uv publish
CLAUDE.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — reviewd

Local AI code review daemon for GitHub/BitBucket PRs. See README.md for full docs.

Project Conventions

  • Python 3.12+, no backward compatibility
  • Dependencies managed with uv
  • Google style, single quotes for strings, double quotes for messages
  • No broad except clauses
  • No unnecessary docstrings or comments
  • Tests only when explicitly asked
  • Never add Co-Authored-By to commits
  • Only commit or release when explicitly asked

Key Files

File Purpose
src/reviewd/cli.py Click CLI: ls, watch, pr, status commands
src/reviewd/daemon.py Poll loop, boot summary, status line, orchestration, signal handling
src/reviewd/reviewer.py Worktree lifecycle + AI CLI invocation (Popen) + JSON extraction
src/reviewd/prompt.py Built-in review prompt template + builder
src/reviewd/commenter.py Format findings as markdown, post via provider, delete old comments by ID
src/reviewd/config.py YAML + ${ENV_VAR} loading, global + per-project merge, provider factory
src/reviewd/state.py SQLite: reviews + posted_comments (with get/delete by repo+PR)
src/reviewd/models.py Dataclasses: PRInfo, Finding, ReviewResult, configs, CLI enum
src/reviewd/providers/base.py Abstract GitProvider ABC
src/reviewd/providers/bitbucket.py BitBucket 2.0 API (httpx, pagination with ID dedup, inline comments)
src/reviewd/providers/github.py GitHub REST API v3 (httpx, Link header pagination, review comments)

Releasing

Publish directly to PyPI with uv publish. No GitHub Releases — gh CLI is not available.

Requires UV_PUBLISH_TOKEN env var (PyPI API token).

# 1. Bump version in pyproject.toml
# 2. Commit and push
git add pyproject.toml && git commit -m "Bump version to X.Y.Z" && git push
# 3. Clean old builds, build, and publish
rm -rf dist && uv build && uv publish

Known Limitations

  • BitBucket markdown doesn't support HTML comments — bot marker uses empty link [](reviewd)
  • Can't git fetch by commit hash from BB — if source branch is deleted, commit must exist locally
  • Claude CLI rejects nested sessions — must unset CLAUDECODE env var in subprocess
  • Gemini CLI loads global extensions by default — use -e none to disable
  • Codex CLI outputs raw JSON (no markdown fences) — extract_json falls back to raw JSON object parsing
  • Inline suggestions are single-line only (TODO: multi-line support)
  • AI may hallucinate line numbers — prompt instructs to double-check but not guaranteed
  • cli: claude_interactive drives an interactive Claude session over a pexpect PTY (no --print, no tmux), to bill against the subscription instead of API credits. The prompt tells Claude to write the review JSON to a temp file via Write + atomic mv; reviewd waits for that file (watching the PTY stream for usage/login errors + an overall timeout). Requires claude logged in via /login; if ANTHROPIC_API_KEY is exported it may still be used. Runs with --dangerously-skip-permissions so Write/Bash run unattended in the worktree.

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 56 lines · 798 tokens per session scan C a3652972e5a4

Subscribe to this mod's changes

reviewd CLAUDE.md is an instructions file published in the GitHub repository simion/reviewd (62 stars, last pushed 2mo ago), licensed MIT. It adds 798 tokens to every session, about $0.0040 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.