agentleFS
SparduttiSpardutti/claude-skills/CLAUDE.md

claude-skills

CLAUDE.md3 starsChanged 3 months agoMITView on GitHub

This is the source repository for a collection of Claude Code skills that get distributed via the @spardutti/claude-skills CLI and installed into other projects. Skills are authored here, then consumed elsewhere. Skills are not meant to be invoked when working inside this repo. The auto-invocation hook (skill-gate.sh) is a build artifact — it's the thing being shipped to consumer projects, not a workflow rule for editing the skills themselves. When working in this repo, your job is to author and…

  • Commits and pushes

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use BAD/GOOD code pairs as the primary teaching tool — they are more effective than prose explanations.

    line 30
  2. Distinctive:

    Keep prose minimal. If the code example speaks for itself, don't explain it.

    line 31
  3. Distinctive:

    When adding or renaming a skill or command, update the README's tables to match.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md

Claude Skills Project

What this repo is

This is the source repository for a collection of Claude Code skills that get distributed via the @spardutti/claude-skills CLI and installed into other projects. Skills are authored here, then consumed elsewhere.

Skills are not meant to be invoked when working inside this repo. The auto-invocation hook (skill-gate.sh) is a build artifact — it's the thing being shipped to consumer projects, not a workflow rule for editing the skills themselves. When working in this repo, your job is to author and maintain skill content, the CLI, and the hook — not to run skills against your own edits.

The CLI is a picker, not a bulk installer. Consumers run the CLI and choose which skills to install per-project. So a full-stack project (e.g. Python + React) will legitimately install many skills at once. When reasoning about "skill bloat," assume the user already picked the minimal set they need — the lever is not "install fewer" but "make each installed skill cheaper to keep loaded" (tighter descriptions, bundling related skills, smarter gating).

Skill File Guidelines

  • Skills live in skills/<skill-name>/SKILL.md. A skill may be a bundle — SKILL.md plus reference files in the same directory that it routes to (see Structure below).
  • Frontmatter must include category: (e.g. Database, Frontend, Backend, Workflow). The CLI picker (cli/lib/prompt.mjs) groups skills by category in the install UI — dropping this field breaks grouping. Anthropic's spec only requires name and description, but category is a project-level convention parsed by cli/lib/github.mjs.
  • Length targets differ by file role — SKILL.md is loaded into context on every activation and stays there, so every line is recurring cost; reference files load on demand, one at a time, only when SKILL.md routes to them.
    • SKILL.md: target ~250 lines, hard cap 350. Under 150 is too thin.
    • Reference files (other *.md in a skill dir): target ~250 lines, hard cap 500 (Anthropic's documented SKILL.md limit). They don't compete with conversation history the way SKILL.md does, so the cap is looser.
    • Reference files over 100 lines need a ## Contents TOC near the top (validated by scripts/validate-skills.mjs).
  • Use BAD/GOOD code pairs as the primary teaching tool — they are more effective than prose explanations.
  • Keep prose minimal. If the code example speaks for itself, don't explain it.
  • End every skill with a Rules section: short imperative statements ("Always X", "Never Y").
  • Markdown that helps: ##/### headers (semantic anchors), code blocks, bold for emphasis.
  • Markdown that doesn't help much: tables (unless compact), blockquotes, horizontal rules, deep nesting.

Versioning & Publishing

  • Bump cli/package.json version on every shipped change.
  • Semver: new skills or hook/CLI features = minor bump; fixes to existing skills, hook, or CLI = patch bump.
  • Publish flow: bump version → bash scripts/preflight.sh → commit → push to main → push the tag v<version>, which is what publishes → GitHub release.
  • The tag publishes, not your laptop. .github/workflows/publish.yml runs on a pushed v* tag and publishes over OIDC (npm Trusted Publishing), so there is no token in the repo and no 2FA prompt. It refuses a tag that disagrees with cli/package.json. Preflight still runs locally first — it surveys real repositories on the machine and cannot run in CI. npm publish ./cli --access public by hand still works if CI is down.
  • A skill that names a version declares it in frontmatter as tracks: react@19.2, react-hook-form@7.87 (add (pypi) for a Python package). scripts/check-freshness.mjs asks the registries and preflight fails on a MAJOR behind — a skill teaching a superseded major is worse than one that names no version at all. A minor behind is reported, not fatal.
  • Preflight is not optional and its output is the evidence. Paste the failures, not a summary, and do not publish while it is red. Every hook bug that reached a published version got there because the happy path was tried on a freshly invented repo and nothing else was, so preflight checks the things that actually broke: the self-tests, that the hook scripts embedded in the CLI still match scripts/, that detection still works against real repositories (gauntlet-survey.sh), and that the version is genuinely ahead of the registry.
  • A behaviour change ships with a test in scripts/gauntlet-selftest.sh that fails without it. Not a manual check, not a paragraph in the release notes. If it cannot be tested, say so out loud in the commit rather than quietly shipping it.
  • Assert the argument list, not the verdict. A stub is written from the same belief as the code, so it agrees with the bug and the verdict still comes out green. The gate handed Stryker a repeated --mutate for four releases — a flag Stryker's CLI overrides rather than appends, so exactly one file per run was ever mutated — and every self-test passed the whole time, because they only asked whether the gate said green. --incremental was the same shape before it. When the gate builds a command for a real tool, stub that tool to log each argument and compare the whole list; a flag that repeats, a flag that comes back, or a value that lost a file all fail there and nowhere else.
  • Test the upgrade, never only the install. setupHook runs against projects that already have an older settings.json, and a hook registered under an old matcher stays on the old matcher unless the installer corrects it. Fresh-install tests pass right through that.
  • Two implementations of one rule will drift, silently. The CLI once carried its own copy of the hook's stack detection and reported "no test runner" for repos the hook handled fine. Call the one implementation instead — ship-gate.sh --key, gauntlet.sh --dryrun — rather than reimplementing it in JS.
  • The GitHub release is part of shipping, not optional: gh release create v<version> --target main, tagged v<version> to match cli/package.json. Notes are grouped by change kind (## New / ## Freshness / ## Removed / ## Docs — only the sections that apply), one bullet per skill/command/agent saying what it does, closing with the install line. Match the previous release's shape (gh release view the last tag).

Structure

skills/
  <skill-name>/
    SKILL.md          # Entry point — loaded when the skill activates
    <REFERENCE>.md    # Optional reference files (bundles) — loaded on demand
commands/             # Slash commands — installed to consumers' .claude/commands/
agents/               # Subagent definitions — commands declare which they need
scripts/
  validate-skills.mjs # Skill length/reference validator — runs on pre-push
cli/
  package.json        # Published CLI version — bump on every release
  bin/cli.mjs         # CLI entry point
  lib/
    setup-hook.mjs    # Embeds skill-gate.sh + automark hook scripts
    install.mjs       # Skill installer
    ...
.husky/
  pre-push            # Runs the skill validator
package.json          # Private dev-tooling package (husky) — NOT the published CLI
README.md             # Project readme with the skills + commands tables
CLAUDE.md             # This file

A bundle is a skill whose SKILL.md routes to reference files in the same directory (e.g. skills/react/ → COMPONENT-DESIGN.md, USE-EFFECT.md, …). SKILL.md carries the always-loaded 80% case; references hold the deep-dive 20% and load only when SKILL.md points to them.

Cover the tools actually in use. Split a reference file per tool when a third one arrives, not before. A reference that documents several tools for the same job (mutation testing → Stryker, mutmut, PIT) grows about 60 lines per tool, and only when a new language is adopted — an event, not drift. Pre-writing a section for a tool nobody here uses is the real bloat. At the split, the stack-neutral concepts stay in the original file and each tool's setup and traps move out, so it happens once and the shared half stops growing.

When adding or renaming a skill or command, update the README's tables to match.

The 200-line limit — for the skills, and for this repo

Skills should teach consumers to never write a single file longer than 200 lines of code. If a skill includes code examples or generates code, that guidance must be reflected in the skill's content.

It applies here too. This file used to end that paragraph with "this is a rule for the skills, not a rule for files in this repo" — and under that exemption setup-hook.mjs reached 1740 lines with nothing objecting, because 1400 of them were a pasted second copy of files that already existed. A repo that ships a rule and exempts itself from it has stopped believing the rule.

scripts/line-limit.sh enforces it, and preflight runs it. It is a ratchet, not a cliff: the eight files already over the limit are recorded in .line-limit-baseline and may not grow, and anything not in that file gets the real 200-line limit. A hard cap would have failed on day one, and a gate that cannot go green on day one is a gate someone deletes.

Pay debt down by splitting a file, then bash scripts/line-limit.sh --baseline to bank it. Never re-baseline to make a growth failure go away — that is the same move as --baseline on a live mutmut survivor, and it is wrong for the same reason.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.