Skip to content
Skills Library
Programming · Building & coding

fix

/fix

Use when a change stays within 1-3 files and does not need a formal spec (bug fixes, validation tweaks, small config changes) — self-escalates to implement if scope grows.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when a change stays within 1-3 files and does not need a formal spec (bug fixes, validation tweaks, small config changes) — self-escalates to implement if scope grows.

Arguments

/fix <bug or small change>
Original author description

Use when a change stays within 1-3 files and does not need a formal spec (bug fixes, validation tweaks, small config changes) — self-escalates to implement if scope grows.

How it works

  1. MTK File Resolution
  2. Overview
  3. When To Use
  4. Workflow
  5. Critical Rules
  6. Verification
Original SKILL.md headings · 101 lines, 936 words
SKILL.md preview
---
name: fix
description: Use when a change stays within 1-3 files and does not need a formal spec (bug fixes, validation tweaks, small config changes) — self-escalates to implement if scope grows.
type: skill
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
argument-hint: <bug or small change>
user-invocable: true
---

# MTK Fix — Lightweight Task Loop

## MTK File Resolution

Resolve MTK skill/reference/script paths per `.claude/references/mtk-file-resolution.md` unless the router already stated `MTK_ROOT=<path>` this session; `CLAUDE.md`, `.claude/tech-stack`, `.claude/rules/`, `tasks/`, `docs/`, `.mtk/` stay project-relative.

---

## Overview

A lightweight, bounded fix loop for 1-3 file changes: load context, reproduce, write the failing test, fix the root cause, verify. Invoked by the `/mtk` router when the user says "fix", "bug", "broken", or similar. Composes `context-engineering`, `security-and-hardening` (when the fix touches auth, audited state, secrets, or infra), and the active `tech-stack-{stack}` skill.

## When To Use

- Bug fixes
- Validation tweaks
- Query fixes
- Small config changes
- Renames or narrow refactors that stay within 1-3 files

If the work grows beyond 3 files, introduces new architecture, or needs a formal change manifest, stop and escalate per the Scope Guard below: several independent fixes, or a mechanical sweep (renames, formatting) past 3 files, go to `batch-fix` (its mechanical mode: `batch-fix` → Proportionality check); one growing change goes to `implement`. The 3-file limit has no exception.

## Workflow

Follow the phases below in order. Each phase loads what it needs and no more.

### Load Context (Progressive Disclosure)

1. Follow `.claude/skills/context-engineering/SKILL.md` — it resolves the stack for the target paths (pass a target file, not `$PWD`, when the fix sits in a subtree) and loads the stack skill. If neither `AGENTS.md` nor `CLAUDE.md` exists, stop and tell the engineer to run `/mtk-setup`.
2. Read only what the fix needs:
   - **Always:** the coding guidelines from the tech stack's `## Reference Files`
   - **If fix touches data layer/ORM:** the tech stack skill's `## ORM & Data Layer Guidance` (and `## Framework Patterns` for handler/HTTP code)
   - **If fix touches auth/secrets/financial:** `.claude/references/domain-finance.md` (finance and security supplement)
   - **If adding tests:** the testing supplement from the tech stack's `## Reference Files`
   - **Before commit:** `.claude/references/pre-commit-review-list.md` if present
3. Resolve and scan relevant lessons. When `scripts/learnings.sh` is present, prefer the structured query (5-layer filter — proximity / recurrence / severity / validity / phase) over the flat markdown file:
   ```bash
   # Resolve the script: project copy first, else the plugin's copy.
   LS="$([ -n "${MTK_HELPER_ROOT:-}" ] && echo "$MTK_HELPER_ROOT/scripts/learnings.sh" || ([ -f scripts/learnings.sh ] && echo scripts/learnings.sh || echo "${CLAUDE_PLUGIN_ROOT}/scripts/learnings.sh"))"
   bash "$LS" query --phase implement --files "<target file paths>" --max 8
   ```
   Falls back to scanning `tasks/lessons.md` directly when the script is absent from both the project and the plugin (older repos).
4. Read the target file and its closest neighbors before editing.

### Execute The Fix Workflow

1. **Reproduce** — capture the failing test, error output, or behavioral evidence before editing, and state the suspected root cause.
2. **Failing test first** — for a bug fix, write the smallest test that fails for the reported reason, then make it pass. Mechanical edits (rename, format) skip this.
3. **Fix the root cause**, not the symptom, with the smallest change that matches the local pattern.
4. **Verify** with the active tech stack's commands: the build, then the tests for the changed area.

**Test policy.**
- Pick the test level from the stack skill's `## Test Level Guidance`; unit for pure logic, integration where behavior depends on framework infrastructure.
- Never use an in-memory provider to prove database semantics (constraints, transactions, query translation); use the stack's real-provider pattern from `## ORM & Data Layer Guidance`.
- When a library's behavior is uncertain, read its real exception/return surface from local source (decompiled package, SDK, in-repo docs) before trusting the call; say what stayed unverified.
- If a test fails, debug the implementation; do not weaken the test or relax its assertion. After repeated failed attempts, stop and explain what is blocking.

### Scope Guard

If scope grows past 1-3 files, **stop and self-escalate** instead of expanding in place. Where it escalates depends on *why* it grew:

- **Several independent trivial fixes, no new contract** — the growth is just more small unrelated fixes (e.g. a review threw up 5 nits across 5 files) → escalate to **`batch-fix`**.
- **One growing change past 3 files, a new handler/entity/slice, a new/changed public contract, or architectural re-planning** → escalate to **`implement`**.

**Self-escalation procedure:**

1. Summarize what's been discovered so far (root cause, files identified, why the scope grew).
2. Invoke the router with the original fix description plus the discovered scope, using the marker the router catches:
   - To batch-fix: `Skill(skill: "mtk", args: "<original description> — escalated from fix (batch): <short reason>")`
   - To implement: `Skill(skill: "mtk", args: "<original description> — escalated from fix: <short reason>")`
3. Do not continue editing. The router picks the target from the escalation marker.
4. If the engineer prefers to keep the fix narrow, they can override by re-invoking `/mtk fix` with a scoped-down description.

Silent scope creep past 3 files is a red flag — always escalate rather than quietly expanding.

### Final Report

Report briefly:

- files changed
- root cause
- tests added or updated
- build result
- relevant test result

## Critical Rules

1. Read before editing.
2. Match the local codebase pattern.
3. Do not gold-plate unrelated improvements.
4. Escalate instead of letting a quick fix become a hidden feature project.

## Verification

- [ ] Root cause was reproduced before fixing, and a bug fix has a test that failed first
- [ ] Change stayed within 1-3 files; escalated to batch-fix (several independent fixes) or implement (new slice/contract/re-planning) if scope grew
- [ ] Tests added or updated for the regression
- [ ] Build is clean and relevant tests pass
- [ ] Final report lists files changed, root cause, tests, and verification evidence

Versions

RepositoryScoreLicence
This page · moberghr/mtk-agent-toolkit100MIT
swingerman/engineer100MIT
Hainrixz/claude-seo-ai100MIT
vanducng/skills100MIT
RemiPelloux/kill-my-idea100MIT
tony/skills100MIT
applelog/nondev-kit100MIT
A7-studio/jobmigo100MIT
koda-ai-studio/agent-bom100Apache-2.0

Database snapshot: 13.11.2026 · package version 61e3389b242f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100quick-fix
    Express lane for trivial bugs and tiny changes — skips the full contract ceremony. Use for one-line fixes, copy/CSS tweaks, config changes, dependency bumps, or any change localized to one root cause with no new behavior, instrumentation, schema, or platform. Triggered by `/fix…
  • 100implement-change
    Plan, make and check a code change from start to finish. Use this for any feature, bug fix, enhancement or behaviour change, including requests that sound small such as "add a field", "fix this" or "make it support X". It keeps the change small, complete and verified.
  • 100quick
    Implement small Phoenix changes without planning — add validations, update routes, fix components, create migrations. Use for single-file edits under 50 lines.
  • 100bug-fix
    Fix a Device bug the project's way - reproduce it, write a small failing test, find the root cause, fix it, prove the test now passes. Use for any bug report or broken feature; escalates to a spec when the cause or fix is not obvious.
  • 100focused-fix
    This skill should be used when the user asks to "fix a bug with minimal changes", "analyze change scope for a bugfix", "find the minimal set of files to change", "do a focused bugfix", or "scope a minimal repair".
  • 100just-stop
    Stops "just one more" small tweaks that add scope without changing the outcome. Use when named (just-stop), or when about to implement extra polish, cleanup, or drive-by fixes beyond the stated goal.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.