Skip to content
generate-fix-suggestions logo

Generate Fix Suggestions from Errors

generate-fix-suggestions

Generate fix suggestions based on error patterns and best practices. Use when analyzing failures to get actionable remediation steps.

SKILL.md

Full skill instructions

Generate Fix Suggestions from Errors

Analyze error patterns to suggest specific fixes and improvements.

When to Use

  • Test failures need concrete solutions
  • Build errors require remediation steps
  • Code review finding actionable recommendations
  • Automating fix suggestions for common errors
  • Creating PR comments with suggestions

Quick Reference

# Categorize errors
grep "Error\|FAILED" output.log | sed 's/​.*Error: //' | sort | uniq -c | sort -rn

# Get context around error
grep -B 3 -A 3 "AssertionError" output.log

# Extract error type
grep -o "Error[A-Za-z]*" output.log | sort | uniq -c

# Find patterns in multiple failures
for file in test_*.log; do
  echo "=== $file ==="
  grep "Error:" "$file" | head -3
done

Fix Generation Workflow

  1. Analyze error: Categorize error type and context
  2. Match pattern: Compare against known error patterns
  3. Find root cause: Determine what caused the error
  4. Generate suggestion: Recommend specific fix
  5. Provide example: Show before/​after code if applicable
  6. Prioritize fixes: High impact fixes first
  7. Report suggestions: Organized by priority

Common Error Patterns & Fixes

Assertion Errors:

  • Pattern: assert_equal(actual, expected) fails
  • Fix: Check expected value is correct, verify test logic
  • Example: Update expected value or fix test setup

Type Mismatches:

  • Pattern: TypeError, AttributeError in function call
  • Fix: Check argument types, verify method exists
  • Example: Add type annotation or check imports

Out of Bounds:

  • Pattern: IndexError or array access failure
  • Fix: Verify array size, check loop bounds
  • Example: Initialize array properly before access

Import/​Module Errors:

  • Pattern: ModuleNotFoundError, ImportError
  • Fix: Check module path, verify file exists
  • Example: Add to __init__.mojo or fix path

Memory/​Initialization:

  • Pattern: Uninitialized variable, null pointer
  • Fix: Ensure variable initialized before use
  • Example: Add explicit initialization or use var

Output Format

Report suggestions with:

  1. Error Summary - What went wrong
  2. Root Cause - Why it happened
  3. Fix Steps - Numbered remediation steps
  4. Code Example - Before/​after code snippet
  5. Priority - Critical/​High/​Medium/​Low
  6. Testing - How to verify fix works

Priority Levels

Critical (fix immediately):

  • Compilation errors
  • All tests failing
  • Core functionality broken
  • Security issues

High (fix soon):

  • Multiple tests failing
  • Performance degradation
  • Memory leaks
  • Type safety issues

Medium (nice to have):

  • Single test failing
  • Code style issues
  • Minor improvements
  • Warnings

Low (backlog):

  • Code polish
  • Optional refactoring
  • Documentation improvements

Error Handling

ProblemSolution
Unknown error typeClassify as "other", suggest general investigation
Insufficient contextRequest more detailed error info
Multiple causesSuggest fixes in priority order
No matching patternFlag for manual review
False positivesVerify suggestion with test run

References

  • See extract-test-failures for error extraction
  • See analyze-ci-failure-logs for CI-specific analysis
  • See CLAUDE.md for code standards and error handling

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View