/will-wright-eng-skills:new-pi-durable-agent [<path-to-settled-specification.md>]from will-wright-eng-skills
Scaffold an always-on, long-running agent from will-wright-eng/pi-durable-template, starting from a settled SPECIFICATION.md. The specification must already exist - this skill builds from it and does not write or review one. Takes an optional path to the specification file, defaults to SPECIFICATION.md in the repo root, and stops if none is found or it cannot be built. Use when scaffolding or bootstrapping a pi-durable agent from a finished specification, or shaping pi-durable-template to an agent's SPECIFICATION.md in a fresh repo.
Ships in will-wright-eng-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn a fresh repo and a settled specification into a running, tightly scoped, always-on agent built on pi-durable-template.
The work has three phases, in this order: check that the specification can be built, pull in the template, shape the template to the specification.
This skill scaffolds; it does not write, review or improve specifications. The document's content is treated as already decided by its owner. The only question asked of it is whether the scaffold can be built from it.
SPECIFICATION.md in the root of the repo being built, which is the current directory, copy it there and leave the original alone. If the root already holds a different SPECIFICATION.md, ask before overwriting it.SPECIFICATION.md in the repo root.If no specification is found, at the given path or in the repo root, stop and say so. Tell the user that the specification has to be written first, that the agent-specification skill is the one that writes it, and that nothing has been scaffolded. Do not draft one, and do not ask the questions that would produce one.
These agents are not run once and discarded. Each one is installed as a service and keeps working indefinitely: it wakes on its trigger, reads what it remembered, does a bounded piece of work, writes down what the next wake needs, and exits. From the owner's point of view it is always there.
Two consequences shape everything below:
SPECIFICATION.md is a plain markdown document that defines the agent. It is loaded, whole, as the agent's instructions on every wake. There is no separate configuration file and no hand-written prompt.
The limits the document states (tools, budget, trigger, output, done check, memory documents) are repeated as values in src/agent.ts, which is where the scaffold enforces them. The two must agree, and are always changed together.
On each wake the scaffold adds a short briefing after the specification: the wake number, the current text of every memory document, the tasks for this wake, the one output and the done check.
https://github.com/will-wright-eng/pi-durable-templatesrc/definition.ts holds the required section headings (SPECIFICATION_SECTIONS), the AgentDefinition type and the limits the scaffold enforces; docs/SPECIFICATION.example.md shows what a specification looks like; README.md and AGENTS.md explain the layout and the design decisions; make help lists the commands. Where this skill and the template disagree, follow the template and tell the user what differed.The template does not ship a SPECIFICATION.md of its own. The one in the repo root is always this agent's.
Fetch the template before anything else, into a temporary directory outside the repo, and note the commit you fetched. If the template repo cannot be reached, or has no src/definition.ts, src/agent.ts, docs/SPECIFICATION.example.md or Makefile, stop and tell the user what is missing. Do not reconstruct the template from this skill's description; a guessed scaffold would look right and behave differently.
If the specification calls for something outside the fixed stack (another model provider, Postgres, a browser, a remote sandbox), say that this is outside what the template supports and ask whether to proceed anyway as a deliberate departure. Do not quietly accommodate it.
Read the specification and the template's src/definition.ts side by side. The check has two parts, and nothing else is checked.
Every required section is present. The document needs one ## section for each name in SPECIFICATION_SECTIONS. The template's check command fails if any is missing.
Every value AgentDefinition needs can be read from the document. Each section drives a field of the definition or a behaviour of the scaffold:
| Section | What it drives | What must be readable from it |
|---|---|---|
| Name | name; also names the installed service | one name of lowercase letters, digits and dashes |
| Job | instructions only; standingTask when the agent has work on every wake | nothing further |
| Non-goals | instructions only | nothing further |
| Trigger | trigger, and the service unit generated from it | one of timer with an interval in whole seconds, file_drop with a path that is absolute or inside the workspace, or queue |
| Workspace | AGENT_WORKSPACE in .agent/env; the guard keeps every tool inside it | one directory; its absolute path can be supplied in phase 2 |
| Output | output | one of file with a path, commit with a branch, or draft_pr with a branch |
| Tools | tools, the allowlist the guard enforces | at most 6 tools with unique names, each described well enough to implement or matching pi-durable's built-in read, write or edit |
| Done check | doneCheck, run with sh -c in the workspace after each wake | a shell command whose exit code decides success |
| Budget | budget | three positive whole numbers: tokens, wallSeconds, steps |
| Memory | memory | at least one document name of lowercase letters, digits and dashes |
| Escalation | instructions only; the agent acts on it through the built-in escalate tool | nothing further |
Two tools, remember and escalate, are built in. They do not count toward the 6, and the specification's tools cannot reuse those names.
A value given in other units is readable: "once an hour" is everySeconds: 3600, "10 minutes of wall time" is wallSeconds: 600. A value that would have to be invented is not: a budget with no step count, a done check described only in words, an output with no path or branch.
A value that check rejects is unbuildable in the same way as a missing one: more than 6 tools, a tool named remember or escalate, an empty done check, no memory document, a name or memory document name with other characters. So is a tool that runs arbitrary shell commands, which the template's design rules out and the scaffold will not be given.
Do not judge the document beyond this. Whether the job is well chosen, the non-goals sufficient, the memory rules sound or the escalation conditions sharp is its owner's decision and has already been made. Do not propose improvements to it and do not reword it.
If anything is missing or unbuildable, list every item, each with the section it belongs to and what the scaffold needs there, and stop. Nothing is scaffolded from a specification that fails this check.
The one exception is a gap the user fills on the spot. If they supply the missing value, show them the exact line you would add to SPECIFICATION.md, and record it there only when they agree. That is the only edit this skill makes to the document. When the specification was given by path, the edit goes into the copy in the repo root; tell the user the original now differs.
Go on to phase 2 only when both parts of the check pass.
The repo is expected to be fresh. Check first: if it contains files other than the specification, git metadata, a README or a license, list them and ask before continuing, because copying a template over existing work can destroy it.
Copy the template's contents into the repo without its git history, so the new agent has its own history. The template has no SPECIFICATION.md, so the user's is untouched; leave docs/SPECIFICATION.example.md in place as the format reference. If the repo already had a README or a license, keep the user's.
Read the template's README.md and AGENTS.md before changing anything, then set the repo up with the Makefile:
make env creates .agent/ and .agent/env from .env.example. .agent/ holds every artifact of the running agent (env file, database, inbox, lock, logs, backups) and is gitignored.AGENT_WORKSPACE in .agent/env to the absolute path of the workspace the specification names. Ask the user for the path if the document does not give one. The directory must exist, or check fails.make setup installs dependencies and runs check. It reports the example agent at this point; that is expected until phase 3.Use the Makefile targets and CLI commands as the template names them; make help lists them.
The template ships with one example agent, a changelog drafter, and everything specific to it lives in src/agent.ts. The rest of src/ (the wake cycle, budget enforcement, guard, inbox, memory, storage, service generation and CLI) is the fixed runtime and should stay identical across agents; that sameness is what makes agents cheap to create and easy to compare.
Change only:
src/agent.ts. Replace the example definition with one that states the specification's values: name, trigger, output, tools, done check, budget and memory document names, in the shape AgentDefinition in src/definition.ts requires and as the table in phase 1 maps them. Every value must match the document. If you find you need a value the document does not give, that is a gap phase 1 missed: handle it as phase 1 does, and do not fill it in yourself.read, write and edit where they fit. Implement any other tool small, with a test, and confirm the pi-durable API against the installed package's README and types, as AGENTS.md directs. A tool that takes a file path must take it in an argument named path, because that is the argument the guard checks against the workspace. Do not add a tool that runs arbitrary shell commands.standingTask only if the specification says the agent has work to do on every wake. Without one, a wake with an empty inbox ends as idle, which is the cheap exit most agents want.dryRun in src/agent.ts so a dry run walks through this agent's tools, in the order a normal wake would use them, and ends by calling remember..env.example and .agent/env only the variables this agent's own tools need. Never write real secrets into a tracked file; tell the user which values to supply in .agent/env.Do not write a separate system prompt. SPECIFICATION.md is the agent's instructions; if the agent seems to need telling something the document does not say, tell the user and leave the wording to them.
Keep agent code POSIX-only. macOS specifics belong in the service generator and nowhere else.
make check passes: the definition is valid, the specification has every section, and .agent/ and the environment are in place. It prints a note, not a problem, while the Cloudflare values are unset.make lint, make typecheck and make test pass; the template's CI runs the same three on the new repo. The tests include the kill test: a wake killed mid-run is finished by the next one without redoing committed work.make dry-run completes with outcome done. It scripts the model, stubs the tools, skips the done check and stores nothing, so it shows the wake cycle works and nothing more. An agent without a standing task needs something in its inbox first, or the dry run ends as idle: queue one with make submit TASK="...". A dry run does not consume it, so afterwards remove it from .agent/inbox/ unless the user wants it as the first real task.SPECIFICATION.md and src/agent.ts side by side one last time and confirm each stated limit matches..agent/env, offer one real wake with make wake, then show make journal and make memory. A second real wake that starts from what the first one remembered is the evidence that the agent is long-running in more than name. Each real wake costs money, so ask before running them.The agent is not always on until its service is installed, so end by offering to install it. Do not install it without a yes: it starts something that runs unattended on the user's machine and spends money on each wake. Show the service files first with make service. After make install, show make status for checking on it, make journal for reading what it did and make uninstall for removing it.
Tell the user, briefly:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (will-wright-eng/skills) — no native marketplace selected
npx claudepluginhub p/will-wright-eng-will-wright-eng-skills21 skills in this plugin
/agent-specificationWrite or review the specification of an agent, or of a system of several agents, through a question/answer session. Chooses the arrangement first (one agent, pipeline, orchestrator or blackboard), then settles one SPECIFICATION.md per agent and, when there is more than one agent, a SYSTEM.md that states how they are joined. Works in a fresh repo or against one role of a system that already exists. Takes an optional path to a specification or system document to review. Use when defining, scoping or reviewing an agent or a multi-agent system, choosing between agent patterns, writing an agent's SPECIFICATION.md, or giving each role of an existing agent system a written scope./annealDecompose a god module into stable and volatile pieces whose boundaries match how the code actually changes. Locates hotspots with the hc CLI (decay-weighted churn × complexity quadrants), autopsies the chosen file along three evidence axes (symbol co-change, consumer slices, internal references), interviews through each proposed seam one at a time, and delivers a strangler-fig migration plan with a measurable hc baseline. Use when a file is a "god module" or "god file", one file soaks up every change, a module needs splitting, or the user wants to isolate hot code or reduce churn concentration./assess-test-suiteAssess a project's test suite against the verification practice in "How the Claude Code team thinks about verification" — classifies every test on two axes (scope unit/integration/E2E × oracle interaction/example/snapshot/property/differential) plus health tags (flaky, slow, cannot-fail, not agent-runnable), maps user-facing features to E2E coverage, then proposes a ranked refactor toward E2E, property and differential tests, closing with a short note on what the refactor does to CI/CD runtime. Writes the assessment only on confirmation and never edits tests. Use when the user wants to "assess the test suite", "audit our tests", know "are our tests any good" or "which tests are worth writing", plan a test strategy or test refactor, deal with too many mocks or unit tests or with flaky tests, or make a test suite a reliable feedback loop for coding agents./autoresearch-methodExplain the autoresearch methodology — a verifiable autonomous experiment loop — and evaluate whether the current repo is a good fit before running the autoresearch-verify and autoresearch-program skills. Use when a user wants to add autonomous experimentation to a project, asks about autoresearch/autoresearch, or is about to invoke the other autoresearch skills./autoresearch-programGenerate `program.md` at the repo root from the autoresearch program template, with mutable/immutable scope and verifier commands baked in via light templating. Run after autoresearch-verify produces the verifier script. The generated program.md is the operating directive for a fresh agent session running the autoresearch loop — after this skill runs, the autoresearch skills are no longer in the picture. Use when a user wants to generate the loop directive for an autoresearch run./autoresearch-verifyBuild a repo-specific verifier script for an autoresearch loop. The script has two modes — `light` (fast per-candidate metric evaluation, emits the JSON the loop consumes) and `heavy` (matrix-of-conditions integrity check). Run after autoresearch-method confirms the repo fits and before autoresearch-program. Use when a user wants to build the verifier script for an autoresearch loop.