Agent skill
code-review
Provides code review guidelines, checklists, and best practices for reviewing pull requests. Use when reviewing code, preparing for code review, or when users mention "code review", "review PR", "review checklist", or "code quality".
Install this agent skill to your Project
npx add-skill https://github.com/IHKREDDY/agent-skills-ts/tree/main/skills/code-review
Metadata
Additional technical details for this skill
- author
- IHKREDDY
- version
- 1.0
- category
- development
SKILL.md
Code Review Skill
When to Use This Skill
Use this skill when:
- Reviewing a pull request
- Preparing code for review
- Looking for code review best practices
- Users mention "code review", "review PR", or "review checklist"
Code Review Checklist
1. Functionality
- Code does what the ticket/PR description says
- Edge cases are handled
- Error handling is appropriate
- No obvious bugs or logic errors
2. Code Quality
- Code is readable and self-documenting
- Functions/methods are focused and small
- No code duplication (DRY principle)
- Naming is clear and consistent
- No dead code or commented-out code
3. Architecture
- Changes follow existing patterns
- No unnecessary dependencies added
- Separation of concerns maintained
- SOLID principles followed
4. Testing
- Unit tests added for new code
- Tests cover edge cases
- All tests pass
- Test names are descriptive
5. Security
- No hardcoded secrets or credentials
- Input validation present
- No SQL injection vulnerabilities
- Authentication/authorization checked
6. Performance
- No obvious performance issues
- Database queries are optimized
- No unnecessary loops or iterations
- Caching considered where appropriate
7. Documentation
- Public APIs are documented
- Complex logic has comments
- README updated if needed
- Breaking changes documented
Review Comment Guidelines
Be Constructive
Good: "Consider using a dictionary here for O(1) lookup instead of a list." Bad: "This is slow."
Explain Why
Good: "This could cause a null reference exception if user is null. Consider adding a null check."
Bad: "Add null check."
Suggest Solutions
Good: "You could simplify this with LINQ: users.Where(u => u.IsActive).ToList()"
Bad: "Simplify this."
Use Questions for Preferences
Good: "What do you think about extracting this into a separate method?" Bad: "Extract this."
Review Process
- Understand Context: Read the ticket/PR description first
- High-Level Pass: Review overall structure and approach
- Detailed Review: Line-by-line review for issues
- Test Coverage: Verify tests are adequate
- Documentation: Check for necessary documentation
- Approve or Request Changes: Provide clear feedback
Language-Specific Guidelines
C# / .NET
- Follow Microsoft naming conventions
- Use async/await properly
- Dispose IDisposable resources
- Use nullable reference types
TypeScript / JavaScript
- Avoid
anytype - Use const/let, not var
- Handle promises properly
- Use optional chaining and nullish coalescing
Python
- Follow PEP 8 style guide
- Use type hints
- Handle exceptions appropriately
- Use context managers for resources
Common Issues to Watch For
| Issue | What to Look For |
|---|---|
| Memory Leaks | Unsubscribed events, unclosed connections |
| Race Conditions | Shared state in async code |
| N+1 Queries | Database queries in loops |
| Magic Numbers | Unexplained numeric constants |
| Long Methods | Methods > 50 lines |
| Deep Nesting | More than 3 levels of indentation |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tech-debt-report
Find TODOs, deprecated APIs, and outdated patterns in codebase
sprint-summary
Generate sprint review summary from completed Jira tickets
api-integration
Design and implement REST API integrations with proper error handling, authentication, rate limiting, and testing. Use when building API clients, integrating third-party services, or when users mention API, REST, webhooks, HTTP requests, or service integration.
work-on-ticket
Pulls ticket details from Jira, creates feature branches with proper naming conventions, and handles planning steps. Use when starting work on a Jira ticket, creating branches for tickets, or when users mention "work on ticket", "start ticket", "create branch for", or Jira ticket IDs.
hotfix-workflow
Rapid hotfix branch creation, fix application, and PR to main
create-ticket
Creates Jira tickets with proper formatting, acceptance criteria, and optionally sets up git branches and pull requests. Use when users want to create a new ticket, log a bug, request a feature, or when they mention "create ticket", "new ticket", "log issue", "file bug", or "create Jira".
Didn't find tool you were looking for?