Tpl situacao code review assistant

From artubss/SKILLS-CLAUDE-CODE · View interactive version

Tpl situacao code review assistant is an AI agent skill from the GitHub repository artubss/SKILLS-CLAUDE-CODE. Template do pack (situacao/05-code-review-assistant.md). Orienta o agente em tarefas situacionais como debug, seguranca e refactor alinhado a esse contexto.

How to use this skill

Skill file

SITUATION: Systematic Code Review

Skill gerado a partir do pack templates-claude-code. Arquivo de origem: situacao/05-code-review-assistant.md. Use como baseline e adapte ao projeto antes de mudancas grandes.

Conteudo do template

CONTEXT

Use this configuration when conducting or receiving code reviews — Pull Requests, Merge Requests, or any structured review of proposed changes. The goal is not to find fault but to improve code quality, catch bugs before production, share knowledge, and maintain consistency. Reviews should be efficient, constructive, and focused on the code, not the author.

OBJECTIVES

APPROACH RULES

  1. Review the diff, not the author. Keep all feedback about the code. Use "this function" not "you wrote." Frame feedback as questions when uncertain.
  1. Review in layers, not in one pass. First pass: understand the change at a high level (read the PR description, tests, then code). Second pass: correctness and logic. Third pass: style, naming, and consistency.
  1. Distinguish blocking from non-blocking.
  1. PR size matters. A PR over 400 lines of changed code is hard to review effectively. If asked to review a large PR, flag it and suggest splitting it. Review large PRs in sections, not all at once.
  1. Check the tests first. If there are no tests for new behavior, that's the most important thing to flag. Understanding the tests usually clarifies the intent of the code.
  1. Verify acceptance criteria. Does the code actually do what the ticket/story asked for? Is there a way to verify it manually?

ROUTING TABLE

| If you encounter | Then |

|-----------------|------|

| No tests for new logic | [BLOCKING] Request tests. Specify which cases need coverage: happy path, error cases, edge cases |

| A function over 40 lines | [SUGGESTION] Ask what each section does. Often leads to natural extraction. |

| Complex conditional logic | [QUESTION] Ask the author to explain the logic. If they can't quickly, it needs refactoring |

| Hardcoded values (URLs, IDs, magic numbers) | [BLOCKING] or [SUGGESTION] depending on production risk. Ask: what happens when this changes? |

| Missing error handling | [BLOCKING] — unhandled Promise rejections, bare catch blocks, ignored return codes |

| Security-sensitive code (auth, crypto, user input) | Always block. Tag as [SECURITY]. Apply full OWASP pattern review |

| Duplicate code that already exists | [SUGGESTION] Point to the existing utility. No need to duplicate. |

| console.log or debug code | [BLOCKING] — never merge debug artifacts to main |

| Commented-out code | [BLOCKING] — delete it or explain why it's staying |

| Missing or incorrect type annotations | [SUGGESTION] in typed codebases or [BLOCKING] if types are a team standard |

Review Checklist

Correctness

Security

Performance

Readability

Tests

DO NOT

OUTPUT FORMAT

For each review, structure comments as:

[BLOCKING] The `getUser` function does not handle the case where `userId` is undefined.
If `userId` is undefined, the database query will return unintended results.

Suggestion:
if (!userId) throw new Error('userId is required')

For a PR summary comment:

## Review Summary

**Overall:** Approve with minor changes / Request changes

**Highlights:**
- Clean separation between service and controller layer
- Good error handling in the webhook handler

**Blocking Issues (2):**
- Missing auth check on DELETE /api/posts/:id
- No test for the rate limiting logic

**Suggestions (3):**
- Extract the email template to a separate file
- `processData` function could be named more specifically
- Missing JSDoc on the public-facing `UserService` class

QUALITY GATES

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.