From mbscode
Handles broken state, cancellations, overrides, and compaction recovery. Use when tasks are stuck, metadata is corrupt, or you need to cancel work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mbscode:recoveryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Repair broken state by reading `.mbscode/` files on disk. Handles stuck tasks, missing metadata, compaction recovery, cancellations, and verification overrides.
Repair broken state by reading .mbscode/ files on disk. Handles stuck tasks, missing metadata, compaction recovery, cancellations, and verification overrides.
When NOT to use:
What went wrong?
│
├── "Verifier keeps rejecting"
│ ├── Findings are valid → fix them (completing skill)
│ ├── Criteria are wrong → update acceptance criteria, re-verify
│ └── Genuine exception → override (see below)
│
├── "Task metadata is missing"
│ └── Reconstruct from git (see below)
│
├── "Context seems wrong after compaction"
│ └── Read .mbscode/ files — state is on disk
│
├── "Need to cancel this task"
│ └── Set status: "cancelled" with reason (see below)
│
├── "context.json is stale"
│ └── Delete it — session-init hook regenerates
│
└── "Everything is broken"
└── Nuclear: rm -rf .mbscode (see below)
{
"status": "cancelled",
"cancelled_at": "2026-04-11T16:00:00Z",
"cancel_reason": "User switched to OAuth instead of custom JWT"
}
Don't delete the file. Cancelled tasks are history — they document decisions.
Reconstruct from available information:
git diff --name-only # what files changed
git log --oneline -5 # recent context
{
"task_id": "<id>",
"subject": "<from task subject>",
"acceptance": ["<reconstruct from diff or ask user>"],
"owned_paths": ["<from git diff>"],
"progress": [{ "text": "RECOVERED — original metadata was missing" }]
}
Delete it. The session-init hook regenerates it.
rm .mbscode/context.json
Two tasks modifying the same files? Resolve:
Work is partially done but can't continue (user changed direction, dependency blocked):
Preferred: adjust metadata. Wrong criteria? Update them. Wrong doc_target? Remove it. Re-invoke verifier.
Last resort: manual override with documented reason.
{
"override": {
"at": "2026-04-11T16:00:00Z",
"reason": "No test framework configured — testing setup is a separate task",
"verified_by": "human"
}
}
The hook checks override.reason and allows completion.
The compact-restore hook injects state automatically. If things seem off:
Read .mbscode/rules.md → rules survive compaction (disk)
Read .mbscode/tasks/ → find active task
Read active task's progress → what was done before compaction
rm -rf .mbscode
Session-init hook recreates it. Task history lost. Only if recovery fails.
Before leaving recovery:
.mbscode/ directory exists and is readablestatus: "cancelled" + cancel_reason setoverride.reason documents what was checked.mbscode/| Excuse | Reality |
|---|---|
| "Just delete and start over" | Loses history. Try recovery first. |
| "Override is faster" | Override is for exceptions, not speed. Fix the issues. |
| "Compaction lost everything" | State is on disk. Read the files. |
| "I'll recreate the task later" | Cancel properly. Future you (or the next session) needs the history. |
| "Metadata doesn't matter, the code is done" | Metadata is what the verifier checks. No metadata = no verification = no completion. |
| "The task is too broken to fix" | Read the files. Most recovery takes under a minute. |
.mbscode/ after compactionnpx claudepluginhub mbstools/mbscode --plugin mbscodeProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.