fix-from-logs

Diagnose bugs from error logs and propose pytest regression tests.

7|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Agent-Engineer-Master/skill-engineer --skill fix-from-logs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-from-logs
Source: https://github.com/Agent-Engineer-Master/skill-engineer/tree/main/engineering/fix-from-logs
Command: npx skills add https://github.com/Agent-Engineer-Master/skill-engineer --skill fix-from-logs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnoses bugs from raw error logs, stack traces, or CI failure output — triages and clusters errors, localizes root cause (file → function → line), enters plan mode with a structured fix + test proposal for human approval, writes a typed pytest regression test using mocks first, then implements a targeted code fix and verifies the test turns green. Trigger when: user pastes logs and wants the underlying bug fixed with tests that prevent recurrence; user says "here are the logs, fix it"; CI output shows failures needing code changes and test coverage; stack traces are provided with a request to fix and test. Do NOT trigger for: general code review without logs, refactoring without a specific bug, performance work, test coverage requests with no associated failure.

Core Features & Use Cases

  • Clusters related errors into actionable root-cause blocks.
  • Localizes root cause to specific file, function, and line location.
  • Produces a plan with a minimal, test-first fix and a regression test.

Quick Start

Provide a paste of failing logs to trigger the workflow and obtain a plan-ready fix with tests.

Frequently Asked Questions about fix-from-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix bugs from CI failure logs and add regression tests?

To fix bugs from CI failure logs, paste the raw error output to trigger a triage workflow that clusters related errors, localizes the root cause to file and line, and proposes a targeted fix with a typed pytest regression test.

What is the best way to diagnose a stack trace and plan a code fix?

Diagnosing a stack trace involves clustering related errors and pinpointing the root cause location, then entering plan mode to propose a minimal code fix and a failing pytest test before any changes are applied.

Can I use pytest mocks when writing regression tests for error logs?

Yes, the workflow enforces a test-first discipline by writing a typed pytest regression test with mocks before implementing the code fix, ensuring the test fails initially and turns green after the patch.

Does this approach work for general code review or only for specific bug triage?

This approach works specifically for bug triage from logs, stack traces, or CI failures, and does not trigger for general code review, refactoring, performance work, or test coverage requests without an associated failure.

How do I localize a root cause from raw error logs to a specific function?

Localizing a root cause from raw error logs involves analyzing the stack trace to pinpoint the exact file, function, and line number, then clustering related errors into actionable blocks for a targeted fix.

Why do I need plan mode before applying a patch from a CI failure output?

Plan mode is required before applying a patch from CI failure output to ensure the proposed fix and regression test are human-approved, minimizing risk by reviewing the root cause analysis and test strategy first.