rust-auto-fixer

Run cargo check on Rust code snippets and apply up to three fixes.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/Develata/Deve-Skills --skill rust-auto-fixer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-auto-fixer
Source: https://github.com/Develata/Deve-Skills/tree/main/My-Skills/rust-auto-fixer
Command: npx skills add https://github.com/Develata/Deve-Skills --skill rust-auto-fixer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Automates detection and correction of Rust compilation errors by running cargo check on user-provided code and applying targeted fixes.

Core Features & Use Cases

  • Automated compile-and-fix loop: runs cargo check, analyzes errors, and iteratively applies fixes up to 3 attempts.
  • Automatic dependency detection based on use statements, with enhanced defaults for common crates.
  • Rustfmt formatting on successful compilation to ensure clean output.
  • Use case: Validate and repair code generated by an AI assistant or draft Rust snippets that wouldn't compile.

Quick Start

Provide your Rust code snippet and let the tool run cargo check to auto-detect dependencies, fix errors, and produce a compiled, formatted result.

Frequently Asked Questions about rust-auto-fixer

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

FAQPage Schema
How do I automatically fix Rust compilation errors in a code snippet?

To automatically fix Rust compilation errors, you provide your code snippet to run cargo check, which diagnoses errors and iteratively applies targeted fixes up to three attempts. It outputs compiled, rustfmt-formatted code.

How does automatic dependency detection work for Rust code?

Automatic dependency detection for Rust code analyzes your use statements to identify required crates, enhanced by default common crate mappings, so cargo check can compile the snippet without manual Cargo.toml configuration.

Can I use this to fix AI-generated Rust code that won't compile?

Yes, you can use this to fix AI-generated Rust code that won't compile by running it through the automated compile-and-fix loop. It handles common ownership and borrowing errors within isolated code blocks.

What are the limitations of automated Rust error fixing?

Limitations of automated Rust error fixing include a maximum of three fix iterations and support for isolated code blocks only. It targets common ownership and borrowing errors, so complex project structures may not be resolved.

Does the tool format Rust code after fixing compilation errors?

Yes, the tool formats Rust code after fixing compilation errors by applying rustfmt formatting upon successful compilation. This ensures the final output is both syntactically correct and cleanly formatted.