agentleFS
Samuel0101010Samuel0101010/wisp-rulecast/skills/compile/SKILL.md

compile

Skill1 starsChanged 6 months agoMITView on GitHub

Re-compile CLAUDE.md rules into Claude Code PreToolUse hooks. Use after the user edits CLAUDE.md, when they add a NEVER/ALWAYS/DO NOT rule, or whenever they ask to "compile rules", "enforce CLAUDE.md", "lock in the rules", or "regenerate hooks". Turns prose rules into hooks so the next tool call that would break a rule is denied at the protocol layer.

  • Reads credentials

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use expert-reset, updates and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jtenniswoodSkill

    expert-reset

    Reimagine this repository from first principles using the current product and user experience as the target. Use when the user says "/expert-reset", asks how the project should be rebuilt if starting again, wants bold architecture or component-structure recommendations, or wants a research-only reset plan unconstrained by current implementation details.

    Also in 3 projects that use this

  • jtenniswoodSkill

    updates

    Summarize user-facing project updates from the last 7 days, ordered by importance and written as one-sentence "Feature: description" entries. Use when the user says "/updates", asks what changed recently, or wants a concise list of recent features, device support, fixes that users will notice, or other product value.

    Also in 3 projects that use this

  • MicrosoftSkill

    pr-review

    Verify the technical accuracy of a vscode-docs pull request against the VS Code source code in microsoft/vscode. Use when reviewing a docs PR for factual correctness: setting names, command IDs, default values, API shapes, keybindings, versioned availability, and described behavior.

    Also in 3 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Run wisp-rulecast compile.

    line 18
  2. Distinctive:

    If output flags vague rules, surface them to the user with the suggested rephrasing.

    line 19
  3. Very specific:

    Run wisp-rulecast verify to confirm the dispatcher denies a synthetic violation per rule.

    line 20
  4. Very specific:

    Do not hand-edit .claude/settings.json for rules that came from CLAUDE.md — they will be overwritten on the next compile.

    line 22

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

wisp-rulecast — compile CLAUDE.md rules to hooks

Behavioral rules in CLAUDE.md ("NEVER commit .env") are advisory until they are compiled. wisp-rulecast parses them, classifies enforceable vs vague, and writes PreToolUse hooks into .claude/settings.json plus a tiny dispatcher into .claude/wisp-rulecast/dispatch.mjs. The next time Claude tries git add .env, the hook denies it with the source-line reason.

When to invoke

  • The user edited CLAUDE.md and added or changed a NEVER / ALWAYS / DO NOT rule.
  • The user asked to "compile the rules", "enforce CLAUDE.md", "regenerate hooks", "lock in the rules", or anything semantically equivalent.
  • A new repository was just initialized with a CLAUDE.md and no .claude/wisp-rulecast/rules.json yet.
  • The user reports a rule that "isn't being followed" — re-compile and check the audit log.

What to do

  1. Run wisp-rulecast compile. The binary is on PATH while this plugin is enabled.
  2. If output flags vague rules, surface them to the user with the suggested rephrasing.
  3. Run wisp-rulecast verify to confirm the dispatcher denies a synthetic violation per rule.

Do not hand-edit .claude/settings.json for rules that came from CLAUDE.md — they will be overwritten on the next compile. Add user-only hooks under a different matcher or different command path; wisp-rulecast preserves any hook group that doesn't route through its dispatcher.

Subcommands

CommandWhat it does
wisp-rulecast compile [--dry-run] [--explain]Parse CLAUDE.md, write hooks + rules + dispatcher
wisp-rulecast verifySpawn the dispatcher with a synthetic violating input per rule, assert deny
wisp-rulecast audit [--since 24h]Markdown summary of blocked violations from the JSON-lines log
wisp-rulecast resetRemove every wisp-rulecast hook from settings.json (user hooks preserved)

Slash form for explicit compile: /wisp-rulecast:compile. Audit / verify / reset are invoked as bash commands directly (the binary is on PATH).

Full grammar reference: docs/rule-grammar.md. Generated hook shapes: docs/hook-templates.md.

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.