agentsclimarketplace

Role code review

Skill pecigonzalo/agent-skills/skills/role-code-review

Personal agent skills

Install
npx -y skills add pecigonzalo/agent-skills --skill role-code-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 21 days oldThe repository was created 21 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 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

Use this skill for pull request and code quality reviews, including pre-commit self-review. Provides systematic review methodology with severity categorization.

SKILL.md

8.5 KB, as published. Nobody here has run it

Provides: Systematic code review methodology, severity categorization, quality checklists, and feedback patterns.

Quick Reference

Golden Rule: Review code as you'd want yours reviewed - thoroughly but kindly

Checklist: Functionality, Code Quality, Security, Testing, Performance, Maintainability

Report Format: Summary, Assessment, Issues (πŸ”΄πŸŸ‘πŸ”΅), Positive Observations, Recommendations

Principles: Constructive, Thorough, Timely

Review Principles

Constructive: Focus on code not person, explain WHY, suggest improvements, acknowledge good practices

Thorough: Check functionality not just style, consider edge cases, think maintainability, look for security

Timely: Review promptly, don't block unnecessarily, prioritize critical issues

Review Checklist

Functionality

  • Does what it's supposed to do
  • Edge cases handled
  • Error cases handled
  • No obvious bugs

Code Quality

  • Clear, descriptive naming
  • Functions small and focused
  • No unnecessary complexity
  • Follows coding standards
  • DRY - no duplication

Security (Basic Checks)

  • No obvious security issues
  • Input validation present
  • No hardcoded secrets
  • Auth/authorization checks present

For comprehensive security review, use role-security-auditor skill

Testing

  • Tests present
  • Happy path covered
  • Edge cases covered
  • Error cases covered
  • All tests pass

Performance

  • No obvious performance issues
  • Efficient algorithms
  • No unnecessary operations
  • Resources properly managed

Maintainability

  • Easy to understand
  • Complex logic documented
  • Follows project conventions
  • Easy to modify/extend

Review Report Format

## Code Review: {Feature/PR Name}

**Summary:** {Brief overview}
**Assessment:** Approve / Needs Work / Requires Changes

---

### Issues Found

#### πŸ”΄ Critical (Must Fix)
- **File:** `src/auth.js:42`
  **Issue:** Password stored in plain text
  **Fix:** Hash password before storing

#### 🟑 Warnings (Should Fix)
- **File:** `src/user.js:15`
  **Issue:** No input validation
  **Fix:** Validate email format

#### πŸ”΅ Suggestions (Nice to Have)
- **File:** `src/utils.js:28`
  **Issue:** Could be more concise
  **Fix:** Use array methods instead of loop

---

### Positive Observations
- βœ… Good test coverage (95%)
- βœ… Clear function names
- βœ… Proper error handling

---

### Recommendations
{Next steps, improvements, follow-up items}

Common Issues

Security (Surface-Level)

πŸ”΄ Hardcoded credentials (obvious) πŸ”΄ Missing input validation πŸ”΄ Missing authentication/authorization

For comprehensive security review, use role-security-auditor skill

Code Quality

🟑 Large functions (>50 lines) 🟑 Deep nesting (>3 levels) 🟑 Code duplication 🟑 Unclear naming 🟑 Missing documentation 🟑 Inconsistent style

Testing

🟑 Missing tests 🟑 Low coverage (<80%) 🟑 Flaky tests 🟑 Tests testing implementation 🟑 No edge case coverage

Performance

πŸ”΅ Inefficient algorithms πŸ”΅ Unnecessary database queries πŸ”΅ Missing caching πŸ”΅ Large object allocations πŸ”΅ No lazy loading

Review Process

Before Reviewing

  • Understand the purpose of the changes
  • Read the PR description or requirements
  • Identify the files changed
  • Load relevant code standards
  • Check for related dependencies

During Review

  • Read through all changes
  • Check against code standards
  • Look for security issues first
  • Verify edge cases are handled
  • Check test coverage
  • Consider performance implications
  • Think about maintainability
  • Note positive patterns

After Review

  • Categorize issues by severity
  • Provide specific, actionable feedback
  • Explain WHY changes are needed
  • Suggest specific fixes
  • Acknowledge good work
  • Estimate effort for fixes
  • Provide overall assessment

Best Practices

βœ… Review within 24 hours βœ… Provide specific, actionable feedback βœ… Explain WHY, not just WHAT βœ… Suggest alternatives βœ… Acknowledge good work βœ… Use severity levels (Critical/Warning/Suggestion) βœ… Test the code if possible βœ… Check for security issues first βœ… Consider edge cases βœ… Think about future maintenance βœ… Be thorough but kind βœ… Prioritize critical issues βœ… Offer help with fixes

Security Review Checklist

For comprehensive security reviews, use the role-security-auditor skill.

For basic security checks during code review:

Input Validation

  • All user inputs validated
  • Type checking present
  • Sanitization for output

Authentication & Authorization

  • Proper authentication required
  • Resource ownership verified
  • Session management secure

Data Protection

  • No sensitive data in logs
  • Proper secret management

Example Review

## Code Review: User Authentication

**Summary:** Adds login, registration, and password reset functionality to the auth module.
**Assessment:** Needs Work

---

### Issues Found

#### πŸ”΄ Critical (Must Fix)
- **File:** `src/controllers/auth.js:45`
  **Issue:** Password stored in plain text
  **Fix:** Hash password using bcrypt before saving to database

- **File:** `src/routes/auth.js:23`
  **Issue:** SQL injection vulnerability in login query
  **Fix:** Use parameterized queries with prepared statements

#### 🟑 Warnings (Should Fix)
- **File:** `src/utils/validation.js:12`
  **Issue:** Email regex too permissive, allows invalid emails
  **Fix:** Use a more restrictive email validation pattern

- **File:** `src/services/email.js:8`
  **Issue:** No rate limiting on password reset requests
  **Fix:** Add rate limiting (e.g., 3 requests per hour per email)

#### πŸ”΅ Suggestions (Nice to Have)
- **File:** `src/controllers/auth.js:30`
  **Issue:** Function is 75 lines, could be split
  **Fix:** Extract email sending logic to separate function

- **File:** `src/models/user.js:15`
  **Issue:** Consider adding emailVerified field
  **Fix:** Add boolean field for email verification status

---

### Positive Observations
- βœ… Good separation of concerns (routes, controllers, services)
- βœ… Comprehensive error handling
- βœ… Good use of async/await
- βœ… Proper HTTP status codes
- βœ… Clear, descriptive function names
- βœ… Test coverage at 85%

---

### Recommendations
1. Fix critical security issues before merging
2. Add rate limiting to prevent abuse
3. Improve email validation
4. Consider adding email verification flow
5. Extract large functions for better readability
6. Add integration tests for complete auth flow

**Overall:** Good foundation but security issues must be addressed before deployment.

Review Assessment Levels

Approve

  • No critical issues
  • Minor warnings are optional improvements
  • Code is production-ready
  • Tests are comprehensive and passing

Needs Work

  • No critical issues
  • Some warnings that should be addressed
  • Code is close to production-ready
  • Minor fixes needed before merge

Requires Changes

  • Critical issues present
  • Major concerns with functionality or security
  • Code not ready for production
  • Significant work needed

Feedback Style Guidelines

Constructive Feedback

  • Focus on the code, not the person
  • Provide specific examples
  • Explain the impact of the issue
  • Suggest concrete improvements
  • Offer to help with implementation

Tone Examples

❌ Too harsh: "This is terrible code. You don't understand security at all."

βœ… Constructive: "I notice the password is stored in plain text. This creates a security vulnerability where user passwords could be exposed if the database is compromised. I recommend using bcrypt to hash passwords before storing them."

❌ Too vague: "This function is too long."

βœ… Constructive: "The authenticateUser function is 75 lines long, which makes it harder to test and maintain. Consider extracting the email sending logic into a separate function, which would improve readability and make it easier to test each piece independently."

When to Escalate

Escalate to team or security team when:

  • Critical security vulnerabilities found
  • Architectural concerns beyond scope of review
  • Potential legal or compliance issues
  • Major disagreements on approach
  • Need for security audit

Golden Rule: Review code as you'd want yours reviewed - thoroughly but kindly.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.