con un clic
code-quality
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".
Menú
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".
Autonomously drives ONE feature end-to-end — understand, implement, review-and-fix, and open a right-sized PR — inside its own worktree. Runs as the main loop of a background feature agent (launched by /hv:launch-agents, or directly via `claude --bg "/hv:build-feature ..."` for a single feature). Accepts a spec-file path, inline JSON, a plain-text task, or `<spec> <featurename>`.
Turn a GitHub issue, spec file, or free-text request into a design and the right-sized plan to build it. Judges the epic's total weight and decides whether to keep it as a single PR (small/cohesive work) or decompose it into independent, parallel-executable features for a fleet of agents (large work or separable risky cores) — it does not split by default. Use this first, before launching any work. Free to propose a better architecture than the current code; sizes by risk and independence. Outputs a feature manifest (one or more features) that /hv:launch-agents consumes.
Watch one feature's PR in the background and auto-clean its agent, worktree, and branch once it merges. Use after a feature's PR is open to wire hands-off cleanup on merge (typically called by /hv:build-feature as its final step). It polls GitHub with exponential backoff and only triggers cleanup — the actual removal is done by /hv:clean-agents.
Prepare a parallel launch from a /hv:plan-features manifest — validate it, write a self-contained spec file per feature, and emit ready-to-paste `claude --bg` commands grouped into dependency waves for the human to run. Use after design when you're ready to run features in parallel. Does not spawn sessions itself (a session launching sessions is unsupported); it produces the exact launch commands. Each launched agent auto-isolates in its own git worktree.
Reviews PR changes against the broader codebase to find inconsistencies, missed propagation, and stale references beyond the diff. Replicates senior reviewer codebase knowledge. Activates when reviewing PRs, checking consistency, or when changes touch shared entities across multiple files.
Security review checklist for code changes. Automatically activates when reviewing security-sensitive code, authentication, authorization, or data handling. Use when user asks to "check security", "review for vulnerabilities", "audit code", or when changes touch auth, crypto, user input, or API endpoints.
| name | code-quality |
| description | 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". |
| allowed-tools | Read, Grep, Glob |
| metadata | {"author":"ken2403","version":"2.0.0"} |
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: