ask-matt
MAmattpocock/skills336k近 7 天新增 5,004 个 star
Agents should invoke this skill for code reviews, linting/formatting setup, maintainability checks, complexity concerns, warning cleanup, coding standards, or quality gates in Rust, TypeScript, Python, shell, and mixed repos.
Structured code review and quality enforcement across common tech stacks. Checklists, linting strategies, and metrics to keep codebases healthy.
Standard clippy configuration (in Cargo.toml or .clippy.toml):
[lints.clippy]
cognitive_complexity = "warn"
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
unwrap_used = "deny"
Standard commands:
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo check
cargo test -- --test-threads=1
Key rules to enforce:
.unwrap() in non-test code (use ? or .expect("reason"))#[warn(missing_docs)])#[must_use] on functions that return values that should be checked#[allow(...)], always add a comment explaining why#[allow(...)], fix the issue insteadRecommended tsconfig.json strictness:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"exactOptionalPropertyTypes": true
}
}
Key rules to enforce:
any — use unknown and type guards instead// @ts-ignore — fix the type issue or use // @ts-expect-error with explanationconst over let, never use varRecommended pyproject.toml:
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "ANN", "B", "A", "C4", "DTZ", "ISC", "PIE", "PT", "RET", "SIM", "TCH", "ARG", "PTH", "ERA"]
[tool.mypy]
strict = true
warn_return_any = true
warn_unreachable = true
Key rules to enforce:
pathlib.Path over os.pathuv as package managerexcept: — always catch specific exceptionsCorrectness:
Clarity:
Architecture:
Testing:
Security (flag for a security follow-up if concerns found):
cargo fmt appliedcargo clippy clean (pedantic + nursery).unwrap() outside tests? with proper error types#[allow(...)] includes explanatory commentany typesselect_related/prefetch_related)Measures the number of independent paths through code. Recommended threshold: < 25.
| Complexity | Risk Level | Action |
|---|---|---|
| 1-10 | Low | Simple, well-structured code |
| 11-20 | Moderate | Consider simplification if growing |
| 21-24 | High | Refactoring recommended |
| 25+ | Violation | Must refactor before merge |
How to reduce:
Measures how many variables interact within a function. Recommended threshold: < 25.
How to reduce:
| Language | Tool | Command |
|---|---|---|
| Rust | cargo clippy (cognitive_complexity) | Built into clippy config |
| TypeScript | eslint-plugin-sonarjs | Configure complexity rule |
| Python | radon | radon cc <file> -s -a |
| Python | ruff | Rule C901 (mccabe complexity) |
When delivering a code review:
## Code Review: [PR/File/Module]
**Date:** YYYY-MM-DD
### Summary
[1-2 sentences: overall quality assessment]
### Findings
| # | Severity | File | Line(s) | Finding | Suggestion |
|---|---|---|---|---|---|
| 1 | High | src/app.rs | 45-67 | Cyclomatic complexity 28 (limit: 25) | Extract match arms into helper functions |
| 2 | Medium | src/ui.rs | 120 | Unwrap without context | Use `.expect("reason")` or `?` |
### Positive Observations
[What's well-written — acknowledge good code]
### Metrics
- Linter: [clean / N warnings]
- Tests: [pass / fail]
- Complexity: [within limits / violations noted above]
### Security Notes
[Items to flag for follow-up, if any]
AGENTS.md/CLAUDE.md execution policies.code-reviewer skill for adversarial review of a focused change set, and design-patterns for fixing complexity violations through better structure.MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
MAmattpocock/skills336k近 7 天新增 5,004 个 star
OBobra/superpowers331k近 7 天新增 5,757 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star
AFaffaan-m/ECC314k近 7 天新增 4,125 个 star