code-quality
БесплатноБез исполняемых скриптовНе проверенAgents should invoke this skill for code reviews, linting/formatting setup, maintainability checks, complexity concerns, warning cleanup, coding standards, or…
от waybarrios★ 562 звезды на GitHubОб этом скилле
Code Quality
Structured code review and quality enforcement across common tech stacks. Checklists, linting strategies, and metrics to keep codebases healthy.
Quick Start
Run a Code Quality Check
- Run static analysis: Linters, type checkers, formatters
- Review against checklist: Language-specific items below
- Check complexity metrics: Cyclomatic < 25, data flow < 25
- Report findings: Structured output with severity and recommendations
Linting Configurations
Rust — Clippy Config
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:
- No
.unwrap()in non-test code (use?or.expect("reason")) - All public items have rustdoc (
#[warn(missing_docs)]) #[must_use]on functions that return values that should be checked- When using
#[allow(...)], always add a comment explaining why - If no good explanation exists for
#[allow(...)], fix the issue instead
TypeScript — ESLint + Strict Mode
Recommended tsconfig.json strictness:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"exactOptionalPropertyTypes": true
}
}
Key rules to enforce:
- No
any— useunknownand type guards instead - No
// @ts-ignore— fix the type issue or use// @ts-expect-errorwith explanation - Prefer
constoverlet, never usevar - Use discriminated unions for state modeling
- Explicit return types on exported functions
Python — Ruff + Mypy
Recommended 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:
- Type hints on all public functions and methods
- Docstrings on all public classes, functions, and methods
- Use
pathlib.Pathoveros.path - Use
uvas package manager - No bare
except:— always catch specific exceptions
Code Review Checklists
Universal Checklist (All Languages)
Correctness:
- Does the code do what it claims to do?
- Are edge cases handled (empty collections, null/None, zero, negative)?
- Are error paths handled gracefully?
- Are there any off-by-one errors?
Clarity:
- Can you understand the code without the PR description?
- Are variable/function names descriptive and consistent?
- Are complex sections commented with "why" (not "what")?
- Is the code self-documenting where possible?
Architecture:
- Does this change respect existing module boundaries?
- Is the change at the right abstraction level?
- Are dependencies reasonable (not pulling in a huge lib for one function)?
Testing:
- Are new functions/methods covered by tests?
- Do tests cover edge cases and error paths?
- Are tests readable and maintainable?
Security (flag for a security follow-up if concerns found):
- No hardcoded secrets or credentials
- User input is validated before use
- No SQL injection, XSS, or path traversal vectors
Rust-Specific Checklist
-
cargo fmtapplied -
cargo clippyclean (pedantic + nursery) - No
.unwrap()outside tests - Error handling uses
?with proper error types - Public items have rustdoc comments
-
#[allow(...)]includes explanatory comment - New functions have unit tests
- Cyclomatic complexity < 25 per function
- Data flow complexity < 25 per function
TypeScript/React-Specific Checklist
- No
anytypes - Strict mode compliance
- Components have clear prop types
- Hooks follow rules of hooks
- No unnecessary re-renders (check memo/callback usage)
- Bundle impact considered for new dependencies
Django/Python-Specific Checklist
- Type hints present on public interfaces
- Ruff + mypy clean
- No N+1 queries (use
select_related/prefetch_related) - Migrations are reviewed and reversible
- No business logic in views (use service layer)
Complexity Metrics
Cyclomatic Complexity
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:
- Extract helper functions
Установить code-quality в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл code-quality?
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.
Как установить скилл code-quality?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-quality запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic