bug-fix

bug-fix is a skill for Claude Code from techygarg/lattice. It costs 77 tokens per session (2,618 once invoked), scanned A, original, MIT.

A reproduce-first workflow for investigating and fixing software bugs, with checks to prevent the same problem returning.

In plain words
What is it for?
Use it to debug failures, patch regressions, add regression tests, and decide where a fix belongs in the codebase.
Why use it?
It gives the repair a clear path from reproducing the failure to diagnosing its cause and verifying the fix, while limiting unrelated code changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the lattice plugin — 33 skills, 1 agent shipped together

Good fit Use it to debug failures, patch regressions, add regression tests, and decide where a fix belongs in the codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/techygarg/lattice/bug-fix
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.

Any agent
npx skills add techygarg/lattice --skill bug-fix
Clone the repo
git clone --depth 1 https://github.com/techygarg/lattice

Made for: Claude Code.

Or install lattice, the plugin that ships this one along with the rest of its 33 skills, 1 agent.

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 bug-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/techygarg/lattice/bug-fix/github.svg)](https://agentmods.dev/skills/techygarg/lattice/bug-fix)
Your own site
<a href="https://agentmods.dev/skills/techygarg/lattice/bug-fix"><img src="https://agentmods.dev/badge/skills/techygarg/lattice/bug-fix/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bug-fix

Your own site · 80×15
<a href="https://agentmods.dev/skills/techygarg/lattice/bug-fix"><img src="https://agentmods.dev/badge/skills/techygarg/lattice/bug-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00077 $0.02618
Opus 5.5 $0.00031 $0.01047
Sonnet 5.5 $0.00015 $0.00524
Haiku 4.5 $0.00008 $0.00262

Measured 15d ago against content hash af0741220ab7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bug-fix scanned grade A with 0 findings 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 15d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bug-fix/SKILL.md · 197 lines

How it starts

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

Bug Fix

Required Skills

Load these skills based on bug scope:

  1. framework:knowledge-priming -- Load project context so the diagnosis grounds in the real codebase. (always)
  2. framework:context-anchoring -- Find and load the feature's context doc; capture diagnosis and repair decisions in it. (always)
  3. framework:learning-harvest -- Load prior operational learnings at session start; harvest new ones at session end. (always)
  4. framework:collaborative-judgment -- Surface hypotheses and repair trade-offs as structured options instead of silently assuming. (always)
  5. framework:clean-code -- Keep the fix focused, readable, and free of drive-by changes. (always)
  6. framework:test-quality -- Regression tests, characterization baseline, assertion quality. (always)
  7. framework:architecture -- Layer placement and dependency direction. (conditional: layer placement is in question — Steps 2/4/5)
  8. framework:domain-driven-design -- Domain invariants and aggregate behavior. (conditional: domain invariants involved — Steps 2/5)
  9. framework:secure-coding -- Trust bounds and sensitive data handling. (conditional: trust boundary crossed — Steps 2/5)

Additional Instructions

STOP: Before Step 1, read additional_instructions.bug_fix (one line or a list) from .lattice/config.yaml. No file or no key → skip silently.

When lines are found:

  1. Show them verbatim under "Additional instructions (from config):".
  2. Highest priority — apply them for the whole session, including on resume. On any conflict with anything else in this skill — steps, gates, STOP rules — or with its Required Skills, standards documents, or operational learnings, the config line wins.

Workflow

Step 1: Establish Bug Context

Start from the failure, not from a proposed fix.

  • Gather the observed behavior, the expected behavior, the reproduction path, and any evidence: failing test, error message, stack trace, log excerpt, request payload, recent change.
  • Run framework:learning-harvest Load behavior. Focus hint: "bug investigation — focus: reliability, quality signals".
  • Run framework:context-anchoring Document Discovery to check for an existing context doc covering the affected feature/module:
    • Found → Load behavior. Honor every logged decision and constraint as an active commitment while diagnosing. An open investigation of this same bug is already logged in it → confirm with the user whether to resume that investigation or start fresh.
    • Not found → Proceed from the bug report and the current code. Do not block diagnosis on a missing context doc.

Read the full file on GitHub · 197 lines

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. 15d ago Changed · +9 lines af0741220ab7
  2. 1mo ago First seen · 188 lines · 77 tokens per session scan A f489e9320795

Subscribe to this mod's changes

bug-fix is a skill published in the GitHub repository techygarg/lattice (209 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 2,618 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

session-profiler

Profile and debug Hermes sessions from their JSONL transcripts. Find a session and its subagents, build a queryable event table, summarize the work as a hierarchical table of contents, break down wall time, inference, tools, tokens, and estimated cost per agent, identify errors and improvement opportunities, and…

tamdogood/builder-essential-skills · 117 tokens

operating-cadence

Designs the rhythm an organization runs on — which reviews happen weekly, monthly and quarterly, what each one decides, who owns the numbers presented, and how a signal at the front line reaches the people who can act on it. Use this to set up a management operating system, fix a meeting calendar that produces no…

cbrock84/headcount · 95 tokens

audit

Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.

oliver-kriska/claude-elixir-phoenix · 35 tokens

investigate

Find the root cause of Elixir/Phoenix bugs — crashes, exceptions, stack traces, compile errors, LiveView that won't update, silent failures. Use when something is broken or misbehaves. --parallel for 4 tracks.

oliver-kriska/claude-elixir-phoenix · 51 tokens

narrow-bare-rescue

Narrow bare rescue in Elixir so real errors like KeyError and typos propagate instead of being swallowed. Use to audit rescues and refactor error handling.

oliver-kriska/claude-elixir-phoenix · 40 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens