Course · Pi · Skills & packages
Skills & packages
The last module ended on a promise you haven’t cashed yet: the plan-mode lesson got
its whole job done with a markdown file and a habit, and the closing line was that
some of what you build for stash (the course’s running example, a small FastAPI feed reader) should stop being code entirely. Everything else
you’ve built is TypeScript that earns its keep by being always on - stash-tools.ts
with /stash and resync_feed, the damage-control gate, tilldone, the PLAN.md
injector, the statusline. Always on is exactly right for them, and it’s also the
bill: schema and logic sitting in the window on every turn, for the rest of the
session, forever.
This module is where the admission pays off, and its slice of the context fight is the inverse of a gate’s: load on demand instead of always. A rule that must hold on every tool call has to be always-on code - that’s the damage-control gate, and it’s correct. A procedure that only matters when a new feed source shows up doesn’t need a seat in every system prompt. The cheapest context is the kind that never loads until it’s actually relevant.
New feed sources keep showing up for stash - a teammate’s engineering blog, a
newsletter that serves Atom, a podcast site with an episode feed. Onboarding each
one runs the same five steps every time: (1) confirm the source serves a feed at
all, (2) fetch a sample and read the raw XML, namespace and link shape first - the
same inspection the core chapter walked you through, (3)
check fetch_feed against it and extend only if
the shape defeats it, pinning any change with a test, (4) sync it, (5) confirm the
saved rows came out right - published parsed, links non-empty, no duplicates.
Count them in that sentence - it isn’t “a handful,” it’s a fixed five-step
procedure, and you’ve now re-narrated it to Pi more than once in slightly different
words each time. That’s not a tool call that needs blocking or a hook that needs to
fire on every edit. It’s a procedure - read this, then do this, then check this -
and the honest home for a procedure is markdown, not a registerTool call.
Here’s the module’s payoff, stated as a claim you can check at the end: everything
you’ve built for stash since the first extension -
five extensions, one Skill, one prompt template, seven files spread across three
directories - collapses into one pi install command a teammate runs exactly once.
Seven files, three directories, one command. The last lesson counts the seven for
real and holds that ratio up against the number.
Three lessons get you there, and they share one question throughout: what does a layer cost in the window, and when does that cost actually get paid?
- Skills - write the feed-source onboarding procedure once as a
SKILL.md, in the same Agent Skills format other tools read, and watch Pi pull it in only when the situation calls for it. - Templates & themes - the two lighter no-code layers: a prompt template for the one-liner you type often, and a theme for the TUI you’re staring at for eight hours a day.
- Packages - bundle the skill, the extensions from the last two modules, and a prompt template into one package, and hand your teammate the whole
stashharness in one install command instead of a README they’ll skim once and forget.
Packages closes with the fourth row and lays all four side by side - your answer to
which layer to reach for, for which stash job.
Start with skills.