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.
npx agentmods add commands/hamr0/liteagents/branch-reviewgit clone --depth 1 https://github.com/hamr0/liteagentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/hamr0/liteagents/branch-review)<a href="https://agentmods.dev/commands/hamr0/liteagents/branch-review"><img src="https://agentmods.dev/badge/commands/hamr0/liteagents/branch-review.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.04690 |
| Opus 5 | $0.00000 | $0.02345 |
| Sonnet 5 | $0.00000 | $0.00938 |
| Haiku 4.5 | $0.00000 | $0.00469 |
Grade A, and why
branch-review scanned grade A with 0 findings 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 today.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to branch-review — 25 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pre-merge review gate. Two stages — general review then a full security audit — followed by an adversarial verify pass. It never edits code: it reports findings and hands them back. Fixing is a separate, separately authorized action.
Only Critical and High findings block the merge. Everything else is
appended to the fix ledger (.factory/remember/fix-ledger.md) — a local,
cumulative list, living beside MEMORY.md, that /refactor (no arguments)
works through between features. Like its neighbours it is a private working
artifact, usually gitignored; it persists across reviews, it is not a
deliverable. The report is blockers plus the ledger count, so a review
converges instead of surfacing fresh nits every run. This command never runs
/refactor itself — it nudges, the way /stash nudges /remember.
Run this before /release. /release will refuse to run without a review
at the current HEAD SHA.
Guardrails
- Spawn a worker and explicitly select your tool's mid tier. State the tier on the spawn — do not omit it and rely on a default. An omitted tier inherits the parent's tier, which is not the same thing as the balanced one. Pick the judgment-capable tier that is cheaper and faster than your top reasoning tier. Not the cheapest/fastest tier: on judgment work it measurably degrades (misclassification rates several times higher). Choose by tier, not by a vendor model name copied from this file — names drift, and this command ships to several tools. Fall back to running inline if your tool has no subagent mechanism.
- Escalate, never assume. Anything you cannot decide, cannot verify, or that this spec does not cover → stop and report it to the orchestrator (the main session). Never improvise, never widen scope, never fix a side issue you noticed along the way.
- The worker does the work itself — no delegation. The review subagent
must not spawn subagents of its own. Everything it reports has to be
something it read, ran, or grepped with its own tool calls: a relayed "I
executed X" from a sub-worker is hearsay, and replacing hearsay with evidence
is the entire point of this command. A review that delegates its work is a
review of a report. (Same rule
/securitycarries inside stage 2.) - No edits — two exceptions. You have no authorization to change code,
even for a finding you are certain about. Report it. The only files you may
write are
.factory/remember/fix-ledger.md(append bullets; never rewrite or delete) and.factory/remember/last-review.md(overwrite; the review record described at the end of this file). - Prove it with two checks, because neither sees what the other does.
git status --porcelain, at start and again before you report, proves no tracked file changed — that is the "never edits code" guarantee, and it is the one that matters. It cannot police your own two writes:.factory/is normally gitignored, so porcelain stays empty whether you wrote the allowed files, wrote nothing, or overwroteMEMORY.md.git status --ignoreddoes not close it either — it collapses to!! .factory/, the directory, not the files. So also takemd5sum .factory/remember/*before you start and again before you report, and show the comparison: onlyfix-ledger.mdandlast-review.mdmay differ.
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.
- today Changed · -3 lines scan B → A 249f7748ff9e
- yesterday First seen · 343 lines · 0 tokens per session scan B 39a67cf7cdba
branch-review is a command published in the GitHub repository hamr0/liteagents (22 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 4,690 tokens. A static security scan graded it A with 0 findings. It is 100% identical to branch-review, differing in 25 lines, and is treated as a copy.
Other commands, from other repositories
profile
Save, apply, and share multi-agent configuration profiles.
rollback
Restore a skill to its previous version. Requires a history entry — created automatically when you use rolecraft update or re-install over an existing skill.
init
Generate FILETREE.md from scratch. Confirms overwrite if it already exists. --self-only keeps every artifact out of git.
audit
Diff live infrastructure against the spec and report drift by component name.
uninstall
Uninstall filetree from this repo — un-wires CLAUDE.md/AGENTS.md, removes generated artifacts (confirmed per item), tears down self-only mode if enabled.
harness
Run the full Auto-Harness orchestration flow. /auto-harness:harness.