specrew-code-rules

specrew-code-rules is a skill for Claude Code, Codex from alonf/specrew. It costs 173 tokens per session (1,426 once invoked), scanned A, original, MIT.

An implementation-time guide that loads the coding rules selected for the active feature and reminds the agent to follow them while writing code. The rules can cover naming, dependency choices, error handling, security context, and other implementation decisions.

In plain words
What is it for?
Use it while implementing a feature to apply its chosen design and code-quality rules to each task or file type.
Why use it?
It keeps agreed coding practices available during implementation without requiring the developer to paste them into every task. It provides guidance rather than automatically checking whether the code conforms.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it while implementing a feature to apply its chosen design and code-quality rules to each task or file type.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alonf/specrew/specrew-code-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 alonf/specrew --skill specrew-code-rules
Clone the repo
git clone --depth 1 https://github.com/alonf/specrew

Made for: Claude Code, 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 specrew-code-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/alonf/specrew/specrew-code-rules/github.svg)](https://agentmods.dev/skills/alonf/specrew/specrew-code-rules)
Your own site
<a href="https://agentmods.dev/skills/alonf/specrew/specrew-code-rules"><img src="https://agentmods.dev/badge/skills/alonf/specrew/specrew-code-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 specrew-code-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/alonf/specrew/specrew-code-rules"><img src="https://agentmods.dev/badge/skills/alonf/specrew/specrew-code-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,426 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.00173 $0.01426
Opus 5.5 $0.00069 $0.00570
Sonnet 5.5 $0.00035 $0.00285
Haiku 4.5 $0.00017 $0.00143

Measured 1mo ago against content hash e51e5350b9c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

specrew-code-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 1mo 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.

.agents/skills/specrew-code-rules/SKILL.md · 94 lines

How it starts

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

specrew-code-rules

Type: Implement-time Guidance Skill Schema: v1 Status: Active implementation conduct

Purpose

The code-implementation design lens captured this feature's implementation-craft rules at design time (the implementation-rules.yml manifest). This skill is the implement-time half: while you write code, it surfaces the chosen rules so the code reflects the agreed posture (DI, naming, size, error handling, security-context, copy semantics, dependency stance, …) without the maintainer re-pasting rules. It is guidance, not a gate — there is no mechanical conformance check; the value is that you actually follow the rules as you write.

The Big Picture (read this first, every time)

You are a static reader. You carry NO per-feature content yourself — you resolve it at read time:

  1. Resolve the active feature. Read .specrew/start-context.json (session_state.feature_ref / feature_path) to find the active feature's specs/<feature>/ directory.
  2. Read the per-feature manifest specs/<feature>/implementation-rules.yml — the selected rule ids (checked/unchecked), per-rule decisions, the resolved stack, custom rules, and the dependency_policy.
  3. Read the canonical catalog extensions/specrew-speckit/knowledge/design-lenses/code-rules.yml (deployed under the project's design-lens catalog) to resolve each selected rule id to its text, and the optional project overlay code-rules.local.yml (additive + per-rule override; never drops a shipped rule) for the ingested company guideline / reusable custom rules.
  4. Compose BASELINE + OVERLAY (below) and surface it task-scoped for the current work.

Compose: baseline + overlay

  • BASELINE — the catalog's baseline-default group ALWAYS applies (intent-revealing names, short methods, low nesting, DI as a principle, no magic numbers, guard object invariants, don't leak mutable internals, SOLID, idiomatic errors, …). Apply it even when there is no manifest (baseline-only mode).
  • OVERLAY — when a manifest exists, layer the feature's choices on top: the selected decision-prompt rules + the human's per-rule decision, the applicable applicability-filtered rules, any custom_rules, and the dependency_policy. An unchecked baseline rule is a recorded exception — honor the exception.

Read the full file on GitHub · 94 lines

Files

What ships with it

1 file 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. 1mo ago First seen · 94 lines · 173 tokens per session scan A e51e5350b9c6

Subscribe to this mod's changes

specrew-code-rules is a skill published in the GitHub repository alonf/specrew (54 stars, last pushed today), licensed MIT. It adds 173 tokens to every session and 1,426 once invoked, about $0.0007 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-10-26.

Related

specrew-code-rules compared with skills from other repositories

specrew-code-rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
specrew-code-rulesalonf/specrewSkill54todayMITA173Claude Code, Codex
autoreviewopenclaw/clawhubSkill9.6ktodayMITA17Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill6.2ktodayMITA18Claude Code
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k10d agoMITA115Claude Code, Codex
asplos-writing-stylebrycewang-stanford/Awesome-Journal-SkillsSkill1.5k3d agoMITA65Claude Code
revdiff-planumputun/revdiffSkill974todayMITA84Claude Code
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex