Code review assistant
Skill timwukp/agent-skills-best-practice/skills/skills/code-review-assistant
35 portable agent skills (Agent Skills spec) for Kiro & Claude Code: Scrum DevSecOps roles, PCI-DSS/MAS TRM compliance, AWS Well-Architected reviews — each with evals and a 4-layer tested methodology
npx -y skills add timwukp/agent-skills-best-practice --skill code-review-assistantAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Analyzes code changes for security vulnerabilities, performance issues, and maintainability concerns. Provides structured feedback with SOLID principle checks and anti-pattern detection. Triggers on: "review this code", "code review", "check my PR", "review my changes".
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.4 KB, as published. Nobody here has run it
Code Review Assistant
Instructions
Step 1: Gather Context
Before reviewing, determine:
- What language and framework is the code written in?
- Is this a PR diff, a single file, or a full module?
- What is the review scope? (Security | Performance | Maintainability | All)
If reviewing a PR, ask for the diff or file list. If a single file, ask for the surrounding context (what calls it, what it calls).
Step 2: Security Analysis
Check for these categories in order of severity:
Critical:
- SQL injection (string concatenation in queries)
- Command injection (unsanitized shell commands)
- Path traversal (user input in file paths without validation)
- Hardcoded secrets (API keys, passwords, tokens)
High:
- Missing authentication/authorization checks
- Insecure deserialization
- SSRF vulnerabilities (user-controlled URLs)
- Missing input validation on public endpoints
Medium:
- Missing rate limiting on public APIs
- Verbose error messages leaking internals
- Missing CSRF protection
- Insecure random number generation for security contexts
Step 3: Performance Review
Look for:
- N+1 queries - database calls inside loops
- Unbounded collections - loading all records without pagination
- Missing indexes - queries filtering on non-indexed columns
- Unnecessary allocations - creating objects in hot paths
- Blocking I/O - synchronous calls in async contexts
- Missing caching - repeated expensive computations with same inputs
Step 4: SOLID Principles Check
Evaluate each principle:
| Principle | Red Flag |
|---|---|
| Single Responsibility | Class has multiple reasons to change |
| Open/Closed | Modifying existing code instead of extending |
| Liskov Substitution | Subclass breaks parent contract |
| Interface Segregation | Forcing implementation of unused methods |
| Dependency Inversion | High-level module depends on concrete class |
Only flag violations that cause real maintainability problems, not theoretical ones.
Step 5: Anti-Pattern Detection
Check for:
- God objects - classes with more than 10 public methods or 300+ lines
- Feature envy - methods that use another class's data more than their own
- Primitive obsession - using strings/ints where a value object improves clarity
- Long parameter lists - functions with more than 4 parameters
- Deep nesting - more than 3 levels of indentation in conditionals
Step 6: Produce Structured Feedback
Format findings as:
## Code Review Summary
**Risk Level:** Critical | High | Medium | Low
### Findings
#### [Category] Finding Title
- **Location:** file:line
- **Severity:** Critical | High | Medium | Low
- **Issue:** What is wrong
- **Impact:** What could happen
- **Fix:** Concrete suggestion with code
### Positive Observations
- List things done well (always include at least one)
### Recommendations
1. Prioritized action items
STOP after producing the summary. Ask if the user wants deeper analysis on any specific finding.
Example
User says: "Review this Python function"
def get_user(user_id):
query = f"SELECT * FROM users WHERE id = {user_id}"
result = db.execute(query)
return result
Response:
- Critical: SQL Injection at line 2 - string interpolation in SQL query
- Medium: Overfetching - SELECT * returns all columns
- Fix: Use parameterized queries:
db.execute("SELECT id, name, email FROM users WHERE id = ?", [user_id])
Guidelines
- Always start with security findings, then performance, then style
- Be specific with line numbers and concrete fix suggestions
- Do not nitpick formatting or style unless it impacts readability significantly
- Acknowledge good patterns alongside problems
- If the code is already good, say so briefly and suggest one area for further improvement
- Limit findings to the top 5 most impactful issues unless asked for exhaustive review
- Never suggest changes that alter business logic without flagging it as a behavioral change