Skip to content
Back to skills

Z Bugfix

ASecurity

Gated 4-phase diagnosis workflow for hard bugs, concurrency issues, and performance regressions. Use when something throws, fails, deadlocks, freezes, or behaves unexpectedly.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
ai-agentsgoperformance

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add kzxl/z-plugin --skill z-bugfix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Z Bugfix?

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

Security grade badge for Z Bugfix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kzxl-z-bugfix/badge)](https://www.skillsdirectory.com/skills/kzxl-z-bugfix)

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: z-bugfix
description: Gated 4-phase diagnosis workflow for hard bugs, concurrency issues, and performance regressions. Use when something throws, fails, deadlocks, freezes, or behaves unexpectedly.
---

# Z-Bugfix Investigation Protocol

Enforces a rigorous 4-phase investigative gate. Never jump directly to guessing fixes in production code.

## Phase 1: Sensory Sweep (Observable Reality)
1. Read exact error messages, stack traces, and failure exit codes verbatim.
2. Locate the precise file and line numbers of the failure point.
3. Identify recent code diffs or environmental triggers that exposed the issue.

## Phase 2: Socratic Inquiry & Hypotheses
1. Formulate 2–3 competing hypotheses explaining the failure:
   - $H_1$: Logic/boundary condition error.
   - $H_2$: Concurrency / race condition / state mutation timing.
   - $H_3$: Environmental / configuration / type mismatch.
2. For each hypothesis, identify a testable distinction.

## Phase 3: Deterministic Reproduction Test (Red Gate)
1. Write a minimal automated reproduction test reproducing the exact failure.
2. Execute the test and verify it FAILS with the expected signature (Red).
3. If the test cannot reproduce the issue, do NOT touch production code; return to Phase 1.

## Phase 4: Targeted Fix & Zero-Regression Verification (Green Gate)
1. Apply the minimal necessary correction to eliminate the root cause.
2. Re-run the reproduction test and confirm it PASSES (Green).
3. Re-run the entire project test suite to verify zero regression across existing features.
4. Document the lesson in 3 parts: `<Problem> | <Root Cause> | <Fix>` for episodic memory harvesting.

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 ai-agents →

Comments

Loading comments…

Newsletter

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