← All decision topicsDecision topic
Understand, fix, or improve existing code
Separate debugging, refactoring, review, tests, and codebase understanding before choosing a coding skill.
Last meaningful review July 21, 2026
Start here
You are inside an existing repository and need help changing, reviewing, or understanding it without letting the agent pick the wrong engineering workflow.
This topic coversdebugging · refactoring · PR review · test writing · codebase onboarding
Not this topicgreenfield app creation · security audits as a side effect · automatic large rewrites without verification
Choose your scene
Pick the closest situation, not the perfect one.
Each scene hides the noisy marketplace ranking behind one practical recommendation, one optional alternative, and one fallback when a public skill is not the right intervention.
01Something is broken and I need the cause.
I have a bug, error, failing test, or behavior that does not match expectations.
Decision momentChoose debugging over refactoring or review.
Not thisIf the code works and only needs cleanup, use the refactor scene.
diagnose
It fits root-cause diagnosis better than a generic code improvement skill.
- Use when
- Use it when the first output should be an explanation and fix path.
- Avoid when
- Avoid it for pure style or architecture work.
- Signal
- skills.sh all-time: 233,735 installs.
triage
It is useful when the issue must be classified before work begins.
- Use when
- Use it for incoming bugs or unclear reports.
- Avoid when
- Avoid it after the root cause is already known.
- Signal
- skills.sh all-time: 406,678 installs.
Adapt
Project debug runbook
Use local commands and observability rules when public skills lack context.
- Use when
- Use it for private systems and flaky infra.
- Avoid when
- Do not leak credentials or production data to generic instructions.
- Signal
- Private logs, commands, and environments decide many debugging workflows.
02The code works, but it is hard to maintain.
I want simpler, clearer code without changing behavior.
Decision momentChoose behavior-preserving improvement, not bug fixing.
Not thisIf behavior is wrong, debug first.
improve-codebase-architecture
It targets structural improvement and architecture clarity, which is the core decision here.
- Use when
- Use it for maintainability and architecture cleanup.
- Avoid when
- Avoid it for small local edits or unknown failing behavior.
- Signal
- skills.sh all-time: 502,345 installs.
react-best-practices
It is more appropriate when the code is specifically React and needs framework-level cleanup.
- Use when
- Use it for React component quality.
- Avoid when
- Avoid it outside React projects.
- Signal
- skills.sh all-time: 565,985 installs.
Adapt
Small refactor checklist
For small cleanup, define invariants and run existing tests.
- Use when
- Use it when the change is narrow.
- Avoid when
- Do not use a broad architecture skill to justify a rewrite.
- Signal
- Verification commands and regression risk are repository-specific.
03I need useful feedback on a PR or diff.
I want risks, bugs, and maintainability issues before merging.
Decision momentChoose a review workflow that does not silently rewrite the code.
Not thisIf you want the agent to implement the feature, this is not the right scene.
caveman-review
It is a high-install review-oriented workflow, useful when the output is feedback rather than implementation.
- Use when
- Use it when review is the task.
- Avoid when
- Avoid it as a substitute for formal security review.
- Signal
- skills.sh all-time: 250,940 installs.
gh-address-comments
It fits the follow-up phase after review comments already exist.
- Use when
- Use it for addressing GitHub comments.
- Avoid when
- Avoid it for initial independent review.
- Signal
- OpenAI curated skill source.
No skill
Human maintainer review
Use human review when ownership, security, or release policy matters.
- Use when
- Use it for high-risk changes.
- Avoid when
- Do not claim agent review is approval.
- Signal
- Merge authority and code ownership cannot be outsourced.
04I need tests for behavior that already exists.
I want coverage for a feature or regression without inventing a new test architecture.
Decision momentChoose a test workflow based on behavior and existing test commands.
Not thisIf the app behavior is not implemented yet, use a feature-building workflow first.
tdd
It is a high-install test-first workflow and useful when expected behavior can be expressed as tests.
- Use when
- Use it when you can define expected behavior and verification commands.
- Avoid when
- Avoid strict TDD if you are only documenting already-stable behavior.
- Signal
- skills.sh all-time: 482,366 installs.
webapp-testing
It fits browser-visible behavior and UI flows better than unit-test-only skills.
- Use when
- Use it when behavior must be verified in a running app.
- Avoid when
- Avoid it when no browser environment exists.
- Signal
- Official Anthropic skill source.
Adapt
Repository test conventions
Use local conventions before adding new test architecture.
- Use when
- Use it for mature repositories.
- Avoid when
- Do not create parallel test stacks without permission.
- Signal
- Fixtures, mocks, and commands are local facts.
Why this topic exists
skills.sh ranks TDD, architecture improvement, triage, and browser/debug workflows highly; GitHub skill collections also cluster around review, testing, and repository maintenance.
- skills.sh: tdd from mattpocock/skills has 482,366 installs.
- skills.sh: improve-codebase-architecture has 502,345 installs.
- SkillsMP shows coding tasks attract many duplicates, so scene-gated matching is required.