rust-compiler-diagnostics
Use when Rust code fails to compile, Clippy reports lints, borrow checker errors appear, lifetimes are unclear, or cargo diagnostics need systematic triage.
Skill by mkurman
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mkurman-rust-compiler-diagnostics
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rust-compiler-diagnostics
What's inside
- Skill name
rust-compiler-diagnostics- Description
- Use when Rust code fails to compile, Clippy reports lints, borrow checker errors appear, lifetimes are unclear, or cargo diagnostics need systematic triage.
- License
- MIT
- Instructions
- 84 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- error-triage.md · references/
SKILL.md (first lines)
# Rust Compiler Diagnostics
Use this skill to resolve Rust compiler and Clippy diagnostics without guessing.
## Workflow
1. Run the narrowest command that reproduces the diagnostic, usually `cargo check -p <crate>` or a focused test.
2. Read the first real compiler error before secondary errors; later diagnostics are often consequences.
3. Identify the ownership, lifetime, type, trait, macro, feature, or lint category involved.
4. Inspect the definition site and the nearest caller before editing.
5. Prefer changing API shape only when the current contract is the real cause.
6. Re-run the same command after each fix, then broaden verification when the focused command is clean.
## Borrow Checker Triage
- Find who owns the value, who borrows it, and how long each borrow actually needs to live.
- Reduce borrow scope with blocks, local variables, or earlier extraction before adding clones.
- Split immutable data from mutable state when one large struct borrow blocks independent access.
- Move expensive or fallible work outside lock guards and mutable borrows.
- Use owned values for spawned tasks and cross-thread work; references rarely fit those lifetimes.
## Diagnostic Repair Examples
### End A Borrow Before Mutation
```rust
// Avoid: `self.items` is immutably borrowed while mutating `self`.
if let Some(item) = self.items.get(id) {
self.record_access(item.name());
}
// Prefer: extract the needed owned value, ending the borrow.
let name = self.items.get(id).map(|item| item.name().to_owned());
if let Some(name) = name {
self.record_access(&name);
}
```
### Move Out Of A Field Safely
```rust
if let Some(task) = self.pending_task.take() {
task.cancel().await;
}
```
Use `Option::take` when a field must be moved out while leaving the struct in a valid state.
### Fix Escaping Borrow In Spawned Tasks
```rust
// Avoid: `&self` cannot be moved into a 'static task.
tokio::spawn(async move {
self.refresh().await;
});
// Prefer: clone the owned handle needed by the task.
let client = self.client.clone();
tokio::spawn(async move {
client.refresh().await;
});
```
## Clippy Triage
- Treat Clippy as design feedback, not only style feedback.
- Accept Clippy suggestions when they preserve readability and behavior.
- Add `#[allow(...)]` only near the smallest scope and include a short reason when the lint is intentionally violated.
- Do not silence `unwrap_used`, `expect_used`, `panic`, or lossy conversion lints in production paths without confirming the project policy.
### Prefer Targeted Allows
```rust
#[allow(clippy::too_many_arguments, reason = "constructor mirrors the wire protocol fields")]
pub fn from_wire(/* fields */) -> Self {
// ...
}
```
## References
Read `references/error-triage.md` for common diagnostic families and repair patterns.From mkurman/zorai, MIT.
More from mkurman/zorai
- 0.798score
best-practices
web-quality-skills
Apply modern web development best practices for security, compatibility, and code quality.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-analyzer
mkurman
Use this skill when analyzing existing video files using FFmpeg and AI vision, extracting frames for design system generation, detecting scene boundaries…
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
proposal-writing
mkurman
Use this skill when writing proposals, responding to RFPs, drafting SOWs, or developing pricing strategies.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
product-strategy
mkurman
Use this skill when defining product vision, building roadmaps, prioritizing features, or choosing frameworks like RICE, ICE, or MoSCoW.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
social-media-strategy
mkurman
Use this skill when planning social media strategy, creating platform-specific content, scheduling posts, or analyzing engagement metrics.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-audio-design
mkurman
Use this skill when adding audio to programmatic videos - generating narration with ElevenLabs TTS, sourcing royalty-free background music, creating SFX with…
SkillAFreshness: A★ 325Claude Code +9
Signals
- Stars
- 325
- Forks
- 24
- Open issues
- 0
- Last commit (this folder)
- May 4, 2026 (5 months ago)
- Last release
- Oct 23, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mkurman/zorai
- Website
- zorai.app/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mkurman
- 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9
Cite this page
rust-compiler-diagnostics skill. Agent Mart. https://agentmart.dev/skills/mkurman-rust-compiler-diagnostics (last updated 2026-10-24)