一键导入
verification-loop
Comprehensive verification for Rust projects. Runs cargo check, clippy, fmt, tests, coverage, and security audit in sequence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Comprehensive verification for Rust projects. Runs cargo check, clippy, fmt, tests, coverage, and security audit in sequence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Project-specific conventions for libmagic-rs (commit style, error patterns, testing layout, tooling)
Security review for Rust systems code. Covers memory safety, buffer handling, unsafe code, input validation, resource exhaustion, and supply chain security.
Rust library API design patterns including builder pattern, error handling, trait design, type safety, and CLI design with clap.
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Enforces test-driven development for Rust. Write tests first with cargo test/nextest, implement to pass, refactor, verify >85% coverage with cargo llvm-cov.
| name | verification-loop |
| description | Comprehensive verification for Rust projects. Runs cargo check, clippy, fmt, tests, coverage, and security audit in sequence. |
The canonical entry point in this project is
mise exec -- just ci-check. It runs the same checks pre-commit and CI run, in the right order. The per-phase breakdown below is for when you want finer-grained feedback (e.g., during refactoring you want only clippy + tests, not the whole suite).
mise exec -- just ci-check
This runs format, clippy, build, tests, mdformat, shellcheck, actionlint, cargo-machete, cargo-audit, and Cargo.toml sort. If it exits 0, you're green.
mise exec -- cargo check 2>&1 | tail -20
If build fails, STOP and fix before continuing.
mise exec -- cargo fmt -- --check 2>&1 | head -20
If formatting issues are found, run mise exec -- cargo fmt to fix.
mise exec -- cargo clippy --all-targets -- -D warnings 2>&1 | head -30
All clippy warnings are errors in this project (warnings = "deny" in
workspace lints).
# Run all tests with nextest (does not run doc tests).
mise exec -- cargo nextest run 2>&1 | tail -50
# Doc tests separately.
mise exec -- cargo test --doc 2>&1 | tail -20
Report:
mise exec -- cargo llvm-cov --summary-only 2>&1 | tail -10
Target: 85%+ coverage per AGENTS.md. If below threshold, identify uncovered code.
mise exec -- cargo audit 2>&1 | tail -20
mise exec -- cargo deny check 2>&1 | tail -20
cargo deny check uses the project's deny.toml -- do not pass a
custom config path.
git diff --stat
git diff HEAD --name-only
Review each changed file for:
.unwrap(), direct indexing in non-test code)After running all phases, produce a verification report:
VERIFICATION REPORT
==================
Build: [PASS/FAIL]
Format: [PASS/FAIL]
Clippy: [PASS/FAIL] (X warnings)
Tests: [PASS/FAIL] (X/Y passed)
Doc Tests: [PASS/FAIL]
Coverage: [X%] (target: 85%)
Audit: [PASS/FAIL] (X advisories)
Deny: [PASS/FAIL]
Diff: [X files changed]
Overall: [READY/NOT READY] for PR
Issues to Fix:
1. ...
2. ...