Claude Skill

rust-debugging

Causality. Use for an uncertain Rust defect: failing or flaky test, hang, wrong response, startup rejection, or teardown overrun.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download dankosik-cargo-modernize-.agents_skills_rust-debugging-6f540c3.zip · 1 KB

Install

skills CLI npx skills add https://github.com/Dankosik/cargo-modernize/tree/main/.agents/skills/rust-debugging
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dankosik-cargo-modernize@llmmart
Git git clone https://github.com/Dankosik/cargo-modernize.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dankosik/cargo-modernize collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Rust Debugging

Causality. Locate the earliest observable divergence between intended and actual behavior, design one observation able to falsify the leading explanation, and keep symptom, evidence, hypothesis, and repair distinct.

Failure boundary. Match the probe to the failure class: compiler/lint output for static errors; the lossless syntax tree from the ra_ap_syntax adapter for parse or span mismatches; the rule's requires, edition, no_std, and SemVer gates for missing or spurious findings; and cargo modernize explain/why output for rule admission. Inspect structured error chains and run-summary accounting directly, since a panic caught by the scan worker can look like a silently skipped file.

Smallest reproducer. Reproduce at the narrowest layer preserving the failure—a pure function, a single snippet through the syntax adapter, one catalog fixture, a minimal tempfile workspace, or the full binary—recording exit status, finding order, and edition/MSRV inputs where discriminating. Remember that the scan worker's silent panic hook withholds panic output by design; reproduce outside the worker rather than weakening that isolation.

Concurrency and ownership hypotheses. Test nondeterministic output against concrete mechanisms: worker scheduling order leaking into results, shared caches keyed too coarsely, filesystem iteration order, stack exhaustion on deep trees, or child cargo/git processes inheriting unexpected environment. For borrow or lifetime errors, trace true data flow and ownership lifetimes before reaching for .clone(), Arc, or mutexes.

Controlled iteration and repair. Vary one causal input at a time while preserving secrets redaction and separating pre-existing baseline failures. When an attempted fix fails, replace the falsified hypothesis rather than stacking retries, caught panics, or longer sleeps; once proven, fix the causal owner, replay the original reproducer, keep focused regression coverage, and remove temporary probes within existing test harnesses.

Files (cargo-modernize)
  • LICENSE 1 KB · in bundle
  • SKILL.md 2.2 KB
    ---
    name: rust-debugging
    description: "Causality. Use for an uncertain Rust defect: failing or flaky test, hang, wrong response, startup rejection, or teardown overrun."
    ---
    
    # Rust Debugging
    
    **Causality.** Locate the earliest observable divergence between intended and actual behavior, design one observation able to falsify the leading explanation, and keep symptom, evidence, hypothesis, and repair distinct.
    
    **Failure boundary.** Match the probe to the failure class: compiler/lint output for static errors; the lossless syntax tree from the `ra_ap_syntax` adapter for parse or span mismatches; the rule's `requires`, edition, `no_std`, and SemVer gates for missing or spurious findings; and `cargo modernize explain`/`why` output for rule admission. Inspect structured error chains and run-summary accounting directly, since a panic caught by the scan worker can look like a silently skipped file.
    
    **Smallest reproducer.** Reproduce at the narrowest layer preserving the failure—a pure function, a single snippet through the syntax adapter, one catalog fixture, a minimal `tempfile` workspace, or the full binary—recording exit status, finding order, and edition/MSRV inputs where discriminating. Remember that the scan worker's silent panic hook withholds panic output by design; reproduce outside the worker rather than weakening that isolation.
    
    **Concurrency and ownership hypotheses.** Test nondeterministic output against concrete mechanisms: worker scheduling order leaking into results, shared caches keyed too coarsely, filesystem iteration order, stack exhaustion on deep trees, or child `cargo`/`git` processes inheriting unexpected environment. For borrow or lifetime errors, trace true data flow and ownership lifetimes before reaching for `.clone()`, `Arc`, or mutexes.
    
    **Controlled iteration and repair.** Vary one causal input at a time while preserving secrets redaction and separating pre-existing baseline failures. When an attempted fix fails, replace the falsified hypothesis rather than stacking retries, caught panics, or longer sleeps; once proven, fix the causal owner, replay the original reproducer, keep focused regression coverage, and remove temporary probes within existing test harnesses.
    

Comments

Sign in to join the conversation.

No comments yet. Start the conversation.

Reviews (0)

No reviews yet.