Skip to content
Back to skills

Vbugfix

ASecurity

Use when something is broken, wrong, flaky, crashing, slow or regressed. Builds a red feedback loop on the exact symptom before any theory, tests falsifiable hypotheses, fixes the root cause and every instance of the pattern behind a regression test, then verifies, reviews and merges. Escalates with evidence if it won't reproduce.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 29, 2026
ai-agentsgogitperformance

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add vocsong/VocsCode --skill vbugfix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vbugfix?

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

Security grade badge for Vbugfix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vocsong-vbugfix/badge)](https://www.skillsdirectory.com/skills/vocsong-vbugfix)

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: vbugfix
description: Use when something is broken, wrong, flaky, crashing, slow or regressed. Builds a red feedback loop on the exact symptom before any theory, tests falsifiable hypotheses, fixes the root cause and every instance of the pattern behind a regression test, then verifies, reviews and merges. Escalates with evidence if it won't reproduce.
---

# vbugfix — fix a bug

Read `../vcore/SKILL.md` first and follow it. Every behaviour fix, even one line, keeps the red loop
and the regression test; only non-behaviour changes (a typo in a message, docs) take the light path.

## 1. A red loop — the gate before any theory

Build one command that shows the failure **on this exact symptom**: a test, a script, a replayed
trace, a scripted app run. Ways to build it and how to tighten it: [feedback-loop.md](feedback-loop.md).
It must be red-capable, deterministic, fast and runnable without a human (a guided script only when a
human step is truly unavoidable — see the reference). No hypotheses before you
have seen it fail. Check session history and recent commits for the same symptom first.

**Flaky?** Raise the hit rate until it's debuggable (loop the trigger, add load, pin seeds and
time) — a 1-in-50 failure can't confirm a fix.

**Won't reproduce?** After a bounded attempt (tests, running app, logs, history), stop and bring
the user: what you tried, ranked hypotheses, and exactly what information would unblock it. You may
propose a diagnostics-only PR (logging or assertions) for approval. No fix ships for a bug nobody
has seen fail.

## 2. Minimise

Shrink the reproduction until every remaining step matters. Keep the original, un-minimised repro
too — you re-run it at the end.

## 3. Hypotheses

Write 3–5 falsifiable hypotheses, each with the observation that would kill it; share them with the
user without waiting. Test the cheapest first, one variable at a time; a debugger or a targeted
probe beats scattered logs. Tag any logging `[DEBUG-<4 random chars>]` so cleanup is one search.

- When evidence refutes a hypothesis, **revert the changes it motivated** — "might help" changes
  don't ship.
- After **2 failed fixes**, stop patching: write down the premise those fixes shared and test the
  premise itself.
- If you forced the failure by mutating code, diff against a pristine copy before going on.
- Performance bugs: measure a baseline first, then bisect (`git bisect run <loop>` when it's a
  regression).
- If there is no correct place to fix it, that is the finding — say so (and consider `varchitect`).

## When the product is right and the test is wrong

Sometimes the evidence shows the product behaves as specified and the failing test assumed the wrong
environment (window size, timing, platform paths, locale). Then the fix is the test, and the proof
changes shape — on the base, the new test would simply pass:
- show the **old** assertion failing under the real condition (e.g. the CI window size), and
- show the **new** assertion failing when the behaviour is deliberately broken, then revert the break.
Commit it as `test:` (no user-visible change), and say plainly in the PR why the product was right.

## 4. Root cause, then fix

- Write the regression test first and watch it fail for the right reason (`../vverify/SKILL.md` L1).
  For the before/after proof, use the overlay's replay command if named, with pinned baseline and
  candidate SHAs and a stable seed where randomness applies. A setup, collection or import
  failure is never red. A unit test shows a branch behaves; it doesn't by itself prove the
  user's bug is gone.
- Fix the cause. A guard is a fix only when the state it handles is legitimate; otherwise find out
  why the state exists.
- **Fix the pattern, not the instance:** search for every place with the same fault and fix or list
  them.
- Remove every `[DEBUG-…]` line. Re-run the original repro from step 2 — it must pass now.
- Propose the cheap, always-on signal (a log line, an assertion, a metric) that would have shown
  this cause at first look.

## 5. Finish

`../vverify/SKILL.md` → `../vreview/SKILL.md` → `../vmerge/SKILL.md`.

The PR says: the symptom, the root cause in one or two sentences, why the fix addresses the cause,
other instances fixed, and the regression test that now passes (and failed before).

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.