agentleFS
devnu11devnu11/claude-skills/house-rules/SKILL.md

house-rules

Skill1 starsChanged 20 days agoMITView on GitHub

Check Python code against the human's code rules as code - no code in the global scope, short functions, at most 2-3 parameters, no boolean parameters, verb-named functions and noun-named properties - with a baseline that may shrink but never grow. Use when the user says "check the house rules", "check my coding standards", "lint against my rules", "set up house-rules", "add the house-rules hook", "baseline the violations", or asks whether code follows their CLAUDE.md code style.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. fangdididi/house-rules★ 0same name
    2. manuelcozar55/setup-claude-code★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Adopting it on a repo: add .house-rules.toml (or [tool.house-rules]), then baseline --accept-new with the human's OK, and commit both.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

house-rules

A uv runner that checks Python files against the human's global code rules (~/.claude/CLAUDE.md, "Code style"). Each rule is a row in one table; every limit and list is repo-configurable. The rules and how they count are in reference/rules.md next to this file. Read it before changing a repo's settings or arguing with a finding.

HR="uv run --frozen --quiet --project ~/.claude/skills/house-rules/runner house-rules"

--frozen runs the skill's tested uv.lock as it is; never drop it.

Commands

CommandWhat it does
$HR check [paths…]Check the repo (or the paths). Exit 0 clean or warnings only, 1 new failures, 2 config or git error.
$HR check --changed mainOnly files changed against main.
$HR check --stagedThe staged content (for a pre-commit hook).
$HR check --format json|githubFor tools, or GitHub annotations in CI.
$HR baselineShrink the baseline after fixes. Refuses to record anything new.
$HR baseline --accept-newRecord today's violations when adopting the tool on a repo. Ask the human first.
$HR rulesThe rules with this repo's limits.

Steps

  1. Run check from the repo root. Report failures by file. Warnings are advice.
  2. Fix, don't suppress. A suppression needs a reason a reviewer can disagree with: # house-rules: allow <rule> -- <reason> on the def line (ruff's # noqa: FBT001 -- <reason> also works for the rules ruff shares). A reason that only says tests or a design fixed the name is refused (suppression-excuse): fix the name.
  3. After fixing baselined code, run baseline so the ratchet tightens.
  4. Adopting it on a repo: add .house-rules.toml (or [tool.house-rules]), then baseline --accept-new with the human's OK, and commit both.

Hooks

  • Claude Code (any session): add to settings.json. Exit 2 shows Claude the findings in the file it just wrote:
    {"hooks": {"PostToolUse": [{"matcher": "Edit|Write|MultiEdit",
      "hooks": [{"type": "command",
        "command": "uv run --frozen --quiet --project ~/.claude/skills/house-rules/runner house-rules hook"}]}]}}
    The human's global settings.json is chezmoi-managed: propose the change; don't apply it.
  • pre-commit (per repo): .git/hooks/pre-commit containing exec uv run --frozen --quiet --project ~/.claude/skills/house-rules/runner house-rules check --staged.
  • CI: house-rules check --format github (see .github/workflows/house-rules.yml).

Naming judgement beyond the first word (whole words, no alias variables, a verb that adds nothing) stays with the reviewer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.