borghei/Claude-Skills / engineering/bug-diagnosis
bug-diagnosis
VerifiedFind the root cause of hard bugs with a fast pass/fail repro, ranked falsifiable hypotheses and bisection. Use when a bug resists quick fixes, a failure is intermittent, or a regression needs tracing to its cause.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.3 KB |
| assets/diagnosis-log-template.md | markdown | 1.9 KB |
| assets/repro-script-template.sh | script | 1.4 KB |
| assets/sample_debug_log.txt | markdown | 1.0 KB |
| assets/sample_diagnosis_log.json | config | 1.6 KB |
| assets/sample_diagnosis_log_passing.json | config | 1.8 KB |
| references/bisection-instrumentation-redaction.md | markdown | 8.7 KB |
| references/reproduction-signals.md | markdown | 7.8 KB |
| scripts/hypothesis_log.pyexecutable | script | 10.2 KB |
| scripts/redact_scan.pyexecutable | script | 8.3 KB |
assets/repro-script-template.sh
View on GitHub#!/usr/bin/env bash
# Reproduction signal template. Exit 0 = bug absent (good), 1 = bug present (bad),
# 125 = this state cannot be tested (git bisect skips it).
# Usable directly with: git bisect run ./repro.sh
#
# Fill in the three marked sections. Read every credential from the environment;
# never write one into this file or its output.
set -u
TAG="[repro]"
WORKDIR="$(mktemp -d)"
trap 'rm -rf "$WORKDIR"' EXIT
# --- 1. Build / prepare (exit 125 if the state cannot be built) ----------------
# Example: python -m pip install -q -e . >/dev/null 2>&1 || exit 125
:
# --- 2. Pin sources of variation ---------------------------------------------
export TZ=UTC
export LANG=C.UTF-8
export PYTHONHASHSEED=0
# export APP_CLOCK_FROZEN_AT="2026-01-01T00:00:00Z"
# export APP_RANDOM_SEED=1234
# --- 3. Trigger and assert the reported symptom ------------------------------
# Replace with the narrowest command that reaches the bug. Capture output to a file
# and assert on the specific symptom, not merely on the exit status.
OUTPUT_FILE="$WORKDIR/out.txt"
if ! echo "replace me with the trigger command" >"$OUTPUT_FILE" 2>&1; then
echo "$TAG trigger command failed to run" >&2
exit 125
fi
# Example assertion: the computed total must equal the reference total.
if grep -q "total mismatch" "$OUTPUT_FILE"; then
echo "$TAG BAD: symptom present"
exit 1
fi
echo "$TAG GOOD: symptom absent"
exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |