Review Toolbox
Skill3 starsChanged 49 days agoMITView on GitHub
Read-only source inspection for code/security review via the bundled `rtb` wrapper — named git/fs sources, composable filters, a whitelisted `git -C` read path, and one-approval Bash permission. Use instead of ad-hoc `cd … && git show/grep … | sed …`.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Auto MemorySkill
- Bug PatternsSkill
- Project CommitSkill
- Skill CreationSkill
- Delegate and VerifySkill
- Incremental ImprovementSkill
- Memory DumpSkill
- Patch EvaluationSkill
- Documentation RefreshSkill
- Repo ConfigSkill
- Code ReviewSkill
- Sanity CheckSkill
- TODOSkill
- Upstream FixSkill
- Verify Security FixSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Before spawning a review subagent: run rtb facts and paste the output into its prompt so it starts with the correct paths, tags, version …
- Very specific: line 53
Read-only, always: Never build/compile/run/execute the code under review.
- Very specific: line 55
git =
git -C <repo> <read-subcmd>only: No raw git in the allow-list. - Very specific: line 62
Compare against the shipped tree: When a distro/vendor patches upstream, the truth is the *patched* tree, not upstream alone — configure …
- Very specific: line 105
Create it directly (.rtbrc in the project root), then run rtb sources to confirm every path resolves.
- Very specific: line 167
New source: add SRC_<name>_* lines to .rtbrc and document it in your FACTS.md.
- Very specific: line 177
Composable, not clever: Prefer chaining rtb filters over adding bespoke subcommands.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review Toolbox (rtb) Skill
Purpose: Standardize how a reviewer (you, or a subagent) reads source during code /
vulnerability review. Instead of hand-writing cd /some/repo && git show TAG:path | sed -n
'…' | grep … every time, route it through one wrapper: rtb (bundled with this skill).
This gives:
- One-time permission — approve
Bash(…/rtb:*)once, not each git/grep/sed. - Read-only by construction —
rtbonly ever runsgit -C <repo> <read-subcmd>from a fixed whitelist; there is no code path that writes, checks out, commits, archives, orcds into a repo. Writes are impossible, not just discouraged. - Named sources + tags — repos/paths/tags live in one config (
.rtbrc) and an optional human narrative (aFACTS.md); agents get them viartb factsinstead of memorizing paths. - Composable filters —
--lines,--grep,--ctx,--head/--tail,--countchain in one call, replacing| sed | grep | headpipelines.
When to Use
- Any time you would otherwise run
git show <ref>:<file>,git grep <pat> <ref> -- …, orsed -n 'A,Bp'/grep -n … -A Nagainst a review source repo. - Before spawning a review subagent: run
rtb factsand paste the output into its prompt so it starts with the correct paths, tags, version mapping, and hard rules — and instruct the subagent to runrtb factsitself too (see Workflow step 2).
Workflow
- Configure sources once — create
./.rtbrc(see Setup) declaring each repo/tree you'll read: upstream git source(s) + any patched/unpackedfstree, plus an optionalRTB_FACTSnarrative. Runrtb sourcesto confirm they resolve. - Hand facts to the reviewer — run
rtb factsand paste the output into your own working notes or a review subagent's prompt, so paths/tags/rules are fixed up front. When the reviewer is a subagent, also instruct it to runrtb factsitself as its first action — the pasted copy is a fallback for prompt-construction time, not a substitute for the live output, which may differ if facts were updated or the agent is resumed later. - Read, don't run — inspect code with
rtb cat/rtb grep/rtb log/rtb ls, chaining--lines/--grep/--ctx/--head/--tailinstead of piping throughsed/grep. Pick the source/ref with--src/--ref. - Verify against what ships — when a finding depends on patched code, re-check it against
the shipped/patched source (
--src <release-tree>), not upstream alone. - Stay inside the wrapper — never fall back to raw
git/sedpipelines or build/run the code; that defeats the read-only permission boundary the wrapper exists to enforce.
Hard Rules (read first)
- Read-only, always. Never build/compile/run/execute the code under review.
rtbis the only sanctioned way to touch the source repos. - git =
git -C <repo> <read-subcmd>only. No rawgitin the allow-list; nocheckout/commit/archive|tar/push/reset. If you truly need a raw git read not covered byrtb, run it explicitly asgit -C <repo> …and let it prompt — never add a broadBash(git *)allow back. - Keep review data local when it's sensitive. For embargoed / private review material, keep inputs and outputs out of version control (e.g. a gitignored work dir) and never post externally. (Skip if the code under review is public.)
- Compare against the shipped tree. When a distro/vendor patches upstream, the truth is
the patched tree, not upstream alone — configure both as sources (e.g.
upstream+ arelease/prepfs source) and confirm verdicts against what actually ships.
Setup (one time per project)
Config — a source registry at
./.rtbrcin the project: plain shell variable assignments, one block per source (gitignore it if it points at private paths).rtbonly reads these variables out of it — it never execs logic from your args. Each source is one of two kinds:git— a git repo read at a ref/tag/commit (SRC_<name>_REF), for upstream or dist-git clones where you inspect code as of a version.fs— a plain directory on disk (noREF), for an unpacked / already-patched tree (e.g. aprep/build dir) that represents what actually ships.
Variable schema:
SRC_<name>_KIND=git|fs SRC_<name>_PATH=/abs/path SRC_<name>_REF=<default tag/branch> # git sources only; ignored for fs RTB_DEFAULT_SRC=<name> # source used when --src is omitted RTB_FACTS=./FACTS.md # optional narrative fed to subagentsA complete example (generic — an upstream clone, a vendor patch repo, and the shipped tree):
# ./.rtbrc — source registry for the "libfoo" review (LOCAL; gitignored) # upstream clone: inspect code as of the shipped version SRC_upstream_KIND=git SRC_upstream_PATH=/abs/path/to/libfoo/upstream SRC_upstream_REF=v2.4.0 # also usable: --ref main, --ref v2.5.0-rc1 # vendor/distro patch repo (spec + numbered *.patch over a tarball) SRC_distgit_KIND=git SRC_distgit_PATH=/abs/path/to/libfoo/dist-git SRC_distgit_REF=release-branch # SHIPPED TRUTH: unpacked tree with downstream patches already applied SRC_release_KIND=fs SRC_release_PATH=/abs/path/to/libfoo/prep/libfoo-2.4.0 RTB_DEFAULT_SRC=upstream RTB_FACTS=./FACTS.mdCreate it directly (
.rtbrcin the project root), then runrtb sourcesto confirm every path resolves. Add more components by giving each its own name prefix (e.g.SRC_bar_*).RTB_FACTSis optional and free-form: a short human narrative (paths, version→tag mapping, which source is authoritative, hard rules) thatrtb factsprints ahead of the source table for pasting into a subagent prompt. Resolution order for the config itself:$RTB_CONF→./.rtbrc→./.review-toolbox.conf.- Permission — in
.claude/settings.local.json, allow the wrapper and drop broad shell allows:"allow": [ "Bash(/abs/path/to/rtb:*)", … ] // add rtb // remove: "Bash(git *)", "Bash(grep *)", "Bash(awk *)" ← these defeat the read-only goal - (optional) PATH —
ln -s ~/.claude/skills/review-toolbox/rtb ~/.local/bin/rtbso you can typertbdirectly. The Bash permission should reference the path you actually invoke.
Command Reference
rtb facts # FACTS.md + resolved sources — feed to subagents
rtb sources # table of configured sources
rtb refs [--src N] # list tags for a git source
rtb cat <path> [opts] # show a file (git: at --ref; fs: from disk)
rtb show <path> [opts] # alias of cat
rtb grep <pattern> [opts] [-- <pathspec…>] # git grep at ref, or grep -rn on fs
rtb log <path> [--src N --ref R --head N] [HISTORY-SEARCH opts]
rtb messages [--ref A..B | A B | RANGE] [--format F] [opts] # commit messages, no diff
rtb diff [--ref A..B | A B | RANGE] [opts] [-- <pathspec…>] # git diff for a range
rtb ls [subpath] [--src N --ref R]Source/ref: --src NAME (default from config), --ref REF (override tag/branch/commit).
Filters (chain freely; order lines→grep→head/tail): --lines A,B, --grep PAT,
--ctx N/-C N, --head N, --tail N, --count.
History search (on log, for "did this code/string EVER exist?") — use this, never raw
git log: --pickaxe STR/-S (commits adding/removing STR), --diff-regex RE/-G,
--cmsg-grep PAT, --all (search every ref/tag), --patch/-p (show diffs; -n defaults to 200
when searching). Empty output under --all = the string never existed anywhere in history.
Translating old habits
| Old pipeline | rtb equivalent |
cd R && git show v2.4.0:F | sed -n '33,75p' | rtb cat F --ref v2.4.0 --lines 33,75 |
git show v2.4.0:F | grep -n P -A25 | head -40 | rtb cat F --ref v2.4.0 --grep P --ctx 25 --head 40 |
git grep -n P v2.4.0 -- F1 F2 | rtb grep P --ref v2.4.0 -- F1 F2 |
git -C R diff base..feature | rtb diff --ref base..feature |
diff <(git diff OLD^..OLD) <(git diff NEW^..NEW) | rtb diff OLD^ OLD vs rtb diff NEW^ NEW |
cd R && git log --all -p -S STR -- D/ | rtb log --all --patch --pickaxe STR -- D/ |
cd R && git log base..feature --format=full | rtb messages --ref base..feature |
| read a patched/unpacked tree on disk | rtb cat F --src release |
| check a different tag | rtb cat F --ref v2.5.0-rc1 |
Extending
rtb is a single bash file — extend in place, keep it read-only:
- New post-filter (e.g. an
awktransform): add a flag inparse_common()and a stage inapply_filters()/_filter_*. Keep the lines→grep→ends ordering predictable. - New reader (e.g.
blame,annotate): add acmd_<x>()and amain()case; callgitrso the read-only whitelist (GIT_READ_OK) still applies. To allow a new git read subcommand, add it toGIT_READ_OK— never bypassgitr. - New source: add
SRC_<name>_*lines to.rtbrcand document it in yourFACTS.md. No code change needed.
Core Principles
- One wrapper, one approval, zero writes. The value is the permission boundary — don't
route around it with raw
git/sedonce it's set up. - Facts flow to agents. Subagents shouldn't guess paths/tags — hand them
rtb facts. - Simplicity over portability. The script is generic and reusable; the per-project
.rtbrc/FACTS.mdare not meant to be shared. - Composable, not clever. Prefer chaining
rtbfilters over adding bespoke subcommands.
See Also
- review — full structured code review; use
rtbas its read path. - sanity-check — quick pre-review malicious-intent scan;
rtbfor the reads. - verify-fix — confirm a patch blocks the vector;
rtbto diff before/after at each ref. - delegate-and-verify —
rtb factsis how you hand a delegated worker its read-context up front.
Version History
- 1.6.0: A subagent should run
rtb factsitself, not just receive the pasted copy -- a pasted-only snapshot can go stale (facts updated, agent resumed later). - 1.5.1: Added
delegate-and-verifyto See Also (rtb factshands workers their read-context). - 1.0.0: Initial version — read-only
git -Cwrapper with named sources (git+fs), composable line/grep/head filters,facts/sources/refs/cat/grep/log/ls, and one-approval Bash permission model. - 1.1.0: Genericized for the shared skills collection and made self-contained — the
rtbscript is now bundled alongside thisSKILL.md; config defaults to./.rtbrc; project-specific examples/rules removed. - 1.2.0: Documented
.rtbrccreation — git vs fs source kinds, a complete generic example config, and whatRTB_FACTS/FACTS.mdshould contain. - 1.3.0:
rtb loggained history/pickaxe search —--pickaxe/-S,--diff-regex/-G,--cmsg-grep,--all,--patch(answer "did this string/function EVER exist?"; empty under--all= never existed). Use instead of rawgit log -S. - 1.4.0: added
rtb diff— a read-onlygit difffor a range (--ref A..B, two refsA B, or one positional range), composable with--grep/--lines/--headand-- pathspec. Covers MR/branch diffs and re-review patch comparison without rawgit diff. - 1.5.0: added
rtb messages— commit messages for a range (no diff), same range forms asrtb diff, default--format=fullwith a--formatoverride. Lets the sanity-check message pass read commit text without rawgit log, closing the last raw-git read path.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

