Fix Code Issues Systematically

VerifiedSafe

Systematically fix code issues found by /review or reported by users, categorizing by severity and applying minimal targeted corrections with verification.

Sby Skills Guide Bot
DevelopmentIntermediate
3/8/2026
Claude Code
#bug-fixing#code-review#refactoring#typescript#code-quality

Recommended for

Automated summary

Systematically fixes problems reported by /review or by the user, ranking them by severity and applying minimal changes.

Strengths

  • Sorts issues by severity (critical, high, medium, low) and presents a fix plan before touching any code
  • Enforces minimal edits, one concern per change, while preserving the original behavior
  • Ships concrete fix patterns: missing imports, useEffect cleanup, untracked setTimeout/setInterval and requestAnimationFrame, replacing any with named types, DRY violations
  • Wraps up with an npx tsc --noEmit check plus a fix summary and git diff of all changes

Limitations

  • The verification step is TypeScript-specific (npx tsc --noEmit); it does not translate to other languages as written
  • Assumes a prior /review run and a .claude/rules/ folder holding project conventions
  • Never commits on its own: it stops and asks the user whether to proceed
When to use it

Use it when a code review or a user report has produced a concrete list of issues to fix in an existing codebase.

When not to use it

Avoid it for adding features or restructuring architecture, since the skill deliberately limits itself to small, targeted fixes.

Security analysis

Safe
Quality score90/100

The skill only uses Bash for git diff and npx tsc, both constrained and legitimate for verifying fixes. No destructive, exfiltrating, or obfuscated commands are present.

No concerns found

How this analysis is made

Examples

Fix review findings
Take the issues from the last /review and fix them, starting with the critical ones.
Memory leak cleanup
There's a memory leak in MapView.tsx — map layers and event listeners aren't removed on unmount. Can you fix it?
Type errors after refactor
My last change broke the build with a bunch of tsc errors and a few any casts. Fix them one by one and show me the diff.

name: fix description: Systematically fix issues found by /review or reported by the user allowed-tools: Read, Grep, Glob, Edit, Write, Bash(git diff*), Bash(npx tsc *)

Fix Skill

Systematically fix code issues found by /review or reported by the user.

Instructions

Step 1: Identify Issues

If coming from a /review, gather the issues from the review output. Otherwise, ask the user what needs fixing.

Categorize each issue by severity:

  • Critical — Compilation errors, missing imports, runtime crashes
  • High — Memory leaks, missing cleanup, security concerns, DRY violations
  • Medium — Convention violations, inconsistencies, naming issues
  • Low — Style preferences, minor optimizations

Step 2: Plan the Fix Order

Fix issues in severity order (critical first). Group related fixes together when they touch the same file to minimize changes.

Present the plan to the user before starting:

## Fix Plan

### Critical (fix first)
1. [Issue] — [File:line] — [What to do]

### High
2. [Issue] — [File:line] — [What to do]

### Medium
3. [Issue] — [File:line] — [What to do]

Step 3: Apply Fixes

For each fix:

  1. Read the file to understand the current code
  2. Apply the minimal change needed to fix the issue
  3. Verify the fix doesn't break anything nearby
  4. Move to the next issue

Follow these principles:

  • Minimal changes — Fix only what's broken, don't refactor surrounding code
  • One concern at a time — Don't mix fixes for different issues in the same edit
  • Preserve intent — Keep the original behavior while fixing the problem
  • Follow project conventions — Apply fixes using the patterns from .claude/rules/

Step 4: Verify

After all fixes:

  1. Run npx tsc --noEmit to check for type errors
  2. Show the user a summary of what was fixed
## Fix Summary

### Fixed
- [Issue] — [File] — [What was done]

### Skipped (needs discussion)
- [Issue] — [Reason]

### Remaining
- [Issue] — [Why it wasn't fixed]

Step 5: Review Changes

Show the user the diff of all changes:

git diff --stat

Ask if they want to proceed with committing or if adjustments are needed.

Common Fix Patterns

Missing Import

Add the import at the top of the file, grouped with similar imports.

Missing useEffect Cleanup

Add a return function that removes event listeners, cancels animation frames, clears timeouts, and removes map layers/sources/markers.

Untracked setTimeout/setInterval

Store the timer ID in a ref and clear it in the cleanup function.

Untracked requestAnimationFrame

Store the RAF ID and cancel it with cancelAnimationFrame in the cleanup function.

Replacing any with Proper Types

Identify what the value actually is and create a named type for it. Use unknown only as a last resort.

DRY Violations

Extract the duplicated code into a shared utility file. Update all files that used the duplicated code to import from the shared location.

Convention Violations

Reference .claude/rules/ for the correct pattern and apply it consistently.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/fix-code-issues-systematically-mmh8qqvo' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/fix-code-issues-systematically-mmh8qqvo/download' --output '.skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md.part' && mv '.skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md.part' '.skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Edit, Write, Bash(git diff*), Bash(npx tsc *)

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md' && test -s '.skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/fix' && cp -R '.skill-downloads/fix-code-issues-systematically-mmh8qqvo' '.claude/skills/fix'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/fix-code-issues-systematically-mmh8qqvo'

openskills read 'fix-code-issues-systematically-mmh8qqvo'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/fix-code-issues-systematically-mmh8qqvo/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills