fix-from-logs

fix-from-logs is a skill for Claude Code, Codex from Agent-Engineer-Master/skill-engineer. It costs 157 tokens per session (1,418 once invoked), scanned C, original, MIT.

A bug-investigation workflow that turns error logs, stack traces, or continuous-integration failures into a focused code fix and a typed pytest regression test.

In plain words
What is it for?
Use it to group failures, locate the responsible file and function, propose a fix, add a mock-based test, and confirm the test suite passes.
Why use it?
It separates related errors, traces each main problem to its likely source, and limits the change to the confirmed cause.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agent-engineer-master/skill-engineer/fix-from-logs
Any agent
npx skills add Agent-Engineer-Master/skill-engineer --skill fix-from-logs
Clone the repo
git clone --depth 1 https://github.com/Agent-Engineer-Master/skill-engineer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-from-logs

README.md
[![agentmods](https://agentmods.dev/badge/skills/agent-engineer-master/skill-engineer/fix-from-logs.svg)](https://agentmods.dev/skills/agent-engineer-master/skill-engineer/fix-from-logs)
Your own site
<a href="https://agentmods.dev/skills/agent-engineer-master/skill-engineer/fix-from-logs"><img src="https://agentmods.dev/badge/skills/agent-engineer-master/skill-engineer/fix-from-logs.svg" alt="Measured on agentmods" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,418 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00157 $0.01418
Opus 5 $0.00078 $0.00709
Sonnet 5 $0.00031 $0.00284
Haiku 4.5 $0.00016 $0.00142

Measured 3d ago against content hash 9c634e776070, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

fix-from-logs scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- Built with Agent Engineer Master — get your own production-ready skill: www.agentengineermaster.com/skill-engineer -->
engineering/fix-from-logs/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Output Contract

Produces per bug cluster: (1) one targeted code edit at the confirmed root cause location, (2) one named typed pytest function with mocks, (3) one-line root cause statement in the test comment.

Does NOT produce: architecture refactors, style fixes, unrelated test coverage, multiple competing fixes.

Hands off to: CI / pytest — the final action is confirming the full suite is green.


Process

Phase 1 — Ingest & Triage

  1. Accept log input from paste, file path, or stdin reference.
  2. Filter to FATAL/ERROR severity first; set INFO/DEBUG aside unless they precede the first error.
  3. Cluster related errors: cascading failures share one root cause — group by error type, file, and timestamp proximity before analysing individual lines.
  4. For each cluster, extract: error type, file path, line number, function name, request/correlation IDs, timestamp window.
  5. Output a structured error inventory (1–3 clusters max; surface the highest-severity first).

Read references/rca-framework.md — Section 1 (triage sequence) and Section 2 (failure mode glossary).


Phase 2 — Localize (file → function → line)

  1. Read the flagged file(s) in the codebase using the paths extracted in Phase 1.
  2. Trace the call chain backward from the error site — the logged error is almost always a symptom, not the cause.
  3. Apply 5 Whys: for each "why did this fail?" step, read the upstream caller or dependency until reaching an actionable root cause (something changeable in this codebase, not a framework or stdlib).
  4. Read 20–30 lines of surrounding context in the affected file to understand: naming conventions, type usage, existing mock patterns, and error handling style. The fix must be native to this style.
  5. Form 2–3 ranked hypotheses per cluster. Each hypothesis must have: root cause statement, location (file:line), confidence level (high/medium/low), and supporting evidence from the log + code.

Read references/rca-framework.md — Section 3 (5 Whys walkthrough).

Read the full file on GitHub · 111 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 111 lines · 0 tokens per session scan C 9c634e776070

Subscribe to this mod's changes

fix-from-logs is a skill published in the GitHub repository Agent-Engineer-Master/skill-engineer (8 stars, last pushed 1mo ago), licensed MIT. It adds 157 tokens to every session and 1,418 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.