rust-borrow-checker

Diagnose Rust borrow checker errors and route them to fix workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/caioniehues/dotfiles --skill rust-borrow-checker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-borrow-checker
Source: https://github.com/caioniehues/dotfiles/tree/main/skills/rust-borrow-checker
Command: npx skills add https://github.com/caioniehues/dotfiles --skill rust-borrow-checker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps diagnose and fix ownership and lifetime errors enforced by the borrow checker, turning compile errors into actionable fixes.

Core Features & Use Cases

  • Error diagnosis for E0382, E0502, E0597, etc.
  • Guided fixes for lifetimes, moves, and borrows.
  • Educational insights to understand borrow semantics.

Quick Start

Paste a compiler error output and I'll route to the appropriate workflow to diagnose and fix.

Frequently Asked Questions about rust-borrow-checker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Rust borrow checker errors like E0382?

Borrow checker errors like E0382 occur when code violates Rust's ownership rules—typically moving a value twice or using it after a move. Paste your compiler error and I'll diagnose the specific violation, identify whether it's an ownership, borrowing, or lifetime issue, and route you to the appropriate fix while preserving code semantics.

What are Rust lifetimes and why do they cause compile errors?

Lifetimes are Rust's way of tracking how long references are valid. Compile errors arise when a reference outlives the data it points to or when lifetime relationships between function parameters and return values aren't explicitly declared. I help diagnose these errors and guide you through adding or adjusting lifetime annotations.

How do I resolve Rust ownership and borrowing issues?

Ownership problems occur when code tries to use a moved value or borrows incompatibly. I analyze your error, determine whether you need to clone, use references, adjust lifetimes, or restructure borrowing patterns, then provide concise fixes that solve the compile error without unnecessary clones or semantic changes.

Can I understand why my Rust code fails to compile?

Yes. Paste your compiler error output and I'll explain the borrow checker violation, identify the ownership pattern causing it—whether E0502, E0597, or another error—and break down the semantics so you understand both the fix and the underlying rule Rust is enforcing.

What does it mean when Rust says a value was moved?

A move occurs when Rust transfers ownership of a value to a new binding; the original binding becomes invalid. Move errors happen when code tries to use a value after it's been moved elsewhere. I help identify where the move happens, whether you need borrowing instead, and how to restructure code to keep values in scope.