/autorun-skills:test-fixes-in-parallelfrom autorun-skills
Tests 8-10 fundamentally different fixes for one stubborn bug side by side using parallel subagents. Builds a minimal harness, runs every approach, and identifies which fix works and why.
Ships in autorun-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Eliminate ambiguous configuration bugs in hours, not days. Test 8-10 fundamentally different solution approaches simultaneously to discover what works and understand why. Transforms trial-and-error into systematic exploration.
6-Step Process: Read buggy code → Research 8-10 orthogonal approaches (document sources) → Build minimal harness → Implement all solutions → Test and identify winners → Apply fix with analysis + citations
Best for: Configuration/integration bugs in complex subsystems where root cause is ambiguous.
Time: 1-2 hours to build harness, saves hours/days of serial debugging.
Success factors: Platform compatibility, realistic test data with edge cases, comprehensive logging, matching production context, academic-quality documentation with cited sources.
Research requirement: Document all sources with URLs (GitHub issues, Stack Overflow, API docs, papers). Cite in code comments and README.
Related methodologies:
This methodology is optimized for configuration/integration debugging where the challenge is finding the right way to wire components together.
Good fit:
Poor fit:
Problem: Table with 14 columns not showing horizontal scrollbar for long text (truncated with "...").
10 Approaches: BASELINE, SET_MAX_WIDTH, EXPAND_TO_INCLUDE_X, VSCROLL_FALSE, NO_CLIP, EXACT_COLUMNS, MIN_SCROLLED_WIDTH, SENSE_HOVER, NESTED_SCROLL, MANUAL_ALLOCATE
Result: Only Test 3 (expand_to_include_x) worked - forces UI to reserve space beyond viewport.
Gotcha: Applied fix → still broken! Logs showed data was empty (std::mem::take() moved it earlier). Fix: Calculate width BEFORE take() using available data. Production: 744 processes, 1609-char commands, 11,189px width (vs test: 50 processes, 150-char, 2000px).
Do:
Output: Clear understanding of broken state with documented references.
Research sources (document all with links/citations):
Citation standard: Document all sources with URLs and context. Academic integrity: credit ideas, link to original discussions, note if approach is from specific issue/paper.
Vary these dimensions:
⚠️ Anti-Pattern: Testing parameter values (100, 200, 300). Do instead: Test mechanisms (no buffering, fixed-size, dynamic, ring, double-buffer, memory-mapped, async, zero-copy, pooled, adaptive).
Output: List of 8-10 distinct approaches with hypotheses.
Requirements:
Platform decision:
| UI Approach | Pros | Cons |
|---|---|---|
| Tabbed | Single window, easy switch, cross-platform | One at a time |
| Split view | See 2-4 at once | Limited number |
| Separate windows | All visible | macOS event loop limit |
| Separate executables | Guaranteed isolation | More overhead |
Skeleton with edge cases (adapt to your language):
TEST_DATA = [
{"name": "Normal", "value": "x"}, # Happy path
{"name": "x" * 200, "value": "long"}, # Edge: very long
{"name": "", "value": ""}, # Edge: empty
{"name": None, "value": None}, # Edge: null
{"name": "日本語", "value": "🚀"}, # Edge: unicode
{"name": " spaces ", "value": "\n\t"}, # Edge: whitespace
]
tabs.add_tab("Test 1: Baseline", test_1(TEST_DATA))
tabs.add_tab("Test 2: Factory", test_2(TEST_DATA))
# ... tests 3-10
⚠️ Gotcha 1: Separate windows crash on macOS ("EventLoop can't be recreated"). Use tabs.
⚠️ Gotcha 2: Test data must match production scale. Profile production first (min/max/avg), use realistic sizes (not 10 items vs 700), include edge cases (empty, null, very long, unicode, whitespace).
Output: Harness where Test 1 (baseline) reproduces bug.
Pattern (examples in Python, adapt to your language):
def test_1_baseline():
"""BASELINE: Current broken approach"""
return Component(current_config).render(TEST_DATA)
def test_2_factory():
"""VARIATION: Factory vs constructor
Hypothesis: Constructor skips registration"""
return Factory.create(current_config).render(TEST_DATA)
Rules:
⚠️ Gotcha 3: Global state pollution. Reset before/after each test:
def run_test(test_func):
reset_globals()
result = test_func(TEST_DATA)
reset_globals()
return result
Output: Complete harness with all 10 solutions.
Classify:
Document:
Test 3: EXPAND_TO_INCLUDE - ✅ WORKS
1. Observation: Horizontal scrollbar appears
2. Details: Width 11,189px, scrolls smoothly
3. Trade-offs: Need to calculate width in advance
Test 2: SET_MAX_WIDTH - ❌ FAILS
1. Why: Overridden by ScrollArea internally
Output: Documented results identifying winner(s).
Analysis (ask these 5 questions):
Document pattern:
## Why Test 3 Works
What it does: [one sentence]
Why it works: [mechanism explanation]
Why others failed:
- Test 2: [reason]
- Test 7: [reason]
Trade-offs: [any limitations]
Apply to production:
Comment template:
# Use [APPROACH] to fix [PROBLEM].
# Why alternatives failed:
# - set_max_width(): overridden by ScrollArea internally (egui docs v0.33)
# - min_scrolled_width(): doesn't adapt to content (GitHub issue #1234)
# Research: stackoverflow.com/a/789, framework docs at [URL]
# See tests/scroll_test for parallel approach comparison.
If fix works in test but fails in production:
Add logging to both (Python shown, use console.log/System.out/etc for your language):
print(f"Data: {len(data)} rows")
print(f"First: {data[0] if data else 'EMPTY'}")
print(f"Result: {result}")
Compare side-by-side:
TEST: Data: 50 rows
PRODUCTION: Data: 0 rows ← FOUND PROBLEM (data moved/consumed)
⚠️ Gotcha 4: Data availability mismatch. Symptom: suspiciously small values (100px vs 2000px). Fix: Calculate BEFORE any take()/move().
Debugging checklist:
⚠️ Anti-Pattern: Stopping at "it works". Do instead: Document WHY it works and WHY others failed.
Output: Working fix in production with clear analysis.
Efficiency: Evaluates all approaches in single run (minutes vs hours/days). Fast iteration. Clear visual comparison eliminates guesswork.
Thoroughness: Systematic exploration discovers non-obvious solutions. Documents what doesn't work (valuable negative results).
Knowledge: Framework internals become clearer. Mental model improves. Future reference for similar issues.
ROI: Worthwhile when serial debugging would take >4 hours. Best for complex subsystems, multiple failed attempts, or when deep understanding needed.
Symptoms: Over-simplified test with data=[1,2,3] doesn't reproduce bug. Test passes, production fails. Different behavior in test vs production.
Causes:
Fix:
Symptoms: Only documenting working solution. Future developers try failed approaches again.
Causes:
Fix: Document pattern of failures with sources:
✅ expand_to_include_x() - WORKS (forces layout)
❌ set_max_width() - FAILS (overridden internally)
Source: egui issue #1234 (github.com/emilk/egui/issues/1234)
❌ min_scrolled_width() - FAILS (doesn't adapt)
Source: Stack Overflow answer by user123 (stackoverflow.com/a/789)
Pattern: Framework needs explicit expansion API, not hints.
References: See tests/scroll_test, egui docs (egui.rs/api/v0.33/ScrollArea)
Symptom: Fix works now, but breaks after framework update. Can't debug similar future bugs.
Fix: Commit harness to tests/bug-fixes/YYYY-MM-DD-[name]/ with README explaining approaches tested, why winner worked, and citing all research sources (GitHub issues, Stack Overflow, papers, docs with URLs).
Value: Reference for similar bugs, verify fix survives updates, training material, academic integrity.
| Symptom | Root Cause | Fix |
|---|---|---|
| Works in test, fails in production | Data empty (moved/taken) | Calculate before data consumption |
| Suspiciously small values (100 vs 2000) | Using empty data | Add logging, compare test vs prod |
| "Not initialized" errors | Async timing | Match async model, add delays |
| Order-dependent test results | Global state pollution | Reset state before/after each test |
| Different test/prod behavior | Version/context mismatch | Match framework version and execution context |
Before:
During:
After:
What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/ai-skill-builderGuides creation, audit, and improvement of portable Agent Skills using the shared SKILL.md format and Anthropic's established methodology, without confusing the portable specification with runtime-specific extensions. Use when the user wants to "create a skill", "create an agent skill", "build a skill", "make a new skill", "write a new skill", "improve an existing skill", "audit my skill", "audit a SKILL.md", "refine my skill", "test a skill", "test skill discovery", "install skills across harnesses", "package a skill for distribution", or needs guidance on skill structure, semantic XML regions, progressive disclosure, description quality, frontmatter, scripts, arguments, security, testing, cross-harness compatibility, or distribution./cli-demo-recorderCreate demo videos for CLI and TUI tools. Use when user asks to "record a demo", "make a demo GIF", "create a demo video", "record my CLI tool", "asciinema demo", "demo recording script". Covers asciinema+agg+ffmpeg pipeline, tmux recording, multi-shell, and dual-purpose demo+test harnesses in Python, Rust, TypeScript, and Bash./function-signature-and-parameter-guidanceDesign and review caller-facing names and contracts: functions, tools, commands, CLI flags,
parameters, config keys, env vars, profiles, event types, and node/edge identifiers.
Check names, descriptions, help, docstrings, schemas, defaults, bounds, units, errors,
outputs, mutation, and whether values reach behavior.
Use when asked to "name a parameter", "parameter naming", "name this tool or command",
"choose a flag, option, or config key", "design an options object", "one tool or two",
"bool or enum here", "name a profile, field, event, node, or edge",
"make names clear and unambiguous", "check ISO, platform, or language naming",
"audit CLI/MCP/JSON-Schema help", "define accepted values or defaults",
"what should this return on failure", "rename this without breaking callers",
"improve an error message", "why did the caller pass the wrong argument",
"why did this parameter do nothing", or "red-team these descriptions".
Not for local variables, general prose, README copy, release notes, or commits.
/mermaid-diagramsRender Mermaid diagrams to SVG using beautiful-mermaid and bun. Use when the user asks to "render mermaid", "generate diagram", "create flowchart", "update diagrams", "render SVG from mermaid", "beautiful-mermaid", "regenerate diagrams", or needs to convert Mermaid diagram syntax into styled SVG files. Supports all Mermaid diagram types with 15 themes including tokyo-night./streamline-textEdit prose for brevity and scanability without losing facts. Use for requests to "revise", "rewrite", "edit", "polish", "clean up", "clarify", "simplify", "condense", "tighten", "shorten", "streamline", "de-fluff", remove bloat/repetition or unnecessary newlines, fix spelling/typos without changing meaning, make text concise/compact/skimmable, or finalize drafts, messages, notes, docs, reports, issues, or reviews. Activate for "too verbose", "very verbose", or "remove unnecessary newlines", and proactively when text is verbose, wordy, meandering, dense, hard to scan, or has duplicates, vague claims, undefined terms, or cold-reader problems. Preserve evidence, qualifiers, requirements, commands, numbers, and scope with a fact index and restore/cold-reader audit. For public Reddit, Hacker News, social posts, or release notes use public-facing-writing; for PRs use write-maintainer-ready-prs; pair with avoid-ai-isms when text sounds generated./synthesize-project-requirementsCreate one evidence-backed project requirements and gotchas note from cumulative notes, current repository state, git history, and human-authored messages found with AI Session Search. Use when asked to "go through all the notes", "recover project requirements", "mine prior sessions", "collect requirements and gotchas", "make a project memory note", "prepare a project handoff", or preserve decisions and corrections for a handoff. Do not use for a one-off log summary or direct factual answer unless durable project memory or a handoff is requested. Default to the project's notes directory; publish to its documentation only when requested and add a guidance-file pointer only with permission.npx claudepluginhub ahundt/autorun --plugin autorun-skillsOther plugins' skills for the same job