code-review
4
总安装量
4
周安装量
#50791
全站排名
安装命令
npx skills add https://github.com/5dlabs/cto --skill code-review
Agent 安装分布
claude-code
3
opencode
2
codex
2
gemini-cli
2
trae
1
Skill 文档
Code Quality Review
Quality analysis patterns for maintaining healthy, maintainable codebases.
Execution Rules
- Quality gates. All checks must pass before approval
- Constructive feedback. Be specific and actionable
- Test coverage. Aim for 80%+, 100% on critical paths
- Documentation. Code should be self-documenting with good names
- Consistency. Follow project conventions
Review Checklist
Code Quality
- Clear, meaningful names
- Small, focused functions (< 40 lines)
- No code duplication (DRY)
- Proper error handling
- No magic numbers/strings
Testing
- Unit tests for logic
- Integration tests for workflows
- Edge cases covered
- Mocks used appropriately
Security
- No secrets in code
- Input validation
- Output encoding
- Auth/authz checks
Performance
- No N+1 queries
- Appropriate caching
- Efficient algorithms
Language-Specific Checks
Rust
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings -W clippy::pedantic
cargo test --workspace
cargo tarpaulin --out Html # Coverage
Rust-Specific:
- Verify
#[must_use]attributes on functions returning values - Check for proper error handling with
anyhow/thiserror - Ensure no
unwrap()in production code paths - Verify
tracingmacros used instead ofprintln! - Check clippy pedantic lints are satisfied
TypeScript
pnpm lint
pnpm typecheck || npx tsc --noEmit
pnpm test --coverage
pnpm build
Effect-Specific:
- Verify
Effect.Schemais used for validation (not Zod) - Check that errors use
Schema.TaggedErrorfor type safety - Ensure services use
Context.Tagfor dependency injection - Verify
Effect.retryuses properSchedulepatterns - Check that
Effect.genis used for complex pipelines
React/Next.js:
- Verify proper use of
use client/use serverdirectives - Check for proper error boundaries
- Ensure accessibility attributes present
Go
go fmt ./...
golangci-lint run
go test ./... -cover
go vet ./...
Go-Specific:
- Verify proper error handling (no ignored errors)
- Check for goroutine leaks
- Ensure context propagation
- Verify interface segregation
Complexity Analysis
# Line counts by language
tokei .
# Check complexity
scc --complexity .
Quality Guidelines
- Follow project style guide
- Keep functions small and focused (< 40 lines)
- Use meaningful names
- Write self-documenting code
- Maintain high test coverage
- Address tech debt incrementally
Definition of Done
Before approving:
- All quality checks pass (lint, format, type check)
- Test coverage meets project threshold
- No critical code smells or complexity issues
- Documentation is complete and accurate
- Review comments have been addressed
- Changes follow project conventions