agentleFS
v60samuraiv60samurai/agent-skills/skills/workflow/prompt-compile/SKILL.md

prompt-compile

Skill1 starsChanged 5 months agoMITView on GitHub

Compile a high-quality task brief before executing a medium-or-larger task, then execute against it and verify. Pairs with the prompt-compile-gate hook for deterministic triggering; define-do-verify in one pass.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. JordanGunn/nunchuck★ 9same 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.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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:

    Not for bug fixes: your debugging workflow owns those.

    line 15
  2. Distinctive:

    Not for trivial one-file one-step edits: if the gate misfired, say "trivial, skipping brief" in one line and just do it.

    line 16
  3. Distinctive:

    Every stage that has a matching skill names it explicitly - the executor must not rediscover routing.

    line 38
  4. Distinctive:

    No checkpoint needed? Say "no checkpoints" explicitly.

    line 43
  5. Distinctive:

    After execution, walk section 6 line by line.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Prompt Compile

Define-do-verify for real tasks. Compile a brief (define), execute it in fresh context where possible (do), check the result against the brief (verify). The brief is the prompt an experienced operator would have hand-written before a big task - now generated in-session, every time.

When this runs

  • Fired by the prompt-compile-gate.sh hook (medium and high bands), or invoked manually.
  • Not for bug fixes: your debugging workflow owns those.
  • Not for trivial one-file one-step edits: if the gate misfired, say "trivial, skipping brief" in one line and just do it.

Compile the brief

Seven sections. All required. Missing section = brief not done.

1. TASK + NON-GOALS

One paragraph: what changes, and what is explicitly preserved. Non-goals are the highest-value words in the brief ("polish pass, not a rebuild. Preserve data, routing, behavior. Change presentation only.").

2. TARGET

Concrete environment, not adjectives. "Latest iPhone Pro, ~402pt logical width, Dynamic Island, home-indicator safe area" - never "mobile-friendly". For non-UI work: runtime, versions, load shape, who consumes the output.

3. CONSTRAINT SOURCES

Files the executor must read before generating anything: design docs, design tokens, schema, project instructions (CLAUDE.md / AGENTS.md), style guides. Hard rule inherited by every brief: if a needed value or source does not exist, stop and flag - never invent one.

4. SKILL SEQUENCE

Scan available skills; name them in execution order, with register or mode where it matters. Example: /distill -> /adapt (product register) -> a craft/polish pass. Every stage that has a matching skill names it explicitly - the executor must not rediscover routing.

5. CHECKPOINTS

Where execution stops for the user's confirm: proposed cuts before restructure, variant pick before writing to source, destructive step before running. Input is just a link or pointer -> diagnostic pass is checkpoint zero. No checkpoint needed? Say "no checkpoints" explicitly.

6. VERIFY

Observable pass/fail criteria, checkable after execution: no horizontal overflow at target width, tap targets >= 44pt, all states handled (loading/error/empty), typecheck clean, tests green. E2E where the change has a runtime surface.

7. OUTPUT CONTRACT

The shape of the executor's final response, in order. Example: diagnostic -> proposed cuts -> 3 variants -> craft pass on winner -> diff summary + anything that couldn't be done within constraints.

Execute

  • Medium band: show the compiled brief, non-blocking - start immediately, the user interrupts if it is wrong.
  • High band: show the compiled brief and WAIT for explicit approval before executing.
  • No checkpoints in the brief -> hand the brief verbatim to one fresh subagent. Verbatim means the brief is the entire prompt; no extra context smuggled in.
  • Checkpoints in the brief -> subagents cannot talk to the user, so either run inline with the brief as the plan, or run one subagent per inter-checkpoint segment, returning to the user at each gate.
  • Task depends on conversation state (builds on the last N minutes of this session) -> run inline.
  • Subagent runs pay a cold-start tax: the segment must be meaty enough (roughly >5 minutes of work) to amortize it, else run inline.

Verify

  • After execution, walk section 6 line by line. Each criterion: pass or fail, stated.
  • Any deviation from the brief (constraint broken, section skipped, invented value) gets reported, not silently absorbed.
  • Fail -> fix before reporting done. This is the loop's exit condition, not a formality.

Worked example

The brief below is the reference for register and completeness (a hand-written original, abridged):

Polish [SCREEN] for mobile. Polish pass on existing screen, not a rebuild. Preserve data, routing, behavior. Change presentation only. (1: task + non-goals) Target latest iPhone Pro ~402pt, Dynamic Island, home-indicator safe area; Pixel 9 Pro ~412dp. (2: target) Read DESIGN.md, PRODUCT.md, design tokens before generating. No new colors, radii, shadows, fonts, spacing. Value missing as token -> stop and tell me. (3: constraint sources) Step 1 declutter/distill, step 2 adapt for mobile in product register, step 3 craft pass on the winner. (4: skill sequence) Diagnostic first, I confirm. Show cuts, I confirm. 3 variants, I pick, no auto-accept. (5: checkpoints) Safe areas respected, tap targets >= 44pt, no horizontal overflow, invisible states handled. (6: verify) Diagnostic -> cuts -> variants -> craft pass -> diff summary; flag anything outside tokens. (7: output contract)

A brief that reads thinner than this is not compiled yet.

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.