Skip to content
Back to skills

Fix

ASecurity

Carry a kanban defect from report to merge: write the bug report, get the human''s one approval (kf approve), write a failing reproduction test, fix it, verify once with kf verify, have one independent reviewer judge it, open the PR and watch CI. Use when a work item has kind: bug, for a defect the user reports, or when kf status prints "Next: load the kf:fix skill".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 21, 2026
toolsbashtestingcode-reviewdocumentation

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add phuthuycoding/kanban-flow --skill fix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/phuthuycoding-fix/badge)](https://www.skillsdirectory.com/skills/phuthuycoding-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fix
description: 'Carry a kanban defect from report to merge: write the bug report, get the human''s one approval (kf approve), write a failing reproduction test, fix it, verify once with kf verify, have one independent reviewer judge it, open the PR and watch CI. Use when a work item has kind: bug, for a defect the user reports, or when kf status prints "Next: load the kf:fix skill".'
---

# Fix — bug report, failing test, fix, verify, one reviewer, merge

Plugin root: `${CLAUDE_PLUGIN_ROOT}` — this skill writes paths with this placeholder; resolve it to this path.

Argument: `<context> <name>` for a new item, `<name>` to resume one. The shared rules of `kf:flow` apply throughout.

**Resume:** `kf status --change <name>` — brainstorm or planning → step 1 or 2, backlog → wait for the human's start, implementation → step 3, testing (an older item) → step 4, review → step 5.

---

## 1. Bug report — brainstorm

```bash
kf contexts --json
kf new <name> --context <ctx> --type bug
kf instruct spec-requirement --change <name>      # the bug template and the report's path
```

**Ground every name first** — each file, function, command, field and config key the report names is checked against its definition, not a call site; a name you cannot find is a question for the user. Then reproduce it: run the failing path and keep the exact command and output. A defect you cannot reproduce is reported plainly as such, never assumed fixed.

Fill the bug report — every placeholder:

- `## Summary` — the defect in one or two lines, with its severity.
- `## Steps to Reproduce` — deterministic steps someone else can run and watch fail.
- `## Actual Result` and `## Expected Result`.
- `## Root Cause` — the cause with its evidence (`file:line`), or `undetermined — <what was ruled out>`; never a guess made to look finished.
- `## Acceptance Criteria` — `- [ ] AC-1 …`: the behaviour the fix restores, and the sibling entry points that reach the broken code, each covered or explicitly out of scope.
- `## Affected surfaces` — bare surface names, or `N/A`.
- `## Documentation Impact` — the existing living doc `docs/specs/<context>/<capability>.md` whose documented behaviour the fix corrects, or `none — <reason>`. A fix never creates a living doc.
- `## Estimate` — `- Agent minutes: <n>`, your own raw estimate.
- `## Test Strategy` — `- Level: unit | unit+integration | full`, and the existing tests that assert the defective behaviour (`file:line`), or `none — searched <patterns>`.

A bug has no scout and no spec-reviewer: the grounding above is its only check, so do it.

## 2. Approval — the one human gate

`kf validate --change <name>`, then one summary: the defect, its severity, the reproduction, the root cause, the acceptance criteria and the estimate. Ask **"approve?"** once. On approve set `status: confirmed` and run `kf approve <name>` (it moves through planning to implementation); a deferring reply runs `kf approve <name> --backlog`. Never infer a deferral, never ask twice. A fix that turns out to need new behaviour stops here: it is a feature, the human's call.

A fix is one task. Only a fix that splits into tasks a reviewer could judge apart gets a `phase-2-implementation-plan.md` (Task Breakdown with Files and Dependencies, its regression task's Description containing the word `regression`) and runs `${CLAUDE_PLUGIN_ROOT}/assets/skills/flow/references/task-loop.md`.

## 3. Reproduce, then fix — in the item worktree

1. **Failing reproduction test first.** Turn the steps to reproduce into a test at the level the strategy names; run it and see it fail on the defect itself (the wrong value, the missing guard — not an import error). Keep the failing output for the review: it must fail on the base commit and pass after the fix.
2. **Fix** the root cause, not the symptom, inside the report's scope; update the existing tests the report lists. Run the focused tests, the typecheck and the lint.
3. **Commit** on the item branch — subject and body only, no trailers.

## 4. Verify once, then move to review

```bash
kf verify <name> --stage       # in the background; the full suite once, a delta after a fix
kf stage <name> review
```

`kf stage` moves only on a passing record at HEAD; with no `harness.verify.stage` pinned, on the human's waiver. A later commit owes a new (delta) run.

## 5. One independent reviewer

Follow `${CLAUDE_PLUGIN_ROOT}/assets/skills/flow/references/review.md`. A fix dispatches **one** `Agent(kf:code-reviewer)` on `opus`, all dimensions (five only when `select-tier` gets `CRITICAL=1`), whose brief adds: review against the bug report and the existing behaviour; check that the reproduction test fails on `BASE` and passes on HEAD; list the sibling entry points and whether the fix covers each; state a claim you tried to break. The living doc the report names is edited before the reviewer (§ 2 there). Then the verdict, the PR and CI, and `kf report <name>`: fill its `## Verdict`, `## Reviewers` and `## Findings`.

## 6. Merge and close

- **PASS** → the PR URL and its mergeability line, with the `gh pr merge` command when the PR is ready, to the human, who merges; `kf status --change <name>` closes the item. Never merge yourself.
- **FAIL** (reviewer or red CI) → `kf stage <name> implementation`, repair, steps 4–5 again (the open PR updates on push).
- **REQUIREMENT_BUG** → stop and report.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.