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/ainsteinsbr/renata/extract-patterngit clone --depth 1 https://github.com/AInsteinsBR/renataWhat 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 | $0.00024 | $0.01218 |
| Opus 5 | $0.00012 | $0.00609 |
| Sonnet 5 | $0.00005 | $0.00244 |
| Haiku 4.5 | $0.00002 | $0.00122 |
Grade A, and why
extract-pattern 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/renata:extract-pattern — Distill a repo's pattern into ADRs + a loadable doc
You are an architect. You receive a repo path in $ARGUMENTS, map the pattern in detail (via @pattern-mapper), confirm with the user, and generate ADRs (the decision) + code-pattern-<scope>.md (the operational detail).
Respond to the user and generate document content in the user's language (the language they are writing in).
It serves to: distill a cloned starter (frontend/), document a legacy project, or capture the pattern of a reference repo.
The ADR vs doc split (do not violate)
- ADR = "why we decided X + alternatives + trade-offs + review trigger". Short, stable.
code-pattern-<scope>.md= "how the code does X, in detail + examples". Long, living.- The ADR points to the doc; the doc cites the ADR. Zero duplicated content. If it's "why", it goes in the ADR; if it's "how the code does it", it goes in the doc.
Step 1 — Resolve target and scope
$ARGUMENTS= repo path. No argument: assumefrontend/if it exists; otherwise ask which path.- Validate that the path exists and contains code (is not empty).
- Infer the scope from the folder name:
frontend/→frontend,backend/→backend,api/→api. Show the inferred scope and ask: "Scope<X>— confirm or correct?". With no obvious path, ask for the scope. - The scope names the artifacts:
code-pattern-<scope>.mdand tags the ADRs ([<scope>]in the title).
Step 2 — Deep scan (trigger the agent)
Invoke the @pattern-mapper agent pointing to the resolved path. It scans the 4 axes (architecture, stack, design system, conventions) and returns a structured map with evidence strength per item.
Don't read the repo yourself — delegate to the agent (it preserves your context).
Step 3 — Item-by-item confirmation
Present the agent's map grouped by axis. For each item:
- Default = what the code says ("the code is the truth").
- Items marked weak evidence → highlight them as "possible hack — does it become a rule?".
- The user confirms, corrects, or marks "not a rule" (stays out of the ADRs).
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.
- 2d ago First seen · 76 lines · 24 tokens per session scan A 3ecf1787c9f3
extract-pattern is a command published in the GitHub repository AInsteinsBR/renata (10 stars, last pushed 12d ago), licensed MIT. It adds 24 tokens to every session and 1,218 once invoked, about $0.0001 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.
Other commands, from other repositories
issue-review
Run Codex native + adversarial review against the active issue, scoped to allowedfiles, capped per kind.
issue-closeout
Triage Codex findings via per-finding dispositions, mark findingstriaged, close the active issue.
prd-review
Review the active PRD with Codex and stream normalized findings to JSONL.
prd-triage
Triage pending findings on the active PRD.
prd-archive
Archive the active PRD (terminal state).
issue-start
Load a DSSE issue spec and begin structured work.