RAD_framework: Command for Claude Code

.claude/commands/shared/rad-insights.md

rad-insights is a command for Claude Code from seanrreid/RAD_framework. It costs 41 tokens per session (4,532 once invoked), scanned A, original, MIT.

A command that studies records from RAD code-review cycles stored in `.agents/findings.jsonl`. It groups repeated issues, problem-heavy files, and changes in review results over time.

In plain words
What is it for?
Use it to count finding categories, identify files that often need attention, and compare review history from a chosen date onward.
Why use it?
It helps a team see recurring review problems instead of reading each review separately. With little history, it reports the available findings without pretending there is a reliable pattern.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; positional $N argument.

This is seanrreid/RAD_framework's own configuration. It tells Claude Code how to work on RAD_framework itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything RAD_framework configures →

Reuse

Borrowing it

Nothing to install: this file belongs to seanrreid/RAD_framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/seanrreid/RAD_framework/main/.claude/commands/shared/rad-insights.md
Clone the repo
git clone --depth 1 https://github.com/seanrreid/RAD_framework

Made for: Claude Code.

Wrote 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.

agentmods badge for rad-insights

README.md
[![agentmods](https://agentmods.dev/badge/commands/seanrreid/rad_framework/rad-insights.svg)](https://agentmods.dev/commands/seanrreid/rad_framework/rad-insights)
Your own site
<a href="https://agentmods.dev/commands/seanrreid/rad_framework/rad-insights"><img src="https://agentmods.dev/badge/commands/seanrreid/rad_framework/rad-insights.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,532 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00041 $0.04532
Opus 5 $0.00020 $0.02266
Sonnet 5 $0.00008 $0.00906
Haiku 4.5 $0.00004 $0.00453

Measured 6d ago against content hash 469c8af21330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rad-insights 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 6d 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.

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.

.claude/commands/shared/rad-insights.md · 409 lines

How it starts

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

/rad-insights

Analyze finding patterns across all recorded RAD review cycles.

Input

$ARGUMENTS (optional): --since YYYY-MM-DD to limit analysis to cycles on or after that date.


Process

Step 1: Check for findings log

if [ ! -f .agents/findings.jsonl ]; then
  echo "No findings log found. Run /rad-review on at least one rad/ work branch first."
  exit 0
fi

Count records to determine report depth:

# Total cycles
jq -r 'select(.type=="cycle")' .agents/findings.jsonl | jq -s 'length'

# Total findings
jq -r 'select(.type=="finding")' .agents/findings.jsonl | jq -s 'length'

If fewer than 3 cycles exist, note the limited data and output a raw findings list instead of a pattern report.

Step 2: Apply date filter (if --since provided)

# Filter findings to on/after the provided date
jq -r --arg since "[DATE]" 'select(.date >= $since)' .agents/findings.jsonl

Step 3: Compute finding frequencies

# Category frequency (all priorities)
jq -r 'select(.type=="finding") | .category' .agents/findings.jsonl \
  | sort | uniq -c | sort -rn

# HIGH findings by category
jq -r 'select(.type=="finding" and .priority=="HIGH") | .category' .agents/findings.jsonl \
  | sort | uniq -c | sort -rn

# Finding frequency per file (top 10)
jq -r 'select(.type=="finding") | .file' .agents/findings.jsonl \
  | sort | uniq -c | sort -rn | head -10

# Findings by reviewer
jq -r 'select(.type=="finding") | .reviewer' .agents/findings.jsonl \
  | sort | uniq -c | sort -rn

Step 3b: Findings Recurrence — convention/lint suggestions

A category that keeps recurring across review cycles is a signal the project is missing a convention (or a lint rule) that would prevent it. This step turns the Step 3 category counts into suggestions only — every output is framed "suggestion — apply via PR; never auto-applied". This skill NEVER edits CLAUDE.md or scripts/lint-plan.sh itself.

Threshold. Resolved from RAD_FINDINGS_THRESHOLD with Number.parseInt semantics: unset, 0, NaN (non-numeric), or negative all fall back to the default 5.

Read the full file on GitHub · 409 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. 6d ago First seen · 409 lines · 41 tokens per session scan A 469c8af21330

Subscribe to this mod's changes

rad-insights is a command published in the GitHub repository seanrreid/RAD_framework (5 stars, last pushed 2d ago), licensed MIT. It adds 41 tokens to every session and 4,532 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.