diagnose

A step-by-step debugging guide for finding the underlying cause of a bug, failed test, or unexpected result before suggesting a fix.

In plain words
What is it for?
Reading errors and stack traces, reproducing failures, checking recent changes, tracing data between components, and identifying where bad values originate.
Why use it?
It reduces the risk of hiding a symptom while leaving the real problem in place.

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/devnomad-byte/techneering/diagnose
Any agent
npx skills add devnomad-byte/techneering --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/devnomad-byte/techneering

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00019 $0.00900
Opus 5 $0.00010 $0.00450
Sonnet 5 $0.00004 $0.00180
Haiku 4.5 $0.00002 $0.00090

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

Security

Grade A, and why

diagnose 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/diagnose/SKILL.md · 119 lines

How it starts

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

Systematic Debugging

Core Principle

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

If you haven't completed Phase 1, you cannot propose fixes.

The Four Phases

You MUST complete each phase before proceeding to the next.

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

  1. Read Error Messages Carefully

    • Don't skip past errors or warnings
    • Read stack traces completely
    • Note line numbers, file paths, error codes
  2. Reproduce Consistently

    • Can you trigger it reliably?
    • What are the exact steps?
  3. Check Recent Changes

    • Git diff, recent commits
    • New dependencies, config changes
  4. Gather Evidence in Multi-Component Systems

    • For each component boundary: log data in/out
    • Run once to gather evidence showing WHERE it breaks
  5. Trace Data Flow

    • Where does bad value originate?
    • Keep tracing up until you find the source
    • Fix at source, not at symptom

Phase 2: Pattern Analysis

  1. Find working examples in same codebase
  2. Compare against references (read COMPLETELY)
  3. List every difference between working and broken
  4. Understand dependencies and assumptions

Phase 3: Hypothesis and Testing

  1. Form Single Hypothesis — "I think X is the root cause because Y"
  2. Test Minimally — Smallest possible change, one variable
  3. Verify Before Continuing — Did it work?
  4. When You Don't Know — Say "I don't understand X"

Phase 4: Implementation

  1. Create failing test case (use tn:redgreen)
  2. Implement single fix
  3. Verify fix
  4. If 3+ fixes failed: Stop. Question the architecture. Discuss with user.

Red Flags - STOP and Follow Process

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • Proposing solutions before tracing data flow
  • "One more fix attempt" (when already tried 2+)
  • Each fix reveals new problem in different place

Read the full file on GitHub · 119 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. 2d ago First seen · 119 lines · 19 tokens per session scan A 79fdf07c1851

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository devnomad-byte/techneering (13 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 900 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

agenttrace-session-audit

Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.

Ghosteken/agent-harness · 34 tokens

workflows

Execute a workflow script that orchestrates multiple subagents deterministically. Use when the user explicitly requests a workflow, multi-agent orchestration, parallel or sequential agent pipelines, structured agent outputs, or a durable background workflow run.

get-bb/bb · 47 tokens

rulesync

Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.

dyoshikawa/rulesync · 64 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

agent-workspace-linux

Use when a task needs an isolated hidden Linux desktop or workspace-owned browser: GUI app QA, web/browser/shopping automation, sandboxed app observation, or stale workspace cleanup. Routes agent-workspace-linux MCP tools on demand. Does NOT apply to host desktop/Chrome control, generic MCP setup, or pure code/file…

ilysenko/codex-desktop-linux · 70 tokens

loongsuite-pilot-insight

基于 LoongSuite Pilot / AI Coding Agent 日志生成事件洞察、组织洞察、数据质量、研发效能和 AI Native 使用类 SLS 报表时使用;包含 AI Coding 事件表语义,以及团队报表可选的部门维表、deptuser 组织关系、指标口径和公共 CTE,通常与 sls-dashboard-builder 一起使用。.

alibaba/loongsuite-pilot · 91 tokens