Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Debugs crashes, regressions, flakes, and production bugs systematically. Use when diagnosing stack traces, logs, or profiling data; not perf tuning or incident command.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Missing telemetry goes to ../qa-observability/SKILL.md. For agentic failures, inspect input,
prompt/version, retrieval, tool calls, output, and guardrails to find the first divergent state;
coding-agent failure modes: debugging-guide.md.
| Need | Go to |
|---|---|
| Sequence, triage branch, is the cause confirmed? | ## Default Workflow, ## Triage Tracks, ## Evidence Bar |
| Stop guessing, capture instead of re-running, design-fix escalation, traps | ## Expert Judgment |
| Known errors, browser/E2E, production safety | ## Search the Validated Corpus First, ## Browser / E2E Triage Loop, ## Production and Incident Safety |
| References, templates, scripts | ## Navigation, ## Scripts |
Default output: confirmed facts; ranked hypotheses, each with evidence and a disconfirming test; next experiments with expected outcomes; fix options with a verification plan and regression-test target; for production impact, mitigation, rollback, and prevention.
references/debugging-methodologies.md).
Classify the failure as data-, time-, or environment-dependent.assets/debugging/template-root-cause-to-guardrail.md).| Symptom | First action | Common pitfall |
|---|---|---|
| Crash or exception | First stack frame in your code; capture request/trace ID | Fixing the last error instead of the first cause |
| Wrong output | Known-good vs bad diff; find the first divergent state | Debugging backward from the UI without narrowing inputs |
| Intermittent or flaky | Measure the rate, classify the flake type, capture one failure; suite-wide flake SLO, quarantine, and flake dashboards belong to ../qa-testing-strategy/SKILL.md | Adding sleeps without proving a race |
| Slow or timeout | Find the bottleneck (CPU, memory, lock, DB, network) with a profile or trace before changing code | "Optimizing" without a baseline |
| Production-only | Diff effective config, data volume, flags; use read-only observability | Interactive debugging in production without a plan |
| Distributed | Follow one request end to end; find the originating span (references/distributed-debugging.md) | Blaming the service that returned the 500 |
| Memory growth | Rule out warm-up, fragmentation, and off-heap first (references/memory-leak-detection.md) | Heap snapshot on a container near its limit |
| Browser/E2E | Loop below; for performance, the browser's performance-panel insights (panel names change, check current DevTools docs) | Waiting on every request in browser logs |
| Agent/LLM/tool | Capture prompt/version, model/provider, tool-call trace, retrieval inputs, guardrail decisions | Treating the final bad answer as the root cause |
| Bad URL, domain, ID, or third-party payload | Validate at the earliest trust boundary (references/external-input-normalization-boundary.md) | Chasing the downstream DNS/HTTP error an unvalidated value caused |
Before naming a root cause, record the observation, the candidate mechanism, the predicted result, and a disconfirming check. A cause is confirmed only through one of:
Name the evidence path and the residual uncertainty. Otherwise label the cause probable.
A clean build, a passing re-run, or a symptom that went away after a restart proves current
state only. In agent-driven RCA, a finding that does not trace to an artifact location (replay
event, log line plus ID, stack frame, record) is a hypothesis and must be labelled as one.
assets/debugging/template-debugging-checklist.md).The instrumentation must answer the disconfirming question for the next hypothesis. "Log more" without a target question burns a second session.
Timing-dependent bugs resample the scheduler on every run; repeating until lucky yields nothing. Capture one failing execution and analyze it offline:
rr record, then replay deterministically, including reverse watchpoints to
the exact corrupting write. Without hardware performance counters (most cloud VMs, Linux VMs
on Apple Silicon), use the experimental, unmerged rr.soft fork: rr record -W, and replay
also needs -W. rr record --chaos randomizes scheduling to surface rare interleavings.TSAN_OPTIONS=enable_adaptive_delay=1) or forced-interleaving tests instead
(references/race-condition-diagnosis.md). Never record in production.py-spy dump --pid;
Python 3.14+ python -m pdb -p (PEP 768); pre-arranged
faulthandler.register(signal.SIGUSR1, all_threads=True). faulthandler.enable() alone does
not handle SIGUSR1, so kill -USR1 kills the process. JVM: jcmd Thread.print and continuous
JFR. Go 1.25+: runtime/trace.FlightRecorder for the seconds before the event. Details:
references/systems-debugging-tools.md.A restart, rollback, or eviction resets pools, caches, heap, and thread state, destroying the
evidence of a stateful bug. When impact allows, spend a bounded minute first: all-thread stacks,
heap snapshot, core (gcore keeps the process alive), previous container's logs, bad records; or
pull one replica out of rotation as a live specimen. If capture would materially extend user
harm, skip it and say so in the incident record (references/production-debugging-patterns.md).
| Signal | Investigate in |
|---|---|
| Reproduces on a fixed input regardless of scale or environment | Local: fastest loop |
| Depends on production data volume, concurrency, or real data | Staging with production-shaped data, or read-only production telemetry |
| Depends on production-only config, secrets, or infrastructure | Production, read-only, with scoped, sampled, TTL'd extra instrumentation |
Interactive production debugging (debugger, REPL, live edits) needs approval and a rollback plan.
Escalate from a point fix to a design fix when:
Deliver a short design note with the patch, plus a guardrail for the whole class.
references/causal-inference-applied.md A2, A3).probable (A4).Proportionality: most incidents close on mechanism evidence. Use formal causal methods (DiD
with a control cohort, synthetic control without one, mediation when config sits between change
and symptom, sensitivity analysis) only when there is no mechanism evidence and attribution
matters: a disputed cause, a repeat incident, or a costly rollback. See references/causal-inference-applied.md.
For a public, recognizable error, stack trace, or framework footgun, search the Stack Overflow
corpus (redacted signature) before deep isolation. Rank hits by acceptance, score, and version;
a hit is a hypothesis, so reproduce before changing code. Skip it for private-domain logic, live
races, and incidents needing mitigation (references/stackoverflow-for-agents.md).
auth-state, state-sync, optional-network, degraded-mode, environment, or
product logic.No sleeps or global timeout increases before proving the readiness signal wrong; assert the user-visible oracle instead of waiting on incidental requests. An unexpected redirect to login is usually auth-state, not an assertion failure.
../ops-incident-response/SKILL.md.| Need | Location |
|---|---|
| Method selection, bisect traps, config diffs, OODA, agent-driven RCA, timezone bugs | references/debugging-methodologies.md |
| Production order of operations, evidence a restart destroys, safe instrumentation, replicas | references/production-debugging-patterns.md |
| Race detectors and blind spots, forced interleaving, deadlocks, DB, async, and UI-state races | references/race-condition-diagnosis.md |
| Leak vs growth, which memory number to watch, retainer analysis, OOM in containers | references/memory-leak-detection.md |
| Originating span, broken propagation, clock skew, retries, queues | references/distributed-debugging.md |
| Low-level tool selection and traps, rr and rr.soft, live attach, core dumps | references/systems-debugging-tools.md |
| Causal RCA: anti-patterns A1-A5, method selection, flaky-test attribution | references/causal-inference-applied.md |
| Searching the Stack Overflow corpus before debugging | references/stackoverflow-for-agents.md |
| What to log while debugging, redaction | references/logging-best-practices.md |
| Input boundary normalization | references/external-input-normalization-boundary.md |
| Agent-harness hygiene: failure taxonomy, nonzero exits, fix-loop stop rules, report minimum | references/agent-harness-hygiene.md |
| Full checklist with time-box checkpoints and evidence bar | assets/debugging/template-debugging-checklist.md |
| One-page triage worksheet | assets/debugging/template-debugging-worksheet.md |
| Root cause to guardrail | assets/debugging/template-root-cause-to-guardrail.md |
| Curated external sources | data/sources.json |
Stdlib-only Python. Both fail closed: unusable input is an error, never an empty result.
| Script | Purpose | Usage and exit codes |
|---|---|---|
scripts/log_error_summary.py | Group error/exception/panic/warning lines by normalized signature; print top-N groups with samples and the scanned-line count | python3 scripts/log_error_summary.py path/to/log [--top 10] (or stdin). 0 = scanned; 2 = missing, unreadable, empty, binary, or directory input |
scripts/config_diff.py | Diff two .env / JSON / YAML files by flattened key path; secret-looking values redacted | python3 scripts/config_diff.py file_a file_b [--show-secrets]. 0 = same, 1 = differ, 2 = unreadable or unparseable file |
Config paths escape literal dots, brackets, and backslashes; \e denotes an empty key. Scalar
types remain distinct. Logs reject NULs anywhere and undecodable UTF-8; convert other encodings
explicitly before summarizing. Offline regressions: python3 scripts/test_debugging_helpers.py.
| Skill | Purpose |
|---|---|
| qa-observability | Telemetry setup, tracing, sampling, logging infrastructure |
| ops-incident-response | Incident command, communications, roles, postmortems |
| software-performance | Performance diagnosis, profiling, benchmarking |
| foundations-causal-inference | DiD, confounding, and causal attribution theory |
| qa-testing-strategy | Test design and quality gates |
| qa-resilience | Failure handling and rollback-safety review |
| data-sql-optimization | DB performance and query tuning |
| software-ios-runtime-debugging | iOS build, launch, runtime triage |
| software-android-runtime-debugging | Android build, launch, runtime triage |
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。