refit
Skill85 starsChanged 5 months agoApache-2.0View on GitHub
This skill should be used when the user asks to \"refit a workflow\", \"upgrade a workflow\", \"update workflow scaffolding\", or wants to bring an existing workflow's scaffolding files up to date with the current Spacedock version.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Nov 8, 2026
- Yeachan-Heo/oh-my-claude-sisyphustheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- commissionSkill
- compassSkill
- debriefSkill
- ensignSkill
- feedback-rejection-flowSkill
- first-officerSkill
- fo-dispatch-recoverySkill
- fo-gate-lifecycleSkill
- fo-status-viewerSkill
- present-gateSkill
- reviewSkill
- surveySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Follow these five phases in order.
- Distinctive: line 27
Read each scaffolding file and extract its version stamp:
- Distinctive: line 33
If a file doesn't exist, note it as missing and skip it.
- Very specific: line 37
Read .codex-plugin/plugin.json from the Spacedock plugin directory (the directory containing the skills/ folder — resolve from your own …
- Very specific: line 41
If all version stamps match {current_version}: report "Workflow is already up to date." and stop.
- Distinctive: line 42
If no stamps were found on any versioned file (README): enter Degraded Mode (see below).
- Distinctive: line 71
Wait for the captain to confirm before proceeding.
- Very specific: line 79
Before generating any files, read {dir}/README.md and extract:
- Very specific: line 91
If {dir}/status exists, it's a legacy workflow-local status script.
- Distinctive: line 112
Do NOT auto-modify the README.
- Distinctive: line 121
If versions match: report "up to date" and skip.
- Distinctive: line 122
If versions differ: show a diff between the local and canonical files.
- Very specific: line 137
If accepted, copy the canonical file to {dir}/_mods/{name}.md.
- Very specific: line 141
If {project_root}/.claude/agents/pr-lieutenant.md exists and {dir}/_mods/pr-merge.md does not, offer migration:
- Distinctive: line 162
After upgrading scaffolding, check whether schema changes require migrating existing entity data.
- Distinctive: line 179
If no schema changes affect entity data, skip to Phase 5.
- Very specific: line 212
Update version stamp to {current_version} in the README YAML frontmatter: commissioned-by: spacedock@{current_version}.
- Distinctive: line 232
When no version stamps are found on the README, the original baseline cannot be determined.
- Distinctive: line 245
Add version stamps to versioned files without modifying anything else:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refit a Workflow
You are refitting (upgrading) an existing workflow to match the current Spacedock version. This covers scaffolding files (README, mods) and, when schema changes require it, migrating entity frontmatter data. Agent files and the status viewer are shipped with the Spacedock plugin and do not need local updates.
Follow these five phases in order. Do not skip or combine phases.
Phase 1: Discovery
Step 1 — Identify the workflow
The user must provide a workflow directory path. If they didn't, ask:
Which workflow directory should I refit?
Store the confirmed path as {dir}. Resolve it to an absolute path. Also derive {project_root} (git root or cwd) and {dir_basename} (last path component).
Step 2 — Read current scaffolding and extract version stamps
Read each scaffolding file and extract its version stamp:
- README — Read
{dir}/README.md. Extract version from YAML frontmattercommissioned-by: spacedock@X.Y.Z. Store as{readme_version}. - Mod files — Scan
{dir}/_mods/*.mdfor installed mods. For each, read theversionfrontmatter field. Match against canonical mods at{project_root}/mods/{name}.mdby filename. Store the local version and canonical version for each. Also scan{project_root}/mods/*.mdfor mods not yet installed. - Legacy status script — If
{dir}/statusexists, note it for cleanup (status now ships with the plugin).
If a file doesn't exist, note it as missing and skip it.
Step 3 — Read current Spacedock version
Read .codex-plugin/plugin.json from the Spacedock plugin directory (the directory containing the skills/ folder — resolve from your own plugin context). The .claude-plugin/plugin.json mirror carries the same version for the Claude host. Extract the version field and store it as {current_version}.
Step 4 — Evaluate
- If all version stamps match
{current_version}: report "Workflow is already up to date." and stop. - If no stamps were found on any versioned file (README): enter Degraded Mode (see below).
- Otherwise: proceed to Phase 2 with the list of outdated files.
Phase 2: Classify Files by Upgrade Strategy
Each scaffolding file gets a specific upgrade strategy based on how safe it is to auto-replace:
| File | Strategy | Rationale |
README.md | Show diff | Users customize stages, schema fields, quality criteria. Too risky to auto-replace. Show what the current template would produce and let the captain decide. |
_mods/{name}.md | Version diff | Compare version frontmatter against canonical. Show diff if changed, ask for confirmation. |
status (legacy) | Remove | Status viewer now ships with the plugin. Remove the workflow-local copy if present. |
Present the classification to the captain:
Upgrade plan:
File Current State Strategy status{status_version or "no stamp"} Replace README.md{readme_version or "no stamp"} Show diff (manual review) _mods/{name}.md(for each){local_version vs canonical_version / custom mod} Version diff Proceed with this upgrade plan? (y/n)
For mods, include all files found in _mods/.
Wait for the captain to confirm before proceeding.
Phase 3: Execute Upgrades
Extract workflow-specific values from README
Before generating any files, read {dir}/README.md and extract:
- Mission — from the
# {title}heading (first H1). - Stages — from the
## Stagessection. Each### \{stage_name}`` subsection is a stage, in order. For each stage, extract:- Stage name
- Inputs, Outputs, Good, Bad descriptions
- Whether "Human approval: Yes" appears (indicates an approval gate for the transition INTO this stage)
- Schema fields — from the
## Schemasection's YAML block. - Entity description — from the first paragraph after the H1.
3a. Legacy Status Script (Remove)
If {dir}/status exists, it's a legacy workflow-local status script. The status viewer now ships as the spacedock status launcher command.
- Inform the captain: "The status viewer is now the
spacedock statuslauncher command. Removing the workflow-local{dir}/statusscript." git rm {dir}/status
3b. README (Show Diff)
- Re-select the matching template for this workflow's shape (development / experiment / refinement) and generate its FULL body for this workflow, substituting the extracted values (mission, stages, schema). Regenerate the workflow-INDEPENDENT sections too —
## Workflow-specific rules, the proof/triage bullets, and the## {Entity} Template/Verified byexample — not only the stage prose. These carry the accumulated scaffolding content; a refit that re-renders only the stage values propagates the version stamp but not the content the template gained since this workflow was commissioned. - Diff it against the user's current README.
- Present the diff to the captain, noting which differences are likely template changes vs user customizations:
README template diff:
The following differences exist between your README and what the current template would generate. Differences may be template improvements or your intentional customizations.
{diff output}
I have NOT modified your README. Review the diff and apply any changes you want manually, or tell me which specific changes to make.
Additive sections the current template gained since your workflow was commissioned (new proof/triage bullets, a fixed example) appear as additions in this diff — those are the accumulated scaffolding content, safe to adopt; hunks that touch your customized stage prose are yours to judge.
Do NOT auto-modify the README. The captain decides what to adopt.
3c. Mods (Version diff)
For each mod file in {dir}/_mods/*.md:
- Match against canonical — Check if
{project_root}/mods/{name}.mdexists (matching by filename). - If canonical exists — Compare the
versionfrontmatter field in the local file against the canonical file.- If versions match: report "up to date" and skip.
- If versions differ: show a diff between the local and canonical files. Ask the captain:
Mod update: {name} (local: {local_version} → canonical: {canonical_version}) {diff output}
Update this mod? (y/n)
- If no canonical match — The mod is custom (user-authored or third-party). Acknowledge neutrally:
Found custom mod: {name} — {description from frontmatter}. No canonical version to compare against. No action needed.
- New mods available — For each canonical mod in
{project_root}/mods/*.mdnot present in{dir}/_mods/, offer to install:
New mod available: {name} — {description from frontmatter}. Install it? (y/n)
If accepted, copy the canonical file to {dir}/_mods/{name}.md. Create _mods/ if it doesn't exist.
3d. Legacy Migration (pr-lieutenant → pr-merge mod)
If {project_root}/.claude/agents/pr-lieutenant.md exists and {dir}/_mods/pr-merge.md does not, offer migration:
Migration: pr-lieutenant → pr-merge mod
Your workflow uses a pr-lieutenant agent for PR management. Spacedock now uses mods instead. I'll:
- Create
{dir}/_mods/pr-merge.mdwith the PR management mod- Remove
agent: pr-lieutenantfrom any README stage entries- Regenerate the first-officer with mod discovery
The pr-lieutenant agent file at
.claude/agents/pr-lieutenant.mdwill be left in place. You can delete it manually if no longer needed.Proceed with pr-lieutenant migration? (y/n)
If accepted:
- Copy
{project_root}/mods/pr-merge.mdto{dir}/_mods/pr-merge.md - Edit the README frontmatter: remove
agent: pr-lieutenantfrom any stage entries
Phase 4: Migrate Entity Data
After upgrading scaffolding, check whether schema changes require migrating existing entity data.
ID Style Preservation
README frontmatter may contain id-style: sequential, id-style: sd-b32, or id-style: slug. Refit must preserve the current id-style; do not silently change it. Report the current style in the refit summary, recommend sd-b32 only when collaboration pressure exists (worktree stages, PR/merge mods, multiple creators, branches, or offline work), and require explicit captain approval before changing README frontmatter.
Before any approved style change, run status --validate against the workflow and report failures. Existing sequential workflows require no data rewrite. SD-B32 means Spacedock Base32: this style requires each entity to store a 24-character lowercase SD-B32 stored ID derived from SHA-256 digest material and formatted with Spacedock's alphabet 0123456789abcdefghjkmnpqrstvwxyz, while status displays shortest unique prefixes. Slug style derives identity from filenames and makes status --next-id non-applicable. Migration is manual migration in this release: use validation to make the change safe, and defer rewrite automation or bulk frontmatter rewriting to a separate tracked task.
Step 1 — Detect schema changes
Compare the old README's ## Schema and ### Field Reference sections against the new version. Look for:
- Changed field types or ranges (e.g., score changed from integer/25 to float/0.0–1.0)
- Renamed fields (e.g.,
priority→score) - Removed fields (fields in entities that are no longer in the schema)
- New required fields (fields added to the schema that existing entities lack)
If no schema changes affect entity data, skip to Phase 5.
Step 2 — Scan entities
For each detected schema change, scan all entity files in {dir}/*.md (excluding README.md) and identify which entities have values in the affected fields.
Present findings to the captain:
Schema migration needed:
{description of what changed in the schema}
Affected entities: {list of entities with current values that need migration}
Proposed migration: {what the migration would do — e.g., "Convert score from /25 to 0.0–1.0 by dividing by 25"}
Apply this migration? (y/n)
Step 3 — Execute migration
On the captain's approval, update the affected entity frontmatter fields. Use the Edit tool — never rewrite whole entity files. Only touch the specific fields identified in the migration plan.
Show a summary of what was migrated:
Migrated {N} entities: {list of entity: old_value → new_value}
Phase 5: Finalize
- Update version stamp to
{current_version}in the README YAML frontmatter:commissioned-by: spacedock@{current_version}. - Show a summary:
Refit complete:
File Action status{Removed (legacy) / Not present} _mods/{name}.md(for each){Updated / Already current / Installed / Custom (no action)} README.md{Stamp updated / User-reviewed / No changes} Suggest committing:
git commit -m "refit: upgrade workflow scaffolding to spacedock@{current_version}"
Degraded Mode (No Version Stamp)
When no version stamps are found on the README, the original baseline cannot be determined. Inform the captain and offer two options:
No version stamps found. This workflow was commissioned before version stamping was implemented, or the stamps were removed. I can't determine what the original scaffolding looked like.
Two options:
- Stamp only — Add version stamps to existing files without changing anything else. This establishes a baseline for future refits.
- Full refit with review — Generate what the current templates would produce and show a full diff for every scaffolding file. You review and approve each change.
Which option?
Option 1: Stamp Only
Add version stamps to versioned files without modifying anything else:
- README.md — Add YAML frontmatter with
commissioned-by: spacedock@{current_version}(wrap in---delimiters if frontmatter doesn't exist). - status — Insert
# commissioned-by: spacedock@{current_version}as the second line (after#!/bin/bash).
Option 2: Full Refit with Review
Execute Phase 3, but show a full diff for every file (including status) and require the captain's explicit approval before replacing each one. Never auto-replace files without a version stamp — the risk of overwriting customizations is too high.
Safety Rules
- Never modify entity file bodies — only frontmatter, and only during an approved schema migration.
- Never auto-replace without a version stamp — always enter degraded mode.
- Always show diffs — even for "replace" strategy files, show the diff before replacing.
- Git is the safety net — remind the captain they can
git difforgit checkoutto recover.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

