CueLabsCueLabsCueLabs
BotsPromptsSkillsWorkflowsCategoriesTagsPromptmastersTaste
Developers
Login
CC0 2026 CueLabs

Test-First Bug Fixing Approach

Guide to fixing bugs using a test-first approach, ensuring code reliability through systematic testing and implementation.

I
@ilker
about 1 month agoOctober 30, 2026 at 01:02 PM
Coding•Development

Content

Variables
I have a bug: . Take a test-first approach: 1) Read the relevant source files and existing tests. 2) Write a failing test that reproduces the exact bug. 3) Run the test suite to confirm it fails. 4) Implement the minimal fix. 5) Re-run the full test suite. 6) If any test fails, analyze the failure, adjust the code, and re-run—repeat until ALL tests pass. 7) Then grep the codebase for related code paths that might have the same issue and add tests for those too. 8) Summarize every change made and why. Do not ask me questions—make reasonable assumptions and document them.

Related Skills

Sniper-Precision Debugging Skill

Skill

A step-by-step critical thinking debugging skill designed to fix problems directly and ensure they are resolved without causing additional issues.

H@amvicioushecs
0

karpathy-guidelines

Skill

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

y@yazz4444

Comments (0)

0

Flaky Test Detector

Skill

Finds flaky tests from repeated CI runs: parses JUnit XML or a CSV run history, flags tests that both pass and fail (confirmed when on the same commit), ranks them by flip and failure rate, and suggests likely causes and fixes. Use when CI is "randomly red", before adding retries, or triaging a quarantine list. Includes a stdlib Python detector with --self-test.

F@f
0

Gitignore Pattern Tester and Reviewer

Skill

Explains every line of a .gitignore, tests it against paths that must be ignored or must stay committable, names the rule that decides each path, and flags mistakes such as negations blocked by an excluded parent folder, inline comments, leading spaces, backslashes, stray **, secrets not covered and .env.example ignored. Returns a fixed file. Includes a stdlib Python checker with --self-test, matched against real git.

F@f
0