/intent-compiler:compile [raw intent] [--target=haiku|sonnet|opus] [--commitment=0..3]from Intent Compiler
Turn a raw intent into a compiled prompt — compressing the mechanism onto canonical terms the model already holds, carrying project facts and the acceptance criterion through verbatim, and naming what the compression removed. Scores each candidate term for canonicity, frame precision, frame fit and shared ground, then gates the result on what a wrong expansion would cost.
Ships in Intent Compiler. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Compile the intent in $ARGUMENTS into a prompt whose mechanism rides on
terms the executing model already holds. If $ARGUMENTS is empty, compile the
most recent intent the user described in the conversation.
You are not doing the task. Do not implement, edit, or execute the intent, and do not run the prompt you produce. Inspect the repository only to settle whether a term is project-local or public, and only with the read-only tools above.
The split, the rubric, the commitment gate, the mode table and the lexicon
thresholds are shared plugin material in
${CLAUDE_PLUGIN_ROOT}/reference/compression-core.md. This file owns only the
procedure and the output.
Read, in this order:
${CLAUDE_PLUGIN_ROOT}/reference/compression-core.md — always; it is the
rubric you apply in step 4.${CLAUDE_PLUGIN_ROOT}/reference/polysemous.md — only when a candidate
term is not obviously safe (progressive disclosure). A prompt anchored
entirely on RFC 7807 and exponential backoff does not need the
overloaded-terms catalogue in context.${CLAUDE_PROJECT_DIR}/.claude/intent-lexicon.jsonl if it exists. Absent on
a fresh project; that is normal and you proceed on the rubric alone.
Interpret it with the core's Lexicon thresholds; the schema lives in
${CLAUDE_PLUGIN_ROOT}/reference/lexicon.md.CLAUDE.md and any project glossary, when the intent uses vocabulary you
cannot place. A term defined there is shared ground within this project —
score dimension 4 accordingly, and prefer a pact that cites it.Resolve two parameters:
--target=.
Default: assume the calling session's model. When the target is a tier below
the model running this skill, subtract 1 from canonicity per the core.--commitment=, or inferred from the intent using the
core's level table. When you infer it, say so and say from what; when the
inference is between two levels, take the higher one.Cut the raw intent into reducible and irreducible per the core's split table. Do this before scoring anything — it is the step that decides what is even a candidate, and skipping it is how acceptance criteria get paraphrased.
Two checks before moving on:
For each reducible piece, name the candidate term — the catalogued concept whose frame covers it. Zero, one, or several per piece.
Then apply the implication test to each candidate, which is the cheapest canonicity check available: state, in bullets, what the term implies. Do it from your own knowledge, not by asking the user. Compare against the intent:
If the implication list comes out different when you consider the term twice, its intension is not fixed. Score canonicity ≤ 1 and say why.
Apply compression-core.md in order:
Score per term. One intent commonly produces a pure anchor, a trimmed anchor and a pact in the same compiled prompt.
Assemble it in this order, which is also the order the executing model reads it in:
Rules for the prompt itself:
Return exactly this structure and nothing else. Every angle-bracket field is required; omit an optional section only when its condition does not hold.
Mode: <the dominant term's mode; add "(mixed)" when the others differ>
Compressibility: canonicity N, precision N, fit N, ground N — total N/12
Commitment: N — <what a wrong expansion would cost here>
Target: <model the prompt is compiled for, and whether it was given or assumed>
--- compiled ---
<the prompt, ready to paste, nothing else inside these markers>
--- end ---
Anchored terms:
- <term> → <the frame it imports, one line> [mode, total N/12]
Trimmed:
- <frame element> — <why it does not apply here>
Irreducible (carried verbatim):
- <fact, constraint, or the acceptance criterion, and which it is>
Dropped:
- <what left the raw intent, and why it carried no information>
Risk:
- <the most likely wrong expansion, and the signal in the output that would reveal it>
Lexicon (run after the task, with the real outcomes filled in — or invoke
/intent-compiler:log-lexicon to have them filled from the session):
python3 "${CLAUDE_PLUGIN_ROOT}/skills/log-lexicon/log-lexicon.py" \
--term "<slug>" --mode <mode> --note "scored N/12" \
--adhered <?> --leak <?> --misread <?> --corrections <?>
The three header lines describe the dominant term — the one carrying the most of the intent. Per-term scores and modes live in Anchored terms; never average scores across terms, which produces a number describing no decision you actually made.
Emit the lexicon command every time, one per anchored term, with term,
mode and the score in --note already filled and the outcome flags left as
<?> placeholders — those are only knowable after the prompt runs. Reuse an
existing slug from the lexicon whenever one fits; near-duplicate slugs are what
stop a term from ever reaching the three-entry threshold. Do not run the
command and do not write the lexicon — Write is disallowed here by design,
this skill runs before the task, and recording belongs to log-lexicon after.
Conditional sections, each included only when its condition holds:
Run /intent-compiler:expand on the compiled block above before using it.--kind pact logging
command so the next session starts with it./model-router:choose-model, which scores the
compiled intent rather than the raw one.projection as a SQL column list, which you would see
as a query instead of a read-model class" is useful; "this term is somewhat
ambiguous" is not. If you cannot name the failure, you do not know the term
well enough to anchor on it — score precision down and re-run step 4.What SKILL.md sets; muted values are Claude Code's defaults
Use before handing a substantial intent to a model — an implementation task, an architecture request, a review brief, an agent or subagent prompt — when the intent is still in your own words and you want it anchored on terms that carry their meaning. Never execute the intent itself. To audit an already-compressed prompt for unwanted entailments, use expand instead.
sonnetmedium3 skills in this plugin
/expandThe mirror of compile — read a compressed prompt back and itemize the frames its terms import, separating what the model will assume as core from what it will merely lean toward, flagging terms whose sense is not pinned, and naming the entailments the intent never asked for. Shows the bill before you pay it./log-lexiconAppend an honest entry to the project's intent lexicon after a compiled prompt has run — how the anchor actually behaved, or the agreed definition of a local term. Companion to the compile and expand skills, which run before the task and never write.Other plugins' skills for the same job
npx claudepluginhub jr-jesse123/claude-tookit --plugin intent-compiler