Skip to content
Skills Library
AI & agents · Building & coding

rules

/rules

Use when setting up specclaw-review in a repo, when the user wants review rules created or improved, or asks what the reviewer should check in this codebase.

Repository
specclaw ↗
Licence
MIT
Last repository change
20.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when setting up specclaw-review in a repo, when the user wants review rules created or improved, or asks what the reviewer should check in this codebase.

Original author description

Use when setting up specclaw-review in a repo, when the user wants review rules created or improved, or asks what the reviewer should check in this codebase.

How it works

  1. 1. Find what the repo already has
  2. 2. Draft rules only for what is missing
  3. 3. Show, then write
  4. 4. Keep it alive
Original SKILL.md headings · 77 lines, 563 words
SKILL.md preview
---
name: rules
description: Use when setting up specclaw-review in a repo, when the user wants review rules created or improved, or asks what the reviewer should check in this codebase.
---

# 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).

Group the findings by root cause, not by wording. Keep a group only when it recurs, at least twice in different
PRs, and nothing in the governance already says it. For each kept group, draft one rule:

```
- **R<n> <short name>.** <the defect, stated so a reviewer can check it in a diff>. <what to do instead>.
  Severity: <blocker|major|minor>. Seen: <PR ids or change names>.
```

- A rule must name a concrete failure ("a failed read rendered as an empty list"), never a preference ("prefer
  clean code").
- Put rules in `.specclaw/review/rules/<topic>.md`, one topic per file, with IDs unique across files.
- If a group is mechanical (a pattern a test or linter could catch), propose a **guard** instead of a rule. A guard
  changes behaviour; a rule only reminds the reviewer.

## 3. Show, then write

Show the user, in one message:
- the `review:` block;
- each new rule file in full;
- the rulebook size (`specclaw-review rules | wc -c` after, estimated before);
- the PRs or changes each rule came from.

On their yes:
1. Write the config block (merge into an existing `review:` block, never duplicate it) and the rule files.
2. Run `specclaw-review rules` and confirm it prints them.
3. Run `specclaw-review init` once, so the review-memory guard rule is installed.

## 4. Keep it alive

After a few review loops, run the `learn` skill. Lessons the loop records twice become rule proposals for the same
folder.

Versions

RepositoryScoreLicence
This page · chan4lk/specclaw100MIT
p2p2sp/p2p2.claude100MIT
marcel-bich/marcel-bich-claude-marketplace100MIT
jirayusueb/egm-stack100Apache-2.0
p2p2sp/viber100MIT
jksim26/crew90MIT
SteveGJones/ai-first-sdlc-practices90MIT

Database snapshot: 13.11.2026 · package version 734323e199d7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100review
    Use when a change is built and needs review before its PR, when verify runs and specclaw-review is installed, or when the user asks to review, re-review or run the review loop locally.
  • 84feature
    Use when someone wants several related approved specclaw changes delivered together as one feature through specclaw-fleet, with dependencies, a shared feature branch and one PR to main.
  • 100generate-ai-rules
    Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/*.mdc) — from codebase analysis. Use whenever the user wants to create or update CLAUDE.md, AGENTS.md, agent rules, Cursor rules, AI coding assistant configuration,…
  • 100repo-rules
    Query AI coding rules for this repo (extracted from CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md, and ~40 other rules-file conventions). Invoke when the user asks about team rules, coding standards, or conventions — or when reviewing, generating, or…
  • 100rules-from-reviews
    Read this repo's recent merged pull request reviews on GitHub, find what reviewers keep asking for, and draft those asks as agent rules (for AGENTS.md, CLAUDE.md or Cursor rules) when the rules files don't say it yet. Use when the user asks what their reviewers keep repeating,…
  • 100write-rules
    Write this repo's agent rules file (AGENTS.md, read by Claude Code, Codex, Cursor and others) from what the repo actually does (CI workflows, scripts, configs, folder layout, git history), with a source for every line and nothing a linter already enforces. Use when the user asks…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.