← ClaudeAtlas

fixing-bugslisted

Fix a Langflow bug using strict TDD — UNDERSTAND → REPRODUCE (RED) → VERIFY RED → FIX → VERIFY GREEN → VALIDATE → REFACTOR — with Langflow hotspot awareness (lfx vs langflow-base split, dynamic component discovery, expand-contract Alembic migrations, pre-commit must invoke uv run git commit). Use when the user reports a bug in Langflow, mentions Sentry/error/regression, pastes a stack trace, or asks to fix something. Bugs require a failing test that proves the bug existed before any code change. For building new features use developing-features-tdd; for non-TDD code work use developing-features.
Cristhianzl/claude-skills-czl · ★ 5 · Code & Development · score 80
Install: claude install-skill Cristhianzl/claude-skills-czl
# Fixing Bugs Never fix a bug before proving it exists with a failing test. The fix is only valid if a test transitions from RED (failing) to GREEN (passing). ## Read first (always) List `learnings/` and read every file relevant to the current bug. Project-specific test conventions, framework quirks, recurring bug patterns, or hot zones live there and override the defaults in this SKILL.md. If a learning conflicts with this file, **the learning wins** — mention it to the user. ## Tradeoff — when to apply, when to lighten up Apply the full cycle for **any defect in production code** the user is reporting (Sentry alert, support ticket, "this broke", regression). The discipline pays off because the test becomes a permanent sentinel against the same bug returning. Lighten the formality only when fixing a typo, a build script, or a one-off script the user explicitly labels as throwaway. Even then, run the test suite afterwards. ## The cycle (strict order) ``` 1. UNDERSTAND → Read the bug report; identify expected vs actual; locate the OS/platform 2. REPRODUCE → Write a failing test that triggers the EXACT error path 3. VERIFY RED → Run the test; it MUST fail for the reason in the bug report 4. FIX → Write the MINIMUM code change to make the test pass 5. VERIFY GREEN → Run the same test; it MUST now pass 6. VALIDATE → Run the FULL suite (CI matrix if platform-suspect); nothing else breaks 7. REFACTOR → Optional; only if the fix introduced dupl