defect-diagnosis

defect-diagnosis is a skill for Claude Code, Codex from ccoalm/ccl-skills. It costs 71 tokens per session (7,384 once invoked), scanned A, original, Apache-2.0.

A disciplined process for investigating software defects, fixing the immediate failure, and deciding whether the underlying process or instructions need improvement. A defect is a bug, regression, failing test, or other incorrect behavior.

In plain words
What is it for?
Use it to reproduce and isolate bugs, inspect failure evidence, instrument code, implement and verify fixes, and identify missing tests or safeguards.
Why use it?
It requires evidence before naming a cause and discourages weakening tests or applying unaccepted workarounds.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Claude Code.

Part of the ccl-skills plugin — 33 skills, 4 commands, 7 hooks shipped together

Good fit Use it to reproduce and isolate bugs, inspect failure evidence, instrument code, implement and verify fixes, and identify missing tests or safeguards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ccoalm/ccl-skills/defect-diagnosis
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 ccoalm/ccl-skills --skill defect-diagnosis
Clone the repo
git clone --depth 1 https://github.com/ccoalm/ccl-skills

Made for: Claude Code, Codex.

Or install ccl-skills, the plugin that ships this one along with the rest of its 33 skills, 4 commands, 7 hooks.

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 defect-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccoalm/ccl-skills/defect-diagnosis/github.svg)](https://agentmods.dev/skills/ccoalm/ccl-skills/defect-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/ccoalm/ccl-skills/defect-diagnosis"><img src="https://agentmods.dev/badge/skills/ccoalm/ccl-skills/defect-diagnosis/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 defect-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccoalm/ccl-skills/defect-diagnosis"><img src="https://agentmods.dev/badge/skills/ccoalm/ccl-skills/defect-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,384 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.
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.00071 $0.07384
Opus 5 $0.00036 $0.03692
Sonnet 5 $0.00014 $0.01477
Haiku 4.5 $0.00007 $0.00738

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

Security

Grade A, and why

defect-diagnosis 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 2d 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/defect-diagnosis/SKILL.md · 167 lines

How it starts

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

Defect Diagnosis

Diagnose and fix from evidence; route prevention to product, architecture, development, testing, release or tooling.

  • Code/test changes require self-checks; invoke code-review automatically before completion.

Non-Negotiable Rules

  • Required failures, including inherited debt: diagnose, safely repair and rerun that check before handoff. Read repair-before-handoff. Working alternatives never close defects.
  • Do not delete, comment out, or weaken a failing test just to make the suite pass.
  • Do not call a workaround the fix unless the owner explicitly accepts the tradeoff and residual risk is recorded.
  • Do not start broad refactoring while the cause is unknown. Isolate and fix first; refactor after the behavior is understood.
  • Do not stop at "this line was wrong" when the defect reveals a missing contract, guardrail, test, review check, or skill rule.
  • Do not state or act on a root-cause verdict — even as a confident aside — before you have read the failing owner's own evidence with your own eyes (assertion diff for a test, stack/exception for a crash, trace/log slice for a production symptom, source only when it is itself the failing artifact). Until then, label every cause as a hypothesis and name the evidence that would confirm or reject it. This applies to your OWN analysis, not only to LLM-proposed causes. Mitigation is exempt: you may roll back, flag-off, or shed traffic from symptoms while cause stays marked unknown — what is forbidden is choosing or applying a fix as though a cause is proven.

Phase A: Diagnose

  1. Reproduce.
    • Record exact steps, inputs, environment, command, config, and observed failure.
    • Prefer a failing test, trace, payload, or smallest runnable reproduction.
    • If intermittent, record frequency, timing, data shape, and resource conditions.
    • A production symptom that cannot be re-triggered in place is not blocked on reproduction: diagnose from the failing run's own telemetry (step 4). Race or deadlock evidence may stay suggestive, but the cause still owes a falsifying probe before any fix.
    • Before declaring a bug non-reproducible — or an environment / service / tool / dataset needed to reproduce it "unavailable" or "blocked" — run the normal remediation for that layer first. Start the service / emulator / container / dependency and wait for readiness, run the repo setup or fixture/seed script, restart the client daemon, provision or refresh the test data, or try a different reproduction strategy (smaller or adversarial input, a different transport/endpoint, added tracing, or an engineered-interleaving / race-detector harness for a concurrency bug). Only record can't-reproduce / unavailable / blocked after the bounded remediation for that layer fails, with the command evidence, the residual risk, and the next concrete unblock action. A confident "I can't reproduce it" or "the env is down" with no remediation attempt is not a closed defect — it is pending.
      • This is not an escape hatch to never close or escalate. Remediation attempts are bounded and subject to the same frame-change / escalation discipline as hypotheses below (Frame-change-or-escalate, Escalation does not close the defect): after repeated failed bounded attempts, stop inventing new "different" strategies, escalate with a handoff packet, and keep the defect open under an owner — do not sit on an endless pending.
      • Safety preflight for any mutating remediation (setup / fixture / seed / data-refresh / daemon-restart, or docker compose up-style stack start): first prove the target endpoint, credential, and namespace are synthetic and disposable — never a live/prod/shared DB, API, token, or environment — and disable or isolate any side-effecting consumers, webhooks, or scheduled jobs the start would wake (they can process real queued events or reconnect to shared staging). If you cannot confirm the target is safe/scratch, the remediation is itself blocked — do not run destructive setup/refresh to chase a repro.

Read the full file on GitHub · 167 lines

Files

What ships with it

3 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. 2d ago Changed · +2 lines 2e1be983cdc7
  2. 4d ago Changed · +9 tokens per session 73a01985225c
  3. 7d ago Changed · +11 lines edc593f50026
  4. 10d ago First seen · 154 lines · 62 tokens per session scan A 8d3f667c8539

Subscribe to this mod's changes

defect-diagnosis is a skill published in the GitHub repository ccoalm/ccl-skills (6 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 7,384 once invoked, about $0.0004 per session on Opus 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-31.

Related

Other skills, from other repositories

manage-skills

A maintenance workflow for checking whether project verification skills still cover the code and rules that changed during a session.

sangrokjung/claude-forge · 54 tokens

systematic-debugging

Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.

sangrokjung/claude-forge · 53 tokens

review-loop

Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…

sangrokjung/claude-forge · 100 tokens

memstack-development-performance-audit

Use this skill when the user says 'performance audit', 'why is it slow', 'optimize performance', 'page speed', 'Core Web Vitals', 'lighthouse', 'load time', or needs to diagnose and fix frontend or backend performance issues. Do NOT use for code reviews or security audits.

cwinvestments/memstack · 69 tokens

semgrep-rule-creator

Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

waybarrios/opencode-power-pack · 37 tokens

variant-analysis

Find similar vulnerabilities and bugs across codebases using pattern-based analysis. Use when hunting bug variants, building CodeQL/Semgrep queries, analyzing security vulnerabilities, or performing systematic code audits after finding an initial issue.

waybarrios/opencode-power-pack · 45 tokens