My-Skills/rust-auto-fixer/SKILL.md
Verifies and auto-fixes Rust code by compiling it and analyzing errors. Trigger this skill when the user provides Rust code that needs validation, or when previously generated Rust code fails to compile.
npx skillsauth add develata/deve-skills rust-auto-fixerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides an automated loop for fixing Rust compilation errors. It takes a Rust code snippet, runs it through a real compiler (cargo check), analyzes the output, and iteratively applies fixes.
It is particularly useful for:
check_rust_code.
use statements.rustfmt formatted code after "SUCCESS".
25→ - You MUST use this formatted code in your final <code_block>.
26→ - ERRORS: If errors are returned, analyze them using the strategies in Rust Fix Strategies.
27→4. Fix & Verify (Loop Constraint):
26→ - Apply the fix (e.g., adding .clone(), changing lifetimes, fixing types).
27→ - CRITICAL: You have a maximum budget of 3 attempts.
28→ - If the code still fails after 3 fixes, STOP and output the last error with a note: "Max attempts reached."
29→ - (Optional) Re-run check_rust_code to verify.
30→5. Output: Return the final result.Located at scripts/cargo_runner.py.
use crate::module patterns and adds them to Cargo.toml with version *.rustfmt on success and returns the formatted code.Usage:
temp.rs).python scripts/cargo_runner.py temp.rs
<input_schema>
<code_snippet>
// The Rust code.
// Dependencies are auto-detected from 'use' statements.
// For macros like #[macro_use] extern crate ..., detection might fail.
// Note: For best results, please include use statements for external crates, or mention them in the context.
</code_snippet>
<context>Optional context</context>
</input_schema>
<fixed_result>
<original_errors>Summary of errors found</original_errors>
<explanation>Explanation of the fix applied</explanation>
<code_block>The fixed Rust code</code_block>
</fixed_result>
tools
Collect and audit Codex token usage with a bundled Python CLI and optional Windows batch launchers. Use this skill when the user asks to check Codex token usage, generate daily token audit logs, calculate monthly CostUSD totals, review Codex spending, or run Codex token usage scripts on Windows, Bash, WSL, or Linux.
tools
Use when giving the user an INLINE reply that carries a trade-off, a decision, a verdict, or a non-trivial finding (decision brief / round verdict / failure root-cause). NOT for "done"/status confirmations, one-line answers, or pure data dumps. Forces a compact decision-brief shape and blocks internal tool-name / file-path bleed into user-facing text.
development
Use for cross-file or cross-chapter terminology audits and corpus-wide term unification in thesis/paper sources — extract candidate term drift, build a decision queue, classify each occurrence, apply accepted replacements safely, and verify counts/build. Trigger on "术语审计", "术语统一", "术语一致性", "逐词审", "这个词全文怎么用", "把 X 全文改成 Y", "terminology audit", or "unify term X". Do NOT use for ordinary prose drafting or a single known-location edit; use academic-writing for prose quality and claim-boundary judgment.
tools
Use for ANY codex CLI dispatch via dispatch wrapper (no time threshold; presence-of-risk triggers, not estimated wall — stdin-EOF stalls occur at <60s). Combines internal log-inactivity watchdog wrapper + external Claude-session cron probe + sentinel hook enforcement. Detects stalls in ≤60-270s vs hours-without-detection failure mode.