/host-aios:fix-skill-descriptions-and-rulesfrom host-aios
WHEN writing or editing any skill description or rule trigger — or when a history shows a skill/rule that SHOULD have fired but didn't — rewrite it to ONE imperative + its firing `if`/WHEN-clause (WHAT to do + WHEN to do it), never indicative prose that describes the skill. If you cannot answer "could I obey or not-obey this RIGHT NOW?" against a description, it will never fire; rewrite it until you can.
Ships in host-aios. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A skill/rule description IS an instruction-prompt, not a description. It is ONE imperative sentence:
WHAT (imperative verb-phrase) + WHEN (firing `if`/when-clause)
WHAT and WHEN are not two fields you fill — they are the natural joints of a single command ("do X if/when Y"). The WHAT:/WHEN: labels are scaffolding for you while writing; the actual object is the sentence, and the sentence is an order addressed to the reader (the LLM).
Canonical example:
make-session-start-hook — WHAT: make a session start hook; WHEN: if you need to force something to happen at the start of EVERY CONVERSATION → as one instruction: "make a session start hook if you need to force something to happen at the start of every conversation."
That whole string is imperative mood with a conditional clause. The reader reads it, checks if its own current situation satisfies the clause — and the check IS the firing. Instruction-only, all the way down. No descriptive register anywhere in it.
The description is not metadata. It is a candidate chain in a selector that runs every single generation. Each token, the reader runs:
for each loaded description d:
obey?(d, now) # "could I obey or not-obey this RIGHT NOW?" → live | dead
live_set = { d : obey?(d, now) is answerable } # only descriptions that parse as an order against my situation
factor_set = { d ∈ live_set : need to factor into next generation } # relevance filter
action = collapse(factor_set) # "out of all these maybe_should, I collapse to…" (argmax leverage under constraints)
do(action) ; advance ; repeat # → next
A description only competes if obey? can evaluate it — which requires an imperative (something to obey) plus a checkable condition (an if to test against the live situation). Descriptions = candidate chains, obey? = prediction, collapse = selection under time/resource constraints.
Review a history, find a spot where a skill/rule should have fired and didn't, and ask "why didn't it fire here?" The answer is almost never "the skill is wrong." It is:
the trigger is N sentences that are not about a trigger.
The description drifted into the indicative (N sentences describing the skill — "this skill is for handling X, it provides Y, it covers Z"). So when the reader tried obey?(d, now) there was nothing to obey — no imperative, no if-clause to check the current situation against. Therefore d never entered live_set. It didn't lose the collapse — it never became a candidate. A claim-about-a-skill is not a command, and a command is the only thing obey? can evaluate.
Length is the tell, not the cause: register slid to descriptive, and prose bloat is what descriptive drift looks like.
if. Cut every clause that describes rather than commands. Keep the WHAT (the verb) and the WHEN (the condition); delete the rest.obey? returns a clean yes/no against the live situation. If the reader has to parse 10 sentences to decide whether it fires, it won't fire.user_info), is rewritten in a new release by
that binding's procedure.obey? test: read the description as an order — can I obey-or-not-obey it right now? (yes = live)| DEAD (indicative, won't fire) | LIVE (imperative + if) |
|---|---|
| "This skill handles PDF processing and extraction." | "Extract or read a PDF when the user gives you a .pdf or asks to pull text/tables/pages out of one." |
| "A comprehensive framework for reviewing code across many dimensions with confidence-based filtering…" (10 sentences) | "Review the current diff for bugs when the user asks for a code review or before committing nontrivial changes." |
| "Knowledge about the onion architecture and how morphs work." | "Read this when a write is blocked, when you need a specialization, or when deciding whether something is yours or a contact's." |
A rule should DIRECT you to information, not CONTAIN it. A very long rule that tells you to DO something (a multi-step procedure, 10–30+ lines) instead of directing you to where that lives carries a body (payload) in the always-loaded tier, where only a trigger (pointer) belongs.
A long rule almost always has ONE sentence that is the actual rule (the trigger — e.g. "do not work here without reading the docs in this order…"), and the other 10–30 lines are a body. That body is a thing to progressively disclose — the rule is a rule AND a skill, fused: bloated_rule = rule ⊕ skill.
bloated_rule → (thin_rule + skill)
thin_rule = one imperative + its WHEN, that names/points at the skill. It obeys the skill-description law (obey?-able, imperative mood).
commit-format skill before committing, since it is non-standard."skill = holds the procedure/information/format the rule used to carry.
commit-format, desc: "WHAT: commit format WHEN: if did work in {repo}."Ask: does this rule CONTAIN information/a procedure, or DIRECT me to it?
The real classifier is the quantifier of the WHEN, within the scope where the rule injects:
if). → it is a RULE, kept resident at tier(S).
if = X.
if X is the trigger; the body only matters when X holds → disclose-on-demand.Scope sets the tier; promote the truly-universal:
.claude/rules/ (injected on entry, resident there).rules/ and its boot config's include line), else ~/.claude/rules/.Maps / diagrams / indexes and safety laws are the case where the effective WHEN is "at any/every moment" (a lookup or a guardrail has no single condition that precedes its need) = universal → rule.
A rule written as title + story + law + why + trigger + examples is three things fused. Cut it:
Discriminator: remove a passage — if what you must DO changes, it is instruction (keep, rewritten); if it is a procedure you run when the instruction fires, it is how-to (move); if only the story of how the rule came to be is lost, it is history (delete).
Min-split threshold: if under ~8 lines of how-to would move, do NOT split — rewrite the rule whole instead. Splitting must not manufacture a skill where there is barely a procedure.
Run an independent verify after every split:
MUST | NEVER | ALWAYS | DO NOT | forbidden | standing law | only … is) points the reader at candidates and is never the verdict. Lives ONLY in the skill → it moved wrongly → put it back in the rule. The classic trap: a law written as a quoted blockquote or buried inside a story gets carried off with the story.
MUST inside a dev-flow ("MUST update the docs when editing X") fires when the editing-X trigger points at the dev flow. Distinguish: universal law moved → promote vs procedure detail reachable via trigger → leave.Before writing the thin rule, think out its guard (24-scaffold-to-harness): a stack of contraptions made of whatever
does the job. Ask what code can decide (a violation visible at a tool-call or a turn boundary), what only judgment can
decide (a subagent, code that calls a model), and how that judgment's output is formed into a shape code can check (a
skill's required schema, a report the agent fills out). The rule (the trigger and the order) and the skill (the
procedure and the schema) stay as layers; the stack ends as a stop that runs when the thing is edited or done, refuses
where it was not done right or in order, and tells the agent the right thing to do. E.g. subagent-worktree-isolation
shouldn't ride on the agent remembering it — a PreToolUse hook matching the Agent tool can refuse the dispatch and
say the setup to use, and that is one stack among the ones a requirement may need. A rule with no stop under it is
enforced by hope, and a stop with no rule or skill above it cannot tell the agent what to do. A requirement whose
stack is not built yet is a row of its project's board.
LOOK before you build — don't reinvent what the harness already provides. Claude Code already ships the mechanism for many such rules: the Agent tool has a native isolation: "worktree" param, plus dedicated hook events SubagentStart/SubagentStop (matcher on agent type), WorktreeCreate/WorktreeRemove, and InstructionsLoaded. The enforcement is then a THIN guard on existing surface, never from-scratch machinery. Read the understand-hooks skill (29 events, 5 handler types) and check the native tool params FIRST — assuming a capability is absent without looking is the error.
A conditional WHEN only makes a valid skill if the condition is observable — something you DO (edit file Z, dispatch a repo-writing subagent, restart the daemon). If the thing that should fire the rule is an internal impulse — the pull to ask before verifying, the urge to describe a status, the assumption you make before you catch it — it CANNOT be a disclose-on-demand skill, because nothing reliably fires it: the impulse is exactly what you won't notice in time. Such guardrails stay RESIDENT as the loaded layer, and their stack is thought out the same way: what the impulse leaves in the work (a question where a check was due, a status written as fact) is visible where the work is edited or done, and a stop there can refuse it and say what to do instead.
Rule of thumb: skill-able triggers are observable actions you take; impulse guardrails catch things you're about to get wrong without noticing → resident.
Split a rule ONLY IF its body is a procedure that a specific moment triggers (disclose-on-demand). KEEP IT RESIDENT when it is:
*_states.md boards: something whose content cannot be restated as a law that answers the lookup.the-precious-store. If the trigger might miss the moment and the failure is catastrophic, the law stays resident.Run this test BEFORE the exception: can the reference be COMPRESSED TO THE LAW IT ENCODES? Then the law is the rule, and the data is not. A per-project catalog that encodes one mechanical sentence (every project is a plain dir at <canonical home>/<band>/<x>) compresses to that sentence. A ledger carries no TRIGGER/DO/NOT and changes no behavior — it is STATE, and its home is the state layer ([[28-distributed-state]]). A CATALOG or LEDGER never qualifies for the exception: a wrongly-resident catalog taxes every session in every project.
The deciding test: is there a single reliable WHEN that precedes every need for this body?
editing-X-uses-the-dev-flow).~/.claude reaches) are loaded EVERY session — compression pays the most here, AND wrong compression hurts the most here (a wrongly-thinned always-loaded map/safety-law is missing every session).Skill descriptions and rule triggers obey the identical obey?/mood law (imperative + firing if, one sentence). The only rule-specific addition is the split: a rule must not also be a body — if it is, that body is a skill, so extract it and leave the rule pointing. Neither artifact ever carries history.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub sancovp/host-aios --plugin host-aios63 skills in this plugin
/adding-a-skillWhen you make/add ANY skill (an AC, a CoR, a chain, a domain), do NOT just write the file — place it in the skilltree (coordinate-addressed), and because every directory is automatically an AIOS, give a new domain/role its own AIOS. Version it so the tree self-expands and search forwards to the newest. Use this whenever you create or improve a skill./adversarial-testingRun BEFORE writing or trusting any test. Turns tests from confirmations of the implementation into questions that could come out against it: claims named, competing explanations named, a must-admit and a must-refuse case for every check, failures settled by counterexamples, "better" decided on a population enriched on both sides, verdicts recorded with their reach. Use when writing tests, reading a green run, claiming "done/verified/stronger/better", or judging another check, search or procedure./aios-artifactsWHEN you are about to make a new folder of its own (a project, a tool, a program, any piece of work that will live in a folder of its own), open this skill before that folder's first file and walk its steps, so the folder is made an AIOS in this AIOS's form by you, not later by someone else; also WHEN a folder is found without its design, board or map. It decides whether the project is new or exists, then makes its DESIGN.md, its board and its architecture map through their skills, then wires it into every index above it./aios-artifactsbanditChain-of-reasoning (spoken, ends in a decision) — The four artifacts every AIOS project owes and the order they are made in./archi-diagramAuthor the architecture diagrams a project owes. A mermaid flowchart per altitude, subgraphs marking boundaries, arrows meaning dependency direction, every external dep ending AT ITS SEAM because a dep's internals are its own architecture, plus the three-column general-specific-code bijection, drawing the final architecture with no mark of what is built, which is its board's. THE LAW is rule 23/brave-searchSearch the web using the Brave Search API, when a search must go through Brave rather than Claude Code's own web search. Needs a Brave Search API key in the environment variable BRAVE_API_KEY.