Skip to Content
MeowKit
Skills

mk:fix

Finds the root cause of a bug, type error, lint failure or CI failure, then applies a minimal fix and verifies it with before and after checks.

Source.claude/skills/fix/SKILL.md
Ownerlifecycle
Runtimeclaude-code
Riskhigh

What it does

mk:fix scouts the affected code, diagnoses with evidence, proves the root cause, fixes that cause and re-runs the failing commands. The depth depends on the profile: a known one-file cause gets a short cycle, a race condition gets a full investigation.

When to use it

Use it for any defect that should be fixed: bugs, type errors, lint failures, CI failures and runtime errors.

NeedUse instead
Investigate without fixingmk:investigate
A build or compile error onlymk:build-fix

Usage

/mk:fix [issue|diagnostic-report-path] [flags]

FlagEffect
--autoStandard profile with automatic progress through diagnosis and verification. Stops at any required human decision and never self-approves.
--reviewPauses at each step for your approval.
--quickQuick profile for a known cause in two files or fewer.
--parallelOne developer agent per independent issue.
--tddWrites the regression test before the fix and the .meowkit/state/tdd-mode sentinel. Without it a regression test is recommended, not required.
--no-captureSkips the memory entry and the report file.
--adviceOne run supervised by the athena agent at checkpoints (at most 5 calls). Standard and deep profiles only. It is evidence, never approval.
/mk:fix login fails after 24 hours --auto
/mk:fix payment processing timeout --review
/mk:fix TypeScript error in auth.ts --quick
/mk:fix all failing tests in checkout --parallel
/mk:fix "auth bypass" --tdd

Without a mode flag the standard profile runs. A supplied diagnostic report is evidence to validate, never a substitute for investigation.

Profiles

ProfileWhenWhat runs
QuickKnown cause, two files or fewerMinimal scout, compact root-cause proof, edit, before and after check, summary. No plan, report, memory entry or subagents by default.
Standard (default)Most bugsFull evidence chain, root-cause proof, regression test, relevant suite, review.
DeepContract or architecture changesStandard plus a plan agreed with you.

Pick one profile; escalation rules are in references/choosing-a-profile.md. Symptom-specific moves are in references/by-symptom.md.

Steps

  1. Check memory (standard and deep): grep -rilE "kw1|kw2|kw3" .meowkit/memory/ and open matching entries. A matching gotcha becomes the first hypothesis.
  2. Scout with mk:scout: files, dependencies, tests, git log, and the risk flags from agent-detector/references/risk-checklist.md. This step is never skipped.
  3. Diagnose: capture the exact errors first. Quick validates the known cause directly. Standard and deep use mk:investigate and mk:sequential-thinking. If confidence is below medium, gather more evidence before fixing.
  4. Prove the root cause. Six fields must be filled before the fix: exact symptom, reproduction, expected versus actual, root cause with file:line, why now (or an explicit unknown), blast radius.
  5. Fix the root cause with minimal changes that follow existing patterns. A fix that departs from the diagnosis goes back to step 3.
  6. Verify and prevent: re-run the pre-fix commands, run the regression test, apply defense in depth (references/prevention-gate.md). After 3 failed attempts the skill stops and questions the architecture with you.
  7. Finalize: report confidence, root cause, changes and prevention; append a gotcha with mewkit note gotchas only when the lesson is not derivable from code or git; hand moderate and complex fixes to project-manager and documenter; ask about a commit.

For a fix touching more than two files, write a plan first with mk:plan-creator.

Output

Standard and deep runs write .meowkit/state/evidence/<YYMMDD-HHMM-slug>/workflow-evidence.json (or tasks/plans/<plan>/reports/evidence/ when the fix escalated to a plan). It indexes risk flags, the six proof fields and verification commands. It approves nothing and carries no score. A standalone standard or complex fix also writes tasks/reports/fix-<YYMMDD-HHMM>-<slug>.md. --no-capture skips the report and memory entry.

If a risk flag such as AUTH, AUTHZ, DATA_MODEL, AUDIT_SEC, EXT_SYSTEM, PUBLIC_CONTRACT or WEAK_PROOF matches, the skill asks you explicitly before finalizing, even in --auto.

Gotchas

  • Do not guess a cause. Test hypotheses against evidence.
  • Trace from symptom to root cause. A passing test with the cause intact is a symptom fix.
  • A missing regression test leaves the fix incomplete unless the omission is recorded (lint, format or config-only changes).
  • Change one thing at a time, then verify, so you can tell which change worked.
  • Fix the reported bug and open a separate task for any "while I'm here" refactor.

On this page