Agents and LLMsHarness and toolingreference
A skills system for coding agents
A skill is an on-demand instruction file. Each skill carries a name and a one-line description that the model sees on every turn, and the body loads only when the description matches the task. This page covers how the pi harness keeps its skill corpus useful at scale: what a skill file holds, how the description works as a trigger, what the lint checks, how a subset reaches a second harness, and how two extensions push the model to open the matching file.
The worked example is the pi harness skill tree, the subject of the hub at The pi harness journey. Counts and thresholds were read from the harness source on 2026-10-20, except where a line says otherwise. The lint’s checks and config come from the linter and its JSON (JavaScript Object Notation) config file, and the extension behaviour from their headers and source. The last section lists what applies to any skill corpus.
TL;DR:
- Name and description are in context on every turn. Across the 84 top-level skills, descriptions total 37,323 characters (mean 444, longest 499) and names 1,079, measured 2026-10-31. The 7 work skills under
skills/work/bring it to 91 skills and 40,543 characters, longest 610. - The description lists triggers (“Use when…”) and no workflow. A description that summarises the process gets followed instead of the body.
- A lint runs at commit time and the pre-commit hook blocks on errors. It covers description length, body size, smart punctuation, retired terms, stale
verifieddates, unreferenced sibling files, dead paths and references to skills that do not exist. - 74 of the 84 skills reach Claude Code through per-skill symlinks. The directory listing is the allowlist.
skill-guardblocks a matching tool call once with a nudge.skill-firstre-injects a reminder for up to 3 injections per session until a skill file is read.- After a milestone, a stocktake pass updates every skill whose system changed, in the same commit as the system change.
Topology
Section titled “Topology”Each skill is a directory under .pi/agent/skills/<name>/ with a SKILL.md and optional sibling files. Only the description reaches the system prompt. The body and siblings are read on demand.
What a skill costs and where
Section titled “What a skill costs and where”| Part | When it is loaded | Context cost | Cap |
|---|---|---|---|
name | Every turn, every session | About 13 characters per skill on average (1,079 across the 84 top-level skills, 2026-10-31) | Must equal the directory name |
description | Every turn, every session | 37,323 characters across the 84 top-level skills, 40,543 with the 7 work skills (2026-10-31) | Warn past 500 characters, error past 1024 |
Body (SKILL.md) | When the description matches the task | On demand | Warn past 500 lines. Reference over about 100 lines goes in a sibling file |
| Sibling files | When the body points at them | On demand, one level deep | No cap. Linked by plain filename, never @ |
metadata.verified | Lint only | None per turn | Warn past 90 days |
Every request pays for every description, so the 500-character cap is a cost ceiling. At the cap, each added skill adds up to 500 characters to every request for as long as the skill exists.
The description as trigger surface
Section titled “The description as trigger surface”The description answers one question: should the model read this file for the task it is about to do? The authoring rules, from the writing-skills skill1:
- Start with “Use when…” (or “Use ONLY when the user explicitly asks” for a skill that should not auto-fire). The lint warns on anything else.
- List concrete triggers: symptoms, error text, tool names, file names, user phrases. They are the terms the model matches against the prompt.
- Leave out the workflow. A description that says “covers the X workflow, providing Y and handling Z” is followed instead of the body. In the case recorded in
writing-skills, a description that said “code review between tasks” produced one review where the body specified two. - End with a “NOT for
<sibling>” clause where two skills can be confused. - Write in the third person, under 500 characters. The lint errors past 1024, where pi refuses to load the skill.
The writing-skills description1 follows these rules:
Use when creating a new SKILL.md, making substantial structural edits to an existing one, or deciding whether a technique deserves a skill at all - frontmatter format, description-trigger calibration, body length, sibling reference files, pressure-testing a skill with subagents, running skills-lint. Do not auto-fire on minor description tweaks. NOT for the prose voice of a doc (erfi-voice) or the loop harness a skill might describe (self-correcting-loop).
It names concrete actions (“creating a new SKILL.md”, “running skills-lint”), an anti-trigger (“do not auto-fire on minor description tweaks”) and the siblings to use instead.
Body length and sibling files
Section titled “Body length and sibling files”A body that loads competes with the conversation for context, so it stays under 500 lines (the lint warns past that). Reference over about 100 lines moves into a sibling file, linked from SKILL.md by plain filename with a “read when…” cue. The self-correcting-loop skill is the case in point: the body holds the overview, the manifest reference and a file table, and the governor, models, sensors and lessons each live in their own file under docs/.
Siblings sit one level deep (SKILL.md -> sibling.md), never chained, so no rule is reachable only through a second link.
The @path/file.md syntax force-loads a file immediately, before the agent needs it. The lint warns on every @-link, and the authoring skill says to use a plain filename with a read-when cue.
The lint
Section titled “The lint”skills-lint.py runs on every skill. The pre-commit hook blocks on errors and prints warnings. The run on 2026-10-20: 84 skills, 0 errors, 1 warning, 10 waived.
| Check | Level | Why |
|---|---|---|
Frontmatter parses and name equals the directory | ERROR | A broken frontmatter cannot be loaded |
| Description over 1024 characters | ERROR | pi refuses to load the skill |
| Description over 500 characters | WARN | Paid on every turn |
| Description starts with “Use when” or “Use ONLY when” | WARN | Names its triggers |
| Description has no workflow or coverage verbs | WARN | A process summary gets followed in place of the body |
| Body over 500 lines | WARN | Competes with the conversation for context |
| No smart punctuation (em/en dash, curly quotes, ellipsis, nbsp) | ERROR | Mis-decodes when pasted into non-UTF-8 (Unicode Transformation Format) composers |
No @-force-load links | WARN | Loads the file before it is needed |
Every supporting file referenced from SKILL.md | WARN | An unreferenced sibling is never found |
Every ~/path exists on disk | WARN | A dead path leads nowhere |
No retired terms (from .lint.json) | ERROR | A retired term is a stale fact the agent will act on |
| Every skill reference resolves | ERROR | A reference to a missing skill is a broken link |
Dated entries under max_dates (default 8) | WARN | Fold lessons that became defaults into plain rules |
metadata.verified under verified_max_days (default 90) | WARN | Signals a skill not re-read since its system changed |
| Claude Code symlinks not dangling | ERROR | A promoted skill whose source was deleted breaks the second harness |
docs source names are real docs-mirror topics | WARN | A nonexistent source sends the agent on a dead search |
Retired terms
Section titled “Retired terms”When a system is retired or renamed, its old name goes into the retired map of .lint.json with a hint naming the replacement:
{ "retired": { "opencode": "harness retired 2026-08-15; say pi / Claude Code", "Unraid": "servarr is NixOS + ZFS since 2026-08-26 (say 'servarr NAS'; Unraid only as dated history)", "Vaultwarden": "no longer the canonical secret store; SOPS-encrypted .env in git is (2026-09-04)" }}A skill that contains a retired term fails the lint unless it has a per-skill allow entry. The allow list is for historical mentions: the writing-skills skill mentions “superpowers”, a retired skill set, in its anti-patterns section, so it has an allow entry for it. The pre-commit hook blocks the commit until the term is gone or allowed.
Freshness
Section titled “Freshness”metadata.verified is optional frontmatter:
metadata: verified: 2026-09-30The date means a human re-read the skill and confirmed it matches the system it documents. The lint warns when it is older than 90 days.
The pre-commit hook
Section titled “The pre-commit hook”.config/git/hooks/pre-commit runs skills-lint.py when a commit stages files under .pi/agent/skills/ in a repo that ships the linter. It prints warnings and fails the commit on errors, naming the offending skills and offering --no-verify as the bypass.
Making the model open the skill
Section titled “Making the model open the skill”A model skips skills it should read, most often where its trained behaviour overlaps the skill: git, Docker, Terraform, Fly. The skill-guard.ts header cites anthropics/claude-code#30387, which reports about a 50% miss rate on trained-overlap skills while novel-tool skills fire reliably2. Two extensions respond, and they complement each other.
skill-guard.ts works at action time and blocks. On before_agent_start it matches the user’s prompt against a static rule table and injects a message pointing at the matching skill. On tool_call, when the model is about to write, edit or run a command in a domain a skill covers, it blocks the call once with a nudge to read the skill file, and the retry passes. Each rule fires at most 3 times per session, and the same command never blocks twice.
skill-first.ts works at intent time and never blocks. The skill-guard nudge fires once at the start of a turn, so a model that ignores it hears nothing more. skill-first re-injects a context reminder on later turns until the model reads a skill file, up to 3 injections per session. It uses pi’s anchor mechanism so each copy keeps its position across requests, which keeps the local engine’s single-checkpoint prompt cache stable. Reading any skill file disarms it.
Pressure-testing a skill with subagents
Section titled “Pressure-testing a skill with subagents”A discipline skill, one that constrains agent behaviour under pressure, gets a baseline test before it ships. The method, from writing-skills1:
- Run the scenario with a subagent that does not have the skill. Record the exact rationalisations and failures.
- Write the skill against those failures.
- Re-run with the skill and close the loopholes that appear.
- Build a rationalisation table from all iterations and a red-flags list the agent can check itself against.
The rationalisations the skill lists for skipping the baseline:
| Excuse | Reply |
|---|---|
| “Skill is obviously clear” | Clear to you is not clear to other agents. Test it. |
| “It’s just a reference” | References can have gaps. A retrieval check takes five minutes. |
| “I’ll test if problems emerge” | Problems mean agents cannot use the skill. Test before deploying. |
| “Academic review is enough” | Reading is not using. Test application scenarios. |
The testing-skills-with-subagents.md sibling file in the writing-skills directory has the full method and worked iterations.
Promoting a subset to a second harness
Section titled “Promoting a subset to a second harness”Skills live in .pi/agent/skills/<name>/, since pi is the primary harness. A skill reaches Claude Code only through a per-skill symlink in .claude/skills/. The directory listing is the allowlist: 74 of the 84 skills are promoted, plus a real lsp-servers/ plugin directory that is not a skill symlink.
The promotion rules, from the dotfiles AGENTS.md “Agent-surface routing” section3:
- Methodology, infrastructure and operations skills are eligible when they are useful from the second harness.
- Private-corpus tools (anything touching personal session data) are never promoted.
- Media and GPU (graphics processing unit) generation and personal operations stay pi-only by default.
There is no config file, registry or sync pipeline. A skill for both harnesses gets one ln -s plus a stow run. A pi-only skill gets no symlink. The lint errors on a dangling symlink, which a deleted source directory leaves behind.
The stocktake practice
Section titled “The stocktake practice”After a milestone ships (plan tasks checked off, a feature merged, a phase closed), the stocktake pass reconciles the harness’s records with the systems they describe. The rule, from the stocktake skill4:
Skills track the system they document. Any skill in the record set whose system changed gets its update in this pass, and
skills-lintruns on it.
The dotfiles AGENTS.md adds that the skill is updated in the same commit as the system change3. The method, from the stocktake skill4:
- Define the record set by searching, not from memory: in-repo docs, cross-repo mentions, standing instructions, memory, the board, session findings and local scratch.
- Inventory the facts: what the code is now, what shipped since the last stocktake, what is deployed.
- Diff and record every item: stale task status, missing command, deviation shipped without a note, wrong path or number.
- Fix the records, not the code. Move every open item found outside the board onto it.
- Reconcile the board: review every open card, move or comment on stale ones, create new ones.
- Commit with a
docs:prefix before the next feature commit.
A skill needs no update when only a system it reads from changes. The router-operations skill documents the router CLI (command-line interface), so a router config change that the CLI merely observes leaves the skill alone (stocktake/SKILL.md).
What carries over to another harness
Section titled “What carries over to another harness”The skill counts, lint thresholds, retired-term list and symlink counts are specific to this setup. These properties are not:
- Descriptions are paid for on every request, so cap them. The cap is a budget of context characters per skill.
- Descriptions list triggers and no workflow. A process summary is read in place of the body.
- Lint at commit time, and let errors block. A lint that only prints warnings is not read.
- Enforce retired terms mechanically. A blocklist entry fails the lint until the text changes or an explicit exception is added, where a prose rule is forgotten.
- Date each skill’s last human check and warn past a maximum age. The date records a re-read against the system, not the last edit.
- Give a second harness a subset, one symlink per skill, so each promotion is an explicit decision and no config file can drift.
- Pair the passive description with nudges: one that blocks a tool call once, and one that re-injects a reminder until a skill is read.
- Update the skill in the same commit as the system, and run a stocktake after each milestone to catch what slipped.
Decision guide
Section titled “Decision guide”The same decision as text:
- A one-off solution or a project-specific convention goes in the repo’s
AGENTS.mdor is automated. It does not become a skill. - A discipline skill is pressure-tested with subagents before it is written: run the scenario without the skill, record the rationalisations, write the skill against them.
- The description lists triggers and ends with NOT-for siblings, the body stays under 500 lines, and reference over about 100 lines goes in a sibling file.
skills-lintruns, and the skill is committed together with the system change it documents.- A skill that is useful from the second harness gets a per-skill symlink. Any other stays pi-only.
Evidence
Section titled “Evidence”| Claim | How it was checked | Status |
|---|---|---|
| 84 skills in the pi corpus | ls on .pi/agent/skills/, 2026-10-20 | measured |
Description total 37,323 characters, mean 444, longest 499; names 1,079 characters (top level); 40,543 and longest 610 with skills/work/ | frontmatter of all 91 SKILL.md files parsed as YAML (YAML Ain’t Markup Language), 2026-10-31 | measured |
| 74 skills promoted to Claude Code | ls on .claude/skills/ minus the real lsp-servers directory, 2026-10-20; cross-referenced against the hub page | measured |
| Lint: 0 errors, 1 warning, 10 waived | python3 scripts/skills-lint.py 2>&1 | tail -5, 2026-10-20 | measured |
| Description cap: 500 characters warn, 1024 error | skills-lint.py:98-99 | read from source |
| Body cap: 500 lines warn | skills-lint.py:105 | read from source |
Retired terms: 17 entries in .lint.json | .lint.json retired map, counted 2026-10-20 and again 2026-10-31 | read from source |
metadata.verified max age 90 days, max_dates 8 | .lint.json verified_max_days and max_dates | read from source |
| Pre-commit hook blocks on lint errors | .config/git/hooks/pre-commit:47-58 | read from source |
skill-guard blocks once per exact command and rule, at most 3 fires per rule | skill-guard.ts header and MAX_FIRES_PER_RULE | read from source |
skill-first re-injects at most 3 times per session | skill-first.ts header and PI_SKILL_FIRST_MAX default | read from source |
| About 50% miss rate on trained-overlap skills | anthropics/claude-code#30387, as cited in the skill-guard.ts header | reported upstream, not re-measured |
| Description-as-shortcut failure | writing-skills/description-writing.md:22 | read from source |
| Stocktake rule for skills and the 6-step method | stocktake/SKILL.md:133 and the skill’s checklist | read from source |
| Same-commit rule for skills | dotfiles AGENTS.md, skills lint section (line 569) | read from source |
| Pressure-testing method and excuse table | writing-skills/SKILL.md:349-353 and testing-skills-with-subagents.md | read from source |
| Promotion rules | dotfiles AGENTS.md, “Agent-surface routing” | read from source |
Related docs
Section titled “Related docs”- The pi harness journey - the series hub, the extension catalogue and skill counts
- Guard extensions that enforce prose and process rules -
skill-guard,skill-firstand the other guards that hook the tool call - A kanban board for coding agents - the Vikunja board the stocktake reconciles against
- Loop or graph: a sensor-gated coding-agent loop - the loop harness whose ladders are documented in a skill
References
Section titled “References”-
The
writing-skillsskill,.pi/agent/skills/writing-skills/SKILL.md, in the dotfiles repo. Read as of 2026-10-20. ↩ ↩2 ↩3 -
anthropics/claude-code#30387, “Custom skills are not reliably auto-triggered by the model” (closed not-planned). Cited in
skill-guard.tsheader comment. Read 2026-10-20. ↩ -
AGENTS.mdin the dotfiles repo, “Agent-surface routing” section and the skills lint section (“Freshness”, “Skills track the system”). Read as of 2026-10-20. ↩ ↩2 -
The
stocktakeskill,.pi/agent/skills/stocktake/SKILL.md, in the dotfiles repo. Read as of 2026-10-20. ↩ ↩2