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 skills add kochetkov-ma/claude-brewcode --skill rulesgit clone --depth 1 https://github.com/kochetkov-ma/claude-brewcodeWrote 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/skills/kochetkov-ma/claude-brewcode/rules)<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/rules"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/rules/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/rules"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/rules.svg" alt="Reviewed on agentmods" width="80" 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.00023 | $0.00676 |
| Opus 5.5 | $0.00009 | $0.00270 |
| Sonnet 5.5 | $0.00005 | $0.00135 |
| Haiku 4.5 | $0.00002 | $0.00068 |
Grade A, and why
rules 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 2mo 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 — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex project rules
Use only when the user explicitly requests rule creation, synchronization, improvement, review, or inventory.
Sources of truth
- Store rule bodies under the project
.codex/rules/; never use personal or foreign-assistant rule paths. - Treat hierarchical
AGENTS.mdfiles as Codex's automatically loaded instruction surface. - Keep rule content in one file.
AGENTS.mdcontains a compact index, not copied rule bodies.
Modes and arguments
Position 1 of the arguments is a free-form prompt (RU/EN); mode tokens are optional and may follow. Resolve the mode from that prompt: status (default, read-only inventory), list, create, improve, review. An explicit mode token wins outright; otherwise take the mode the prompt describes, and ask at most one clarifying question, only when the answer changes what gets written.
Before the first write — and before the report on a read-only run — state in one block: the input verbatim, the resolved mode and why, the scope (rule files and AGENTS.md tables in play), what will be done, and the result the user ends up with.
Workflow
- Read the applicable
AGENTS.mdfiles and inventory every project rule withrg --files .codex/rules | sort. - Resolve the request to
status, create, improve, review, list, or synchronize. Persist durable repository facts only; exclude secrets, transient session state, generated reports, and duplicate instructions. - Create or update English rule files under
.codex/rules/. Reuse an existing rule when its scope matches. - Update the nearest applicable
AGENTS.mdrule-index table. The repository-root table lists every.codex/rules/*.mdfile exactly once with columnsRule,Load when, andPurpose. Nested tables add only subtree-specific rules not already covered by the inherited root index. - Invoke
$brewtools:text-optimize -lfor every changed rule andAGENTS.mdindex. Preserve paths, scope qualifiers, safety constraints, and table structure; apply the optimized patch only after comparing semantics. - Re-run the complete inventory. Fail validation when any rule path is missing from the root index, any indexed path is stale, or a rule body was duplicated into
AGENTS.md. - Report changed rules, index rows, optimization measurements, and validation evidence.
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago Changed · +4 lines 01e2e9169e86
- 3mo ago First seen · 33 lines · 23 tokens per session scan A faed62dec006
rules is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (41 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 676 once invoked, about $0.0001 per session on Opus 5.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-30.
rules compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ruleskochetkov-ma/claude-brewcode | Skill | 41 | 2d ago | MIT | A | 23 | Codex |
| doc-digestegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 75 | Claude Code |
| token-checkegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 66 | Claude Code |
| sharpen-promptegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 47 | Claude Code |
| skill-creator-plusyaniv-golan/skill-creator-plus | Skill | 8 | 20d ago | MIT | A | 147 | Claude Code |
| cpp-reinforcement-learningAznatkoiny/zAI-Skills | Skill | 10 | 24d ago | MIT | A | 131 | Claude Code |
| deep-researchyachi/claude-skills | Skill | 3 | 1mo ago | MIT | A | 164 | Claude Code |