بنقرة واحدة
util-rust-quality
Rust code quality audit based on Apollo best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Rust code quality audit based on Apollo best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | util-rust-quality |
| description | Rust code quality audit based on Apollo best practices |
| metadata | {"source-plugin":"util","source-skill":"rust-quality"} |
$ARGUMENTS
Audit Rust code quality. Report issues in organized format, then offer to fix.
#[expect(...)] with comment if truly necessary, never bare #[allow(...)]Red flags:
.clone() inside loops - use .cloned() or .copied() on iterator.clone() on large types (Vec<T>, HashMap<K,V>)fn process(s: String) vs fn process(s: &str)&Vec<T> instead of &[T]&String instead of &strPrefer:
&str over String in params&[T] over &Vec<T> in paramsimpl AsRef<T> for flexible APIsRed flags:
.unwrap() or .expect() in non-test codematch for simple Ok/Err -> Some/None conversions (use .ok(), .ok_or())let Ok(x) = expr else { return }if let Some(x) = ... { x } else { default } instead of .unwrap_or()Prefer:
? for error propagationlet Ok(x) = expr else { return Err(...) } for early returns.ok_or_else() / .map_or_else() when allocation neededthiserror for library errors, anyhow only for binariesRed flags:
.collect::<Vec<_>>() then for x in vec.filter().map().collect().fold() for simple sums (use .sum()).iter() vs .into_iter() awareness (prefer .iter() for Copy types)Prefer:
.enumerate() over manual index trackingRed flags:
panic! in library code (use Result)Box<dyn Error> in library APIs (use thiserror)# Errors doc section on fallible functionsanyhow in library codePrefer:
thiserror with descriptive error variants#[from] for wrapping? over verbose match chainsinspect_err() for loggingRed flags:
Box when stack works)#[inline] without benchmark proofBox<dyn Trait> when impl Trait worksor, map_or, unwrap_or (use _else variants)Prefer:
impl Trait (static dispatch) over dyn Trait when possibleCow<'_, str> for maybe-owned dataRed flags:
// TODO without issue link/// docs on public items# Examples, # Errors, # Panics sectionsPrefer:
Red flags:
Option<T> fields for required builder params#[non_exhaustive] on public enumsdyn Trait without Send + Sync in async contextsPrefer:
PhantomData for zero-cost type markersRed flags:
# Rust Quality Audit: [path]
## Critical (must fix)
- [file:line] Category: Description
## Warnings (should fix)
- [file:line] Category: Description
## Suggestions (consider)
- [file:line] Category: Description
## Summary
- X critical, Y warnings, Z suggestions
- Key patterns to address: ...
After reporting, ask: "Fix issues? (all / critical only / skip)"
Write high-quality session prompts (SESSION_WORKER.md and SESSION_REVIEWER.md) for an agent loop. Reads repo context and follows the loop-author guide to produce targeted, effective prompts. Use when setting up a new loop or rewriting session prompts for an existing one.
Pre-flight checks and launch for agent loops. Validates branch state, session prompts, creates loop directory structure, and launches run.sh in a tmux session. Use when the user wants to start a new agent loop in the current repo.
Cross-repo visibility for agent loops. Lists running, completed, and crashed loops. Reads the registry and per-repo tracking logs. Shows tmux attach commands. Use when checking what loops are active, what ran recently, or loop details.
Capture feedback about wf, util, or vault plugins and file it as a GitHub issue for improvement. Use after any session where the tooling fell short — wrong agent behavior, missing skill coverage, misleading prompts, workflow friction, or convention gaps. Only for generic plugin improvements that would help ANY project, not repo-specific config. Files to JSai23/claude-tooling with the plugin-feedback label.
Write high-quality session prompts (SESSION_WORKER.md and SESSION_REVIEWER.md) for an agent loop. Reads repo context and follows the loop-author guide to produce targeted, effective prompts. Use when setting up a new loop or rewriting session prompts for an existing one.
Pre-flight checks and launch for agent loops. Validates branch state, session prompts, creates loop directory structure, and launches run.sh in a tmux session. Use when the user wants to start a new agent loop in the current repo.