AI Agent Hub
Back to skills
The Learning Code Doctor icon

The Learning Code Doctor

Development Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please install @user_00c9b356/bug-fixer-ultimate according to https://skillhub.cn/install/skillhub.md

About this skill

What Problem It Addresses

Debugging often mixes two failure modes: low-level patterns such as if x = y, mutable default arguments, and bare except blocks, and context-dependent bugs that may break callers after a fix. This skill separates deterministic pattern fixes from a small Bash-driven repair loop, and records reflections to reduce repeated mistakes.

How It Works

  • L1 deterministic fixes: matches known error patterns and applies direct repairs, such as changing append([x]) to extend([x]).
  • L2 AI reasoning: uses commands like grep, sed, and python -c to locate, modify, and validate code without relying on complex framework APIs.
  • Reflexion loop: when a command fails, tests do not pass, or multiple attempts fail, it generates a reflection, adds it to context, and tries a new strategy.
  • Document memory: stores failures, lessons, and version changes in ERRORS.md, LEARNINGS.md, and VERSIONS.md.
  • Verification guardrails: after a fix, it requires the original failure to disappear, runs a minimal test when possible, and checks call-site impact with grep -rn.

Boundaries And Notes

It defaults to review mode and does not perform irreversible production operations on behalf of the user. High-risk changes are marked for confirmation with rollback paths. If the input is ambiguous, external APIs are unavailable, or a suggestion conflicts with reality, it clarifies first, degrades gracefully, or marks the advice as not applicable. If no usable tests exist or too many call sites are affected, it flags the impact scope for confirmation instead of claiming safety.

Use Cases

  • Fix repeated Python mutable default argument bugs by correcting function signatures and checking all call sites.
  • Validate an out-of-bounds index fix with grep and pytest, confirming the original error disappears without new warnings.
  • When repeated fixes fail, record failure causes in ERRORS.md and generate a new debugging strategy.
  • Before changing a function default value, list all call sites and decide whether to rollback or add tests.

Best For

  • Python backend maintainers who need to locate failures to specific functions and validate fixes
  • CLI tool engineers who debug with Bash and pytest and require minimal tests after repairs
  • Code maintainers who want to capture repeated failures and avoid recurring debugging traps
  • Tech leads who assess signature-change impact before deciding to roll back or add tests