Skip to content

Course · Pi · Skills & packages

Skills & packages

Two modules back you rebuilt the guardrails Pi ships without: a damage-control gate, a one-task-at-a-time lock, a PLAN.md habit, a statusline that tracks what the agent’s actually doing. Every one of them holds because it’s code - a hook that fires on every single tool call, whether the agent likes it or not. That’s also the bill: each gate is schema and logic sitting in the window on every turn, for the rest of the session, forever. The module closed on an uncomfortable admission - some of what stash needs doesn’t belong in that kind of always-on code at all.

This module is where that admission pays off. The whole course has one enemy: the finite context window, and the fact that every convenience spends it whether you asked or not. A gate you wrote two modules back spends tokens on every turn because it has to - it’s a rule that must hold no matter what. This module’s slice of that same fight is different: load on demand instead of always. The cheapest context is the kind that never gets loaded until it’s actually relevant.

New content sources keep showing up for stash - a teammate wants to save from a podcast-transcript site, another from an internal wiki behind an auth cookie - and onboarding each one runs the same five steps every time: (1) sniff the source’s markup shape, (2) write an extractor that survives its particular nav-and-ads mess, (3) wire it into the fetch worker, (4) run it against a sample URL, (5) confirm the full-text index picks it up cleanly. Count them in that sentence - it isn’t “a handful,” it’s a fixed five-step procedure you’ve now re-explained to Pi more than once, typing out roughly the same steps 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 Module 5 - 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 each one closes by filling in a row of the same table - what a layer costs in the window, what failure it removes, and who actually decided it should fire. It’s the same coordinate system the rest of the course uses:

LayerWhat it costsWhat it buysWho decided
  • Skills - write the content-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 stash harness 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.