rules

rules is a skill for Codex from kochetkov-ma/claude-brewcode. It costs 23 tokens per session (676 once invoked), scanned A, original, MIT.

A project-rules manager for keeping .codex/rules files and an AGENTS.md index in sync.

In plain words
What is it for?
It helps maintain project rules and update the index that points agents to them.
Why use it?
It keeps instructions for coding agents organised and discoverable across a project.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions AGENTS.md; mentions Codex.

Good fit It helps maintain project rules and update the index that points agents to them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kochetkov-ma/claude-brewcode/rules
Install

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.

Any agent
npx skills add kochetkov-ma/claude-brewcode --skill rules
Clone the repo
git clone --depth 1 https://github.com/kochetkov-ma/claude-brewcode

Made for: Codex.

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 rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/rules/github.svg)](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/rules)
Your own site
<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.

agentmods 80×15 button for rules

Your own site · 80×15
<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>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00023 $0.00676
Opus 5.5 $0.00009 $0.00270
Sonnet 5.5 $0.00005 $0.00135
Haiku 4.5 $0.00002 $0.00068

Measured 17d ago against content hash 01e2e9169e86, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 17d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/rules.sh, tests/run.sh, tests/validate-paths.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.codex/plugins/brewcode/skills/rules/SKILL.md · 37 lines

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.md files as Codex's automatically loaded instruction surface.
  • Keep rule content in one file. AGENTS.md contains 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

  1. Read the applicable AGENTS.md files and inventory every project rule with rg --files .codex/rules | sort.
  2. 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.
  3. Create or update English rule files under .codex/rules/. Reuse an existing rule when its scope matches.
  4. Update the nearest applicable AGENTS.md rule-index table. The repository-root table lists every .codex/rules/*.md file exactly once with columns Rule, Load when, and Purpose. Nested tables add only subtree-specific rules not already covered by the inherited root index.
  5. Invoke $brewtools:text-optimize -l for every changed rule and AGENTS.md index. Preserve paths, scope qualifiers, safety constraints, and table structure; apply the optimized patch only after comparing semantics.
  6. 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.
  7. Report changed rules, index rows, optimization measurements, and validation evidence.

Read the full file on GitHub · 37 lines

Files

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.

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. 17d ago Changed · +4 lines 01e2e9169e86
  2. 1mo ago First seen · 33 lines · 23 tokens per session scan A faed62dec006

Subscribe to this mod's changes

rules is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (37 stars, last pushed yesterday), 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.

Related

Other skills, from other repositories

fresh-start

Continue in a new chat without losing anything — writes a compact handoff to paste into a fresh conversation. Use whenever the user wants to move to a new chat or conversation, hits usage limits, says replies got slow or Claude forgets earlier details, or the conversation has grown long.

egorfedorov/claude-context-optimizer · 60 tokens

token-check

Estimate how many tokens a pasted text, an attached file or the conversation so far takes, what it means for the context window and usage limits, and how to cut it. Use when the user asks how big something is in tokens, why they keep hitting limits, or whether a file is too large to send.

egorfedorov/claude-context-optimizer · 66 tokens

doc-digest

Turn a long document, PDF, transcript, spreadsheet or log into a compact working digest the conversation can continue from. Use when the user shares or pastes something long (several pages or more) and wants to discuss, analyze, compare or use it over more than one message, or asks to summarize a document so they can…

egorfedorov/claude-context-optimizer · 75 tokens

sharpen-prompt

Rewrite a vague request into a precise prompt — goal, context, scope, constraints, what done looks like, output format. Use when the user asks to improve, rewrite, sharpen or check a prompt.

egorfedorov/claude-context-optimizer · 47 tokens

skill-creator-plus

Create, test, evaluate, and improve Claude skills — and answer questions about how skills work. Use for "create a skill", "make a skill for", "write a SKILL.md", "turn this into a skill", "run evals", "test/benchmark my skill", "optimize my skill description", "improve triggering", "A/B test my skill", "blind…

yaniv-golan/skill-creator-plus · 147 tokens

deep-research

Deep Research (/deep-research or /dr) — exhaustive, evidence-based investigation of any topic. Use when the user invokes /deep-research, /dr, asks for deep research, says 'research this thoroughly', wants expert-level analysis on any subject (technical, business, scientific, regulatory, financial, medical, legal…

yachi/claude-skills · 164 tokens