/fw:spinfrom fw
Capture durable lessons in docs/solutions. Use after completed work, verified fixes, or repeated repo-specific patterns.
Ships in fw. 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.
Use the actual current date from runtime context when dating solution documents or refreshing older learnings.
$fw:spin is the Flywheel knowledge-capture stage. It turns verified
session learnings into searchable documentation under the active repo's
docs/solutions/.
This is where solved problems become stored energy. A non-obvious bug fix, a durable workflow improvement, a clarified repo rule, or a user correction that changed how Flywheel should behave on project work should not stay trapped in one session if it will matter again.
$fw:spin may be called directly, or offered by the finish path after review
and before commit when the completed project work exposed a durable lesson worth
keeping. Pre-commit capture lets the resulting docs/solutions/ change land in
the same logical commit as the work that produced the lesson.
When directly invoked, always spin. If the lesson is still vague or the problem is not actually solved, clarify or defer. Do not silently skip the workflow.
Follow ../references/host-interaction-contract.md.
Call the exact host question tool named in
../references/host-interaction-contract.md when that tool is available. Do
not ask for raw 1/2/3 replies when the host already offers a choice surface.
When the workflow spans multiple material steps, use the host task-tracking
tool named in ../references/host-interaction-contract.md to create and
maintain a short task list.
Ask one question at a time. Prefer concise single-select choices when natural options exist. Keep predictable labels recommended-first and rely on the host's native freeform final path when it exists.
Do not preload every support file. Load only what the current phase needs:
references/schema.yaml when classifying the learning, validating YAML
frontmatter, or checking allowed enum values.references/yaml-schema.md when mapping problem_type to
docs/solutions/ categories, deciding search strategy, or checking retrieval
fields.assets/resolution-template.md only when assembling or refreshing the
final solution document.../references/workflow-gates.md when handing a captured solution back
to $fw:commit.docs/solutions/, where ideate, brainstorm, plan, and
work can consult them in that same repo.spin is merely being suggested by
another workflow, get the user's approval before writing docs.<spin_input> #$ARGUMENTS </spin_input>
Interpret the input as one of:
When another Flywheel stage launches $fw:spin, pass the already selected
lesson as the argument instead of calling $fw:spin blank.
Good upstream arguments look like:
Document the retry-timeout mismatch fix in the Kafka consumerCapture the Redis cache invalidation lesson from this sessionCapture the compact plan-work-commit correction for Flywheel's project workflowRefresh docs/solutions/workflow-issues/test-fixture-setup-2026-04-18.mdIf the input clearly names a selected candidate from $fw:commit, $fw:work, or
another stage, skip candidate rediscovery in Phase 0 and move straight into
capture.
Primary output:
docs/solutions/<category>/Default filename for new docs:
<sanitized-problem-slug>-<YYYY-MM-DD>.mdThe document must use YAML frontmatter and the stable section order from
assets/resolution-template.md.
category in frontmatter stores the directory slug only, for example
build-errors or workflow-issues. The write path is derived separately as
docs/solutions/<category>/.
The active repo's Flywheel knowledge store is designed for cheap lookup.
Future stages in that repo should search docs/solutions/ by frontmatter
before reading full docs.
Filter rules before ranking:
doc_status: activesuperseded_by, follow that path first and treat the
current doc as historical context onlySearch in this order when the current area may already be documented:
files_touched or path fragmentsmoduletagsproblem_typecomponenttitleRead frontmatter first. Fully read only the strongest hits.
If <spin_input> names one clear lesson, use it.
If <spin_input> contains a selected candidate summary passed from another
Flywheel stage, treat it as already chosen and skip candidate discovery.
If <spin_input> is blank:
docs/plans/ideate, brainstorm, or planGood spin candidates include:
ideate, brainstorm,
or plan that future project work should inheritIf nothing non-trivial surfaced, say so and stop. Do not manufacture a lesson just to complete the workflow.
Present two capture modes unless the user already specified one:
If the user explicitly asks for a quick pass, honor lightweight mode. If the user explicitly asks for a thorough write-up, honor full mode.
Both modes still perform the bounded housekeeping pass. Lightweight mode only shrinks how far that housekeeping reaches.
Read references/schema.yaml and references/yaml-schema.md.
Then:
problem_type, component, severity, and any track-specific
fields using only schema valuesdocs/solutions/<category>/docs/solutions/ for related or overlapping docsFor the overlap search:
title, module, files_touched, tags,
problem_type, and componentUse this decision rule:
| Overlap | Action |
|---|---|
| High - same problem, same cause, same fix or guidance | Update the existing doc instead of creating a duplicate |
| Replacement - newer lesson materially replaces older guidance | Write or refresh the new canonical doc, mark the older doc doc_status: superseded, and set superseded_by |
| Moderate - same area, different angle or remedy | Create a new doc and link the related one |
| Low or none | Create a new doc |
When classifying the target doc, assume:
doc_status: activedoc_status: supersededfiles_touched and tags, since later stages
search those firstEvery spin includes a bounded housekeeping pass.
This pass is intentionally local:
For each neighboring overlap, choose exactly one action:
tags, files_touched, module, or
last_updatedrelated_docs or Related notes because both docs stay
validdoc_status: superseded, set
superseded_by, and record the replaced path in the canonical doc's
supersedesDo not leave silent contradiction behind. If two docs appear to answer the same question differently, resolve that during the spin by updating one, superseding one, or narrowing their applicability explicitly.
Read assets/resolution-template.md and preserve its section order unless the
user explicitly asks for a different structure.
Use evidence from the recent session:
When creating or refreshing a doc:
files_touched and examplestags and module strong enough that a later agent can find the doc
cheaplyWhen updating an existing doc:
last_updated: YYYY-MM-DD to frontmatter if it is not already presentrelated_docs, supersedes, or superseded_by when the
neighborhood analysis says this doc should now carry that relationshipDo the complete pass:
Do a compact single pass:
Lightweight mode is allowed to miss a subtle overlap. That is acceptable when speed matters more than exhaustive consolidation, but it must still:
files_touchedAfter writing the solution doc, check whether a future agent would discover the knowledge store from the repo's main discovery surfaces.
Assess whichever of these exist:
AGENTS.mdCLAUDE.mdREADME.mdThe goal is not to force imperative workflow instructions into those files. The goal is simple discoverability:
docs/solutions/ existsIf the spirit is already satisfied, do nothing.
If not, propose the smallest natural addition and ask before editing when the workflow is only offering spin. When the user explicitly asked to improve the Flywheel knowledge flow itself, making that small discovery edit is in scope.
Summarize:
When spin was launched from the finish path, hand back to $fw:commit so the
solution document can be included in the same commit set. Use the canonical
handoff card from ../references/workflow-gates.md with Stage: fw:spin,
the solution document as Artifact, and Next: fw:commit.
If multiple good candidates remain, offer to spin the next one.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mopeyjellyfish/flywheel --plugin flywheel32 skills in this plugin
/architecture-strategyAssess repo-grounded architecture choices and improvements. Use for boundaries, service splits, dependency direction, or distributed posture./brainstormExplore requirements and approaches. Use for a fuzzy idea, open scope, or one direction that needs sharper behavior before planning./browser-testRun browser acceptance checks with playwright-cli. Use when browser-visible behavior needs fresh proof before review or commit./commitFinish a branch cleanly. Use to verify readiness, make logical commits, push, and create or refresh a PR with evidence.