Notes

Skills are context compression

Read as
working implementation · tests
Build treatmentUpdated 14 Jul 2026

Agent systems · Context architecture

What you will leave with

Extract one repeated protocol, write its trigger and procedure, and verify workers invoke it consistently.

For engineers externalizing proven agent protocols into small, testable skill packages.~3 min read
PrerequisitesA repeated dispatch protocolA repository for versioningExamples of successful and failed runs
01 · System view

What you will build

A compact catalogue entry backed by an executable, versioned procedure and fixtures.

  1. 01MineFind repeated protocol and real failure history.
  2. 02BoundState when the skill applies and when it does not.
  3. 03WriteEncode ordered actions, proof, stops, and escalation.
  4. 04InvokeReference by name rather than copying the body.
  5. 05TestExercise trigger, happy path, refusal, and failure output.
02 · Implementation

Build it in sequence

01

Extract a protocol that already works

Start with repeated instructions you have run successfully and corrected after failure. Do not use the skill file to invent an untested operating model.

02

Write a discriminating description

The description is routing logic. Name the exact task shape and outcome; include exclusions when adjacent skills might trigger. Vague descriptions either load too often or disappear when needed.

skills/isolated-lane/SKILL.mdmarkdown
---
name: isolated-lane
description: Use for an independent code slice that owns disjoint paths and must return a verified PR.
---

1. Read the ownership contract before opening files.
2. Stop if the task requires a path outside `owns`.
3. Work in the assigned worktree and branch.
4. Return commit, checks, artifact, and any decision request.
03

Encode proof and refusal

A procedure needs required evidence, stop conditions, and the common rationalizations that tempt workers to skip them. “Tests probably unrelated” is a failure mode, not an exception.

04

Remove the pasted duplicate

Change dispatches to invoke the skill by name and keep task-specific scope in the task. Leaving both copies preserves drift and pays the context bill twice.

05

Test routing and execution separately

Use prompts that should and should not trigger the skill, then fixtures that force a red gate, out-of-lane request, and unavailable verifier. Measure invocation and protocol completion.

03 · Review

Definition of done

  • The skill encodes a proven repeatable procedure.
  • Its description distinguishes relevant and irrelevant tasks.
  • Steps include evidence, stops, and escalation.
  • Dispatches reference the skill instead of duplicating it.
  • Trigger and failure fixtures are versioned.
04 · Failure modes

What breaks and what it means

The skill loads for almost every task.

Narrow the description and split unrelated responsibilities.

Workers invoke it but still skip verification.

Make evidence and stop conditions explicit, then add a failure fixture that exposes the shortcut.

Public discussion

Questions, corrections, and useful disagreement

Moderated on GitHub ↗

Sign in with GitHub to join the conversation. Comments are public. Article views are anonymous and counted once per browser, per article, each day.

Read next08

The machine that said no to my machine

A data-seeding agent hit half-rotated keys, tried to fetch replacements, and a second AI refused twice. Why a denied request was the system working, and the guardrail I am glad I do not own.

3 depths