Level 7Lesson 59โฑ๏ธ 40 min

Building Block 3 - Skills

Write your project's knowledge down once, so the agent reads it on every run instead of guessing - and guessing wrong

The Goldfish Problem

Here's an annoying fact about AI agents: they have no long-term memory between sessions. Every time a loop runs, the agent wakes up like a goldfish - it has forgotten everything about your project. It doesn't remember your naming rules, your build steps, or the painful outage that taught your team "never touch that file directly."

So what does it do with the gaps? It guesses - confidently. And a confident wrong guess, repeated on every loop run, is expensive and dangerous.

The fix has a name: a Skill. A Skill is your project's knowledge written down on the outside, in a file the agent reads every single run. You write it once; the agent reads it forever.

What a Skill Actually Is

A Skill is just a folder with a file called SKILL.md inside it (plus any helper scripts or notes it needs). The SKILL.md holds plain-English instructions and a short description of when to use it. Both Claude Code and the Codex app use this exact same format.

my-project/
  .claude/ (or .codex/)
    skills/
      ci-triage/
        SKILL.md        โ† the instructions the agent reads
        helpers/        โ† optional scripts, references, examples
Think of it as the onboarding doc you'd hand a new teammate on day one - except the agent re-reads it on day one of every run, so it never "forgets" the onboarding.

What Goes Inside a SKILL.md

A good Skill captures the stuff an agent would otherwise guess. For a CI-triage loop:

# CI Triage Skill

## How to classify a failing test
- env:   missing secret or infrastructure  โ†’ escalate to a human
- flake: passes on a clean retry, no code change โ†’ file a report
- bug:   fails the same way every time, tied to a recent commit โ†’ draft a fix

## Fix patterns (where to look first)
- Auth tests     โ†’ check src/auth/middleware first
- Database tests โ†’ check whether recent migrations ran in CI

## Never do
- Never disable a failing test just to make the build pass - escalate instead.
- Never touch code inside src/payments/ or src/billing/.

See the three parts? How to think about the task, where to lookbased on hard-won experience, and hard rules it must never break. That last section - the "never do" list - is often the most valuable, because it encodes the mistakes your team already paid for.

Why Skills Make Loops Cheaper AND Better

Two wins, and they compound over time:

Cheaper

Without a Skill, the loop re-derives your whole project from scratch every cycle - reading tons of code, burning tokens, to re-learn what you already know. With a Skill, it reads a short doc instead. Less wasted thinking = lower cost.

Better

Your conventions and your "don't do this because of that outage" notes are applied every run, consistently. Intent stops leaking. The loop's output starts to actually look like your team wrote it.

Write a boring description. A Skill runs when the task matches its description, so a tight, plain description ("triage failing CI tests") beats a clever vague one. Clear beats clever - the agent needs to know exactly when to reach for it.

One Clarification: Skill vs. Plugin

People mix these up. A Skill is the authoring format - the knowledge itself. A plugin is how you ship it - how you bundle one or more Skills (and connectors, coming next lesson) so a teammate can install your whole setup in one go instead of rebuilding it from memory.

Short version: You write a Skill. You distribute it as a plugin. Same knowledge, different stage.

Hands-On: Draft Your First SKILL.md

Hands-on (20 min): For your candidate task, write a one-page SKILL.md in a plain text file. Include the three sections from above: (1) how to think about the task, (2) where to look / fix patterns, and (3) a "never do" list of at least 3 hard rules. Pay special attention to #3 - write down the things you'd be nervous about an eager junior doing unsupervised. That nervousness is exactly the knowledge worth encoding. You'll reuse this file in the capstone.
Lesson 59 Quick Reference
The goldfish problem

Agents forget everything between runs and fill the gaps with confident guesses

Skill

Project knowledge written once in a SKILL.md file that the agent reads on every run

SKILL.md structure

How to think about the task + where to look (fix patterns) + a "never do" list of hard rules

Cheaper + better

Skills cut wasted re-learning (cost) and apply your conventions consistently (quality)

Boring description wins

A tight, plain description makes the agent reach for the Skill at the right time

Skill vs plugin

You write a Skill (the knowledge); you ship it as a plugin (the bundle)

โ† Automations + Worktrees
Unlocks in ~10 min of reading