/toycrane-skills:maintain-project-contextfrom toycrane-skills
Cleans, compacts, and reconciles durable project context files (PRODUCT.md, GLOSSARY.md, docs/decisions, docs/specs, AGENTS.md, CLAUDE.md) and issue-tracker mirrors without changing established meaning. Use for cross-artifact consistency sweeps and shipped-spec retirement.
Ships in toycrane-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.
Read when SKILL.md points to them.
This skill requires define-product. Before doing any work, confirm it is
installed. When it is missing, stop and report it with its install command,
npx skills@latest add toy-crane/skills --skill define-product, using the
project's package manager runner where it pins one.
Run a deliberate hygiene pass across the durable context that future work will reuse. Make the current meaning easier to retrieve without becoming the decision-maker for any artifact.
accepted, or silence.Inspect only the surfaces that exist or are required by the cleanup:
PRODUCT.md for the app-level product premise;GLOSSARY.md for current project terms;docs/decisions/README.md and the relevant subject contracts;docs/specs/<slug>/ folders whose work may have shipped;AGENTS.md and CLAUDE.md.Do nothing merely because an optional file is absent. This is a periodic cross-artifact pass, not the incremental capture of a single newly settled term, decision, or follow-up.
When PRODUCT.md exists, compare its claims with explicit current product
decisions and other authoritative context. Remove duplicated or obsolete
wording and apply already-settled product meaning while preserving still-current
content.
Keep PRODUCT.md product-only: app definition, users and situations, problem
and alternatives, promised change, core loop, app-wide capabilities and
boundaries, experience principles, success signals, assumptions, and unknowns.
Do not move stack, architecture, repository mechanics, screen requirements,
work-unit scope, or acceptance criteria into it.
When a proposed edit would choose a new audience, problem, promise, core loop,
product boundary, or other product intent, leave the file unchanged and ask the
user to settle that meaning. When the user wants to reopen the product
premise, invoke define-product with the current PRODUCT.md, the exact
ambiguity found, and the surfaces that depend on it, so it revises only that
part of the premise; it hands back the updated PRODUCT.md, after which this
pass resumes and reconciles the remaining durable surfaces against it.
List docs/decisions/ and read its index when it exists. Check for files
missing from the index, then compare relevant subjects with current context and
remaining specs.
Keep one editable decision file per subject. Use Git for history instead of keeping old decision files in the active folder. When several files clearly agree on one decision, merge them under the clearest stable subject name. Update every inbound link before deleting redundant files.
Every decision contract created or edited in this pass needs a subject title and these required sections:
Decisions: every current rule;Why: the minimum reason needed to apply the rule without repeating the same
debate.Add these sections only when they carry current value:
Boundaries: limits or exceptions;Reconsider when: a specific condition that should reopen the decision;Still-rejected alternatives: a future agent might retry a rejected path;Evidence worth preserving: a measurement or experiment would be costly to
reproduce.Remove status fields, supersession chains, adoption or update dates, pull-request order, and old implementation notes. Keep a date when it sets a current rule or tells future work when to reconsider.
Before removing other content, ask whether its absence could make a capable future agent repeat the same proposal, investigation, experiment, or failed approach under the same conditions. If so, keep the shortest explanation that prevents repetition. Remove duplicates and alternatives that cannot reasonably recur.
docs/decisions/README.md, keep exactly one entry per decision file:
- [subject](subject.md) — Read when .... Make every link work. The routing
phrase says when to open the file, not what it decided.GLOSSARY.md, keep only terms the project currently uses and rewrite a
definition only when the project's language has already changed.docs/specs/<slug>/ confirmed as shipped, first preserve every
qualifying reusable decision in its owning contract, then delete the folder.
A shipped folder whose ## Post-release check holds a check, not None.,
stays until that check is done, because a later session runs the
measurement file at its recorded path inside the folder. With an issue
tracker convention, find the folder's check issue through the convention's
Check issue lookup by its Spec-Folder: line; the check is done when that
issue is closed. Keep the folder and report it when no check issue exists
yet. Without a tracker convention, ask. If shipment is unclear, leave it and
ask. In active specs, update only links
and terms already confirmed elsewhere.Create, rename, or rebuild decision contracts and their index when the cleanup requires it. Do not merge unrelated subjects or remove necessary instructions to hit a size target. Report an index or always-loaded file that remains hard to navigate and explain why.
When AGENTS.md or CLAUDE.md carries an ## Issue tracker section, read both
files and use the first section found and its linked detailed convention when
present. Existing inline conventions remain valid; the setup skill need not be
installed. If the linked document cannot be read, report that tracker work is
blocked and continue repository context maintenance. Treat its issues as a derived coordination
surface, never as authority for product meaning, shipment, terms, or decisions.
Do not import issue prose or comments into durable project context.
Resolve and fetch the remote's advertised default branch. Compare the tracker
with docs/specs/<slug>/ folders on that fetched branch, not with unmerged
changes in the current checkout. Each folder's spec.md names its one issue
with an Issue: <tracker>:<id> line; fetch every issue by that ID. Never list
issues or search them by title to find a folder's issue, and do not hunt for
orphan or duplicate issues; a person tidies duplicates in the tracker. If the
convention still describes a spec:<slug> title key, a Source-Issue line,
or a managed-issue listing, tell the user to rerun setup-issue-tracker
instead of using those operations, and to rename Source-Issue: to Issue:
in active spec folders themselves; the old line is not read.
For each default-branch spec folder, apply the rules below:
Issue: line, or whose ID cannot be fetched,
and create nothing; the next PR that carries the folder creates its issue.spec.md:
the text of its first section, the remaining section headings, the folder
path, and its Blocked by: docs/specs/<other>/ issue references. Keep the
issue's title and every other part of its body, whether a person or an agent
created it.Issue: lines of its
Blocked by folders, removing stale edges and adding missing ones while
preserving its assignee and open or closed state. When a blocker folder has
no Issue: line, report it and leave the dependent issue's entire blocker
relation set unchanged rather than removing edges on partial information.Search merged PR bodies for exact Issue: <tracker>:<id> lines, including PRs
whose spec folder has since been deleted, and fetch each issue by that ID. A
merged PR is durable retry evidence for a failed close only when its diff and
verification establish implementation delivery for that issue; a Spec-Folder
trailer, linked spec PR, Issue: line, or missing folder alone is
insufficient. Retry the convention's close operation for an open issue, then
verify its state. For a merged spec-only PR with no implementation delivery,
keep the issue open. If it still carries the PR review or active-work signal,
check for newer implementation work, then use the convention's mark-ready
operation and verify the result. Never demote work that has already started.
Report the exact missing PR evidence or failed operation when neither safe
closure nor a ready transition can be established. This catch-up also applies
when the original merge run reported a tracker failure; do not depend on that
run's branch or commit trailers surviving a squash merge.
If the configured tool is unavailable or any operation fails, finish the repository cleanup, report the incomplete tracker operation and reason, and preserve the remaining issue state for a later pass.
Finish when every safely resolvable subject has one owner and one current representation, confirmed shipped specs are retired, optional current surfaces contain no known stale duplication, the configured tracker mirror is reconciled as far as its recorded operations allow, and ambiguous meaning remains preserved.
Report what changed, what was deleted, what was intentionally left unchanged, the tracker issues updated, closed, or left unchanged with a reason, and the exact question needed for every unresolved conflict or unclear shipment.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub toy-crane/skills --plugin toycrane-skills28 skills in this plugin
/add-env-keyGet a key the user must issue or supply, such as an API key, token, or password, into the project's .env file without the value passing through chat or the model's context. Opens the vendor's issuance page, collects the value through the secret-env mod's input pane when the session has it, and otherwise opens the file in the user's editor with the key line ready. Use when work needs such a key that the project does not have yet, or when the user asks to add, set, or put an API key or token into .env./add-stack-contextAudit and establish current agent context for the technologies that define a project's stack. Use when setting up a project for agent work, after selecting or adding a framework, library, developer tool, or hosted service, or when entering an existing project whose agent context has not been audited./audit-evalsAudit a project's LLM eval regression suite from its committed cell history, report cells whose most recent 10 trials all passed, checks with identical recent histories, cells that flip after graduating, and cells that always fail, then propose demoting the recently always-passing cells to the lower tier and apply only the demotions the user approves. Use when the user asks which eval cells still earn their run, why a regression run costs so much, or to slim, prune, or demote a regression suite./babysit-prWatch one open GitHub pull request through CI and review bots until it is ready to merge or needs a person, fixing confirmed findings and failing checks, answering and resolving review threads, and rerunning infrastructure flakes. Use when a pull request has just been opened or updated and its checks, bot review comments, or merge conflicts need answering, or when asked to babysit, watch, shepherd, or get a PR green or ready. Does not merge; `merge` and `implement` invoke it before merging or handing off./babysit-specsRevise active `docs/specs/SLUG/` specs so they match what has shipped since they were written. Use when earlier work has landed and queued specs may now rest on stale assumptions, acceptance criteria, constraints, terms, or prototypes, or when implementation reports a spec as stale before changing source. Takes one or more spec folders, or every folder under `docs/specs/` when none is named. Do not use to shape a new spec from a problem and direction, which belongs to `shape-idea`, or to reconcile durable project context and retire shipped folders, which belongs to `maintain-project-context`./build-prototypeBuild a complete dummy-data HTML prototype or a temporary comparison of up to three alternatives for a specific user situation. Use to settle a screen-based product before implementation or resolve a visual or interaction decision during shaping or prototype review. Do not use for production implementation or CLI, terminal, or voice interfaces.