From pw
Code quality standards for reviewing code changes. Activated when reviewing PRs, implementing features, or discussing code quality. Triggers on requests to "review code", "check quality", "improve code", or "refactor".
How this skill is triggered — by the user, by Claude, or both
Slash command
/pw:code-qualityThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply these quality criteria when reviewing or writing code.
Apply these quality criteria when reviewing or writing code.
Before reviewing or writing code, explore the codebase to understand existing conventions.
Glob("**/*Service.ts") to find all service files).Evaluate against: readability, maintainability, simplicity, error handling, type safety.
For detailed criteria, consult references/checklist.md.
Flag these common issues:
For naming conventions and style patterns, consult references/patterns.md.
| Aspect | Check |
|---|---|
| Naming | Match existing variable/function naming conventions |
| Structure | Follow established file/directory organization |
| Patterns | Use same design patterns as existing code |
| Formatting | Match indentation, spacing, line breaks |
| Imports | Match import ordering and grouping |
| Error handling | Use same error handling patterns |
After flagging an issue, use Grep to verify the pattern is consistent across the codebase before reporting. The existing codebase convention takes precedence over general best practices.
For each finding:
When reviewing database access code, watch for queries inside loops:
# Bad - N+1 query
for user in users:
posts = db.query(Post).filter(Post.user_id == user.id).all()
# Good - Eager loading
users = db.query(User).options(joinedload(User.posts)).all()
# Bad - Deep nesting
def process(data):
if data:
if data.is_valid():
if data.has_permission():
return do_work(data)
# Good - Early returns
def process(data):
if not data:
return None
if not data.is_valid():
raise ValueError("Invalid data")
if not data.has_permission():
raise PermissionError("Access denied")
return do_work(data)
If code quality problems are missed:
references/checklist.mdIf style suggestions conflict with the existing codebase:
npx claudepluginhub ken2403/claude-paralell-dev-plugin --plugin hvReviews code for quality issues by reading files, checking patterns in references/patterns.md, identifying anti-patterns via Grep, and suggesting specific improvements. Use for reviews and refactoring, not new features.
Reviews code focusing on quality, readability, logical errors, error handling, complexity reduction, edge cases, and maintainability. Coordinates pr-review-toolkit tools if available. Use for PR reviews.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.