rules

rules is a skill for Claude Code from chan4lk/specclaw. It costs 36 tokens per session (968 once invoked), scanned A, original, MIT.

A setup guide for defining the rules that a repository's automated code reviewer should follow.

In plain words
What is it for?
It is for discovering current repository guidance and preparing approved review settings and rule files for specclaw-review.
Why use it?
It prevents review gates from being added silently and helps preserve existing project governance instead of copying rules that may become outdated.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the specclaw-review plugin — 2 skills, 3 hooks, 1 MCP server shipped together

Good fit It is for discovering current repository guidance and preparing approved review settings and rule files for specclaw-review.

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

Made for: Claude Code.

Or install specclaw-review, the plugin that ships this one along with the rest of its 2 skills, 3 hooks, 1 MCP server.

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/chan4lk/specclaw/rules/github.svg)](https://agentmods.dev/skills/chan4lk/specclaw/rules)
Your own site
<a href="https://agentmods.dev/skills/chan4lk/specclaw/rules"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/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/chan4lk/specclaw/rules"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 968 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.00036 $0.00968
Opus 5.5 $0.00014 $0.00387
Sonnet 5.5 $0.00007 $0.00194
Haiku 4.5 $0.00004 $0.00097

Measured 1mo ago against content hash ced0b77329e3, 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 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.

plugins/specclaw-review/skills/rules/SKILL.md · 81 lines

How it starts

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

specclaw-review: create the review rules for this repo

Two outputs:

  1. a review: block in .specclaw/config.yaml;
  2. rule files in .specclaw/review/rules/.

Write nothing until the user approves what you show them. Rules decide what blocks a PR, so a rule written silently is a gate nobody agreed to.

1. Find what the repo already has

Run specclaw-review discover (or call the review_discover MCP tool). It is read-only and lists:

  • the repo's governance by category, with sizes;
  • whether those files define severity;
  • the existing repo rules;
  • how much review history is on disk;
  • whether a PR host can be read;
  • a suggested review: block.

Before you go on:

  • Existing governance wins. Point review.governance at those files; they are read fresh every round. Never copy them into rule files, because copies go stale.
  • Decisions/ADRs stay out of the rulebook. List them for the user. The reviewer reads them with its tools when a change touches them.
  • Over budget: if the inlined size is over budget, propose which files to drop from governance, smallest value first: long guides, tutorials, and anything an ADR already covers. Show the size before and after.
  • Severity: if the files define severity, say so. severity: project applies by default, so the repo's own idea of "major" wins.

2. Draft rules only for what is missing

Mine the repo's own review history and write down what it keeps getting wrong. Never write generic advice; the plugin's packs already hold that.

Sources, best first:

  1. Past PR review comments. Read only, last 30–50 merged PRs.
    • GitHub: gh api "repos/{owner}/{repo}/pulls/comments?per_page=100" --paginate -q '.[] | [.path, .body] | @tsv' | head -2000
    • Azure DevOps: use the token in .specclaw/.env (AZDO_TOKEN; never print it). Read _apis/git/repositories/<repo>/pullrequests?searchCriteria.status=completed&$top=50, then each PR's /threads.
  2. The repo's records: .specclaw/changes/*/learnings.md and follow-ups.md.
  3. Recurring lessons in review memory: specclaw-review learn (dry-run).

Read the full file on GitHub · 81 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. 1mo ago First seen · 81 lines · 36 tokens per session scan A ced0b77329e3

Subscribe to this mod's changes

rules is a skill published in the GitHub repository chan4lk/specclaw (15 stars, last pushed 11d ago), licensed MIT. It adds 36 tokens to every session and 968 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-10-17.

Related

rules compared with skills from other repositories

rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ruleschan4lk/specclawSkill1511d agoMITA36Claude Code
backloga-lottes/aSPARKSkill2612d agoMITA94Claude Code
backend-developerolehsvyrydov/AI-development-teamSkill1811d agoMITA94Claude Code
javaolehsvyrydov/AI-development-teamSkill1811d agoMITA136Claude Code
typescriptolehsvyrydov/AI-development-teamSkill1811d agoMITA148Claude Code
reviewerolehsvyrydov/AI-development-teamSkill1811d agoMITA73Claude Code
solution-architectolehsvyrydov/AI-development-teamSkill1811d agoMITA104Claude Code