PREPR — Gate de Qualidade Rust Pré-PR
cadneowl/prepr
Gate de qualidade Rust diff-scoped com clippy, audit e heurísticas
Ver no GitHubSkill para Claude Code que executa análise completa de qualidade Rust (clippy, dead code, dependências não usadas, auditoria de segurança) antes de abrir PR, triando resultados apenas para as mudanças do seu branch. Fornece veredito go/no-go com severidade clara.
Instalação
npx convez-ai cadneowl/prepr1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Validar qualidade de Rust antes de abrir pull request
- Identificar code smells e problemas de segurança localizados no branch
- Automatizar triagem de problemas por severidade (blocker/should-fix/nit)
Veredito

Ferramenta sólida e focada para times Rust que querem automação de qualidade no fluxo de PR. Excelente para reduzir ruído em codebases legadas ao isolar findings novos vs pré-existentes.
README
A tradução para o português deste README ainda está na fila.
PREPR — a pre-PR Rust quality gate for Claude Code
prepr is a Claude Code skill
that runs your Rust analysis suite before you open a pull request, then triages
the results into a diff-scoped, severity-ranked, go/no-go report — so you fix
what your branch introduced and don't drown in a legacy crate's backlog.
Think "knip for Rust, as a pre-PR gate," with the triage done by the agent.
/prepr
## PREPR — my-crate @ feature/x (diff vs main)
Verdict: ✅ READY | ⛔ FIX <N> BLOCKER(S) FIRST
🔴 Blockers (N) - path:line — issue [rule] → fix
🟠 Should-fix (N) - …
🟡 Nits (N) - …
ℹ️ Pre-existing - crate-wide context (not your PR's fault)
What it checks
A harness (scripts/checks.sh, read-only) captures raw output; the skill triages it.
- Formatting —
cargo fmt --check(and notices when the whole tree is unformatted → pre-existing, not your blocker). - Clippy — gate vs advisory — default lints are the gate (blockers);
pedantic/nurseryare captured separately as advisory so they can't drown the verdict. - Dead code / unused — compiler
dead_code/unused_*lints; flags stale#[allow(dead_code)]. - Unused dependencies —
cargo-shear(orcargo-machete). - Security advisories —
cargo-audit(RustSec). - Tests —
cargo test --lib. - Guideline heuristics (production-only) —
unwrap/expect/panicoutside tests,dbg!/println!leftovers,unsafewithout// SAFETY:,TODOs. Excludes#[cfg(test)], comments, andmain.rs/build.rs. - Optional deep pass (
PREPR_FULL=1) —cargo-geiger,cargo-minify,cargo-bloat.
Every finding is labelled NEW (your PR) vs PRE-EXISTING (context only) by
intersecting it with the files your branch changed. Blockers come only from NEW
issues. If a rust-backend-staff-engineer.md agent or CLAUDE.md defines project
standards, the skill judges against them and cites the rule a finding breaks.
Install
It's a user-level skill, so it's available in every project:
git clone https://github.com/cadneowl/prepr.git ~/.claude/skills/prepr
Update later with git -C ~/.claude/skills/prepr pull. To pin it to a single
repo instead, clone into <repo>/.claude/skills/prepr.
Start a fresh Claude Code session, then run /prepr from any Rust repo.
Requirements
- Rust + Cargo (
clippy/rustfmtcomponents are auto-added). - A POSIX shell for the harness — native on macOS/Linux; on Windows it runs under git-bash (the Claude Code Bash tool).
- Missing analysis tools are auto-installed via
cargo install --locked(cargo-shear,cargo-audit; extras only underPREPR_FULL). SetPREPR_NO_INSTALL=1to skip installs. - Some crates' build scripts need a C toolchain /
cmakeonPATH(e.g. an*-sysdep) to compile during the test step.
Flags
| Env var | Effect |
|---|---|
PREPR_FULL=1 | also run cargo-geiger / cargo-minify / cargo-bloat |
PREPR_NO_INSTALL=1 | don't auto-install missing cargo tools (skip them) |
PREPR_NO_TEST=1 | skip cargo test |
The harness can also be run directly: bash ~/.claude/skills/prepr/scripts/checks.sh [base-ref].
Why diff-scoped?
A mature crate can carry hundreds of clippy warnings and an unformatted tree. A pre-PR tool that dumps all of that is noise. PREPR attributes findings to the files your branch touched, separates the default-lint gate from opt-in pedantic advice, excludes test code from the panic heuristics, and leads with a one-line verdict — so the signal is what you need to fix before this PR, and nothing else.
License
MIT — see LICENSE.