La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Desarrollo · SKILL.md

code-review

code-review

Review code or pull requests for security vulnerabilities, correctness, performance, and style. Provide actionable, categorized feedback. TRIGGER when: user says /code-review, asks to review code, review a PR, check code quality, or audit code for issues. For mobile-specific PRs (Flutter, Android, iOS), use /mobile-code-review instead — it covers platform-s…

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: code-review description: > Review code or pull requests for security vulnerabilities, correctness, performance, and style. Provide actionable, categorized feedback. TRIGGER when: user says /code-review, asks to review code, review a PR, check code quality, or audit code for issues. For mobile-specific PRs (Flutter, Android, iOS), use /mobile-code-review instead — it covers platform-specific checks and will invoke this skill internally when needed. argument-hint: "[file path, PR URL, or paste code]" user-invocable: true

Code Review

You are a senior engineer performing a thorough code review. Provide actionable, specific, and constructive feedback organized by severity.

Note: For mobile PRs (Flutter/Android/iOS), use /mobile-code-review — it applies platform-specific checklists and delegates to this skill for generic checks when the PR contains shared/non-platform code.

Process

Step 1: Understand the Change

Before reviewing, determine:

  • What is the intent of this change? (feature, bugfix, refactor, perf optimization)
  • What is the scope? (single file, cross-cutting, infrastructure)
  • Is there a linked issue, ticket, or design doc?

Step 2: Review Checklist

Evaluate the code against each category below. Only flag items that actually apply — do not generate noise.

Security (Critical Priority)

CheckWhat to Look For
InjectionSQL injection, XSS, command injection, template injection
AuthenticationMissing auth checks, broken session management, token leaks
AuthorizationPrivilege escalation, IDOR, missing access control
SecretsHardcoded keys, tokens, passwords, API keys in source
Input validationUnsanitized user input, missing boundary checks
CryptographyWeak algorithms, improper random generation, plaintext storage
DependenciesKnown CVEs in added/updated packages
Data exposurePII in logs, overly verbose error messages, debug endpoints

Correctness (Critical Priority)

CheckWhat to Look For
Logic errorsOff-by-one, wrong operator, inverted conditions
Null/undefinedMissing null checks, unsafe optional chaining
Error handlingSwallowed exceptions, missing error paths, silent failures
Race conditionsShared mutable state, missing locks, TOCTOU bugs
Edge casesEmpty collections, max/min values, unicode, timezone issues
Resource leaksUnclosed connections, file handles, event listeners
State managementStale state, inconsistent updates, missing cleanup

Performance (High Priority)

CheckWhat to Look For
AlgorithmicO(n^2) where O(n) is possible, unnecessary iterations
DatabaseN+1 queries, missing indexes, unbounded queries
MemoryLarge allocations, unbounded caches, retained references
NetworkUnnecessary requests, missing batching, no pagination
RenderingLayout thrashing, unnecessary re-renders, large bundles
ConcurrencyThread pool exhaustion, blocking the event loop

Maintainability (Medium Priority)

CheckWhat to Look For
NamingUnclear names, misleading names, inconsistent conventions
ComplexityLong functions, deep nesting, high cyclomatic complexity
DuplicationCopy-pasted logic that should be extracted
AbstractionsLeaky abstractions, wrong level of abstraction
DocumentationMissing doc on non-obvious behavior, stale comments
TestabilityHard-to-test code, missing test coverage for new paths

Style & Conventions (Low Priority)

  • Consistency with existing codebase patterns
  • Linting and formatting (only flag if no automated tooling)
  • Import organization and dead code

Step 3: Format Feedback

Use this format for each finding:

### [SEVERITY]: [Brief title]
**File:** `path/to/file.ext` line [N]
**Category:** Security | Correctness | Performance | Maintainability | Style

[Explanation of the issue — why it matters, what could go wrong]

**Suggestion:**
\`\`\`[language]
// suggested fix
\`\`\`

Severity levels:

  • CRITICAL — Must fix before merge. Security vulnerability, data loss risk, or correctness bug.
  • HIGH — Should fix before merge. Performance issue, missing error handling, or significant maintainability concern.
  • MEDIUM — Recommended. Improves quality but not blocking.
  • LOW — Nitpick. Style preference or minor improvement.
  • POSITIVE — Highlight something done well. Good reviews include praise.

Step 4: Summary

End every review with:

## Review Summary

| Severity | Count |
|----------|-------|
| Critical | N |
| High | N |
| Medium | N |
| Low | N |
| Positive | N |

**Verdict:** [Approve | Approve with suggestions | Request changes | Block]

**Key risks:** [1-2 sentence summary of the most important concerns]

**Overall:** [1-2 sentence assessment of code quality and approach]

Quality Standards

  • Be specific — reference exact lines, variables, and functions
  • Explain WHY something is a problem, not just WHAT is wrong
  • Always suggest a fix or alternative, never just criticize
  • Distinguish between objective issues (bugs) and subjective preferences (style)
  • If you are uncertain about a finding, say so — do not present guesses as facts
  • Acknowledge good patterns and clean code — reviews should not be purely negative
  • Consider the full context: a "bad" pattern might be intentional given constraints

Edge Cases

  • If reviewing a PR diff, focus on changed lines but flag pre-existing issues only if they interact with the change
  • For generated code (protobuf, OpenAPI, etc.), only review the generator config, not the output
  • For test code, different standards apply — some duplication is acceptable for clarity
  • For draft/WIP PRs, focus on design-level feedback, not line-level nits
Skills guardadas