code-review

supercent-io/skills-template · updated May 29, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/supercent-io/skills-template --skill code-review
0 commentsdiscussion
summary

Structured code review framework covering quality, security, performance, and testing standards.

  • Provides eight-step review methodology: context understanding, high-level architecture assessment, detailed code inspection, security audit, performance analysis, testing validation, documentation check, and constructive feedback delivery
  • Covers SOLID principles, naming conventions, error handling, input validation, authentication/authorization, SQL injection and XSS prevention, and resource
skill.md

Code Review

When to use this skill

  • Reviewing pull requests
  • Checking code quality
  • Providing feedback on implementations
  • Identifying potential bugs
  • Suggesting improvements
  • Security audits
  • Performance analysis

Instructions

Step 1: Understand the context

Read the PR description:

  • What is the goal of this change?
  • Which issues does it address?
  • Are there any special considerations?

Check the scope:

  • How many files changed?
  • What type of changes? (feature, bugfix, refactor)
  • Are tests included?

Step 2: High-level review

Architecture and design:

  • Does the approach make sense?
  • Is it consistent with existing patterns?
  • Are there simpler alternatives?
  • Is the code in the right place?

Code organization:

  • Clear separation of concerns?
  • Appropriate abstraction levels?
  • Logical file/folder structure?

Step 3: Detailed code review

Naming:

  • Variables: descriptive, meaningful names
  • Functions: verb-based, clear purpose
  • Classes: noun-based, single responsibility
  • Constants: UPPER_CASE for true constants
  • Avoid abbreviations unless widely known

Functions:

  • Single responsibility
  • Reasonable length (< 50 lines ideally)
  • Clear inputs and outputs
  • Minimal side effects
  • Proper error handling

Classes and objects:

  • Single responsibility principle
  • Open/closed principle
  • Liskov substitution principle
  • Interface segregation
  • Dependency inversion

Error handling:

  • All errors caught and handled
  • Meaningful error messages
  • Proper logging
  • No silent failures
  • User-friendly errors for UI

Code quality:

  • No code duplication (DRY)
  • No dead code
  • No commented-out code
  • No magic numbers
  • Consistent formatting

Step 4: Security review

Input validation:

  • All user inputs validated
  • Type checking
  • Range checking
  • Format validation

Authentication & Authorization:

  • Proper authentication checks
  • Authorization for sensitive operations
  • Session management
  • Password handling (hashing, salting)

Data protection:

  • No hardcoded secrets
  • Sensitive data encrypted
  • SQL injection prevention
  • XSS prevention
  • CSRF protection

Dependencies:

  • No vulnerable packages
  • Dependencies up-to-date
  • Minimal dependency usage

Step 5: Performance review

Algorithms:

  • Appropriate algorithm choice
  • Reasonable time complexity
  • Reasonable space complexity
  • No unnecessary loops

Database:

  • Efficient queries
  • Proper indexing
  • N+1 query prevention
  • Connection pooling

Caching:

  • Appropriate caching strategy
  • Cache invalidation handled
  • Memory usage reasonable

Resource management:

  • Files properly closed
  • Connections released
  • Memory leaks prevented

Step 6: Testing review

Test coverage:

  • Unit tests for new code
  • Integration tests if needed
  • Edge cases covered
  • Error cases tested

Test quality:

  • Tests are readable
  • Tests are maintainable
  • Tests are deterministic
  • No test interdependencies
  • Proper test data setup/teardown

Test naming:

# Good
def test_user_creation_with_valid_data_succeeds():
    pass

# Bad
def test1():
    pass

Step 7: Documentation review

Code comments:

  • Complex logic explained
  • No obvious comments
  • TODOs have tickets
  • Comments are accurate

Function documentation:

def calculate_total(items: List[Item], tax_rate: float) -> Decimal:
    """
    Calculate the total price including tax.

    Args:
        items: List of items to calculate total for
        tax_rate: Tax rate as decimal (e.g., 0.1 for 10%)

    Returns:
        Total price including tax

    Raises:
        ValueError: If tax_rate is negative
    """
    pass

README/docs:

  • README updated if needed
  • API docs updated
  • Migration guide if breaking changes

Step 8: Provide feedback

Be constructive:

✅ Good:
"Consider extracting this logic into a separate function for better
testability and reusability:

def validate_email(email: str) -> bool:
    return '@' in email and '.' in email.split('@')[1]

This would make it easier to test and reuse across the codebase."

❌ Bad:
"This is wrong. Rewrite it."

Be specific:

✅ Good:
"On line 45, this query could cause N+1 problem. Consider using
.select_related('author') to fetch related objects in a single query."

❌ Bad:
"Performance issues here."

Prioritize issues:

  • 🔴 Critical: Security, data loss, major bugs
  • 🟡 Important: Performance, maintainability
  • 🟢 Nice-to-have: Style, minor improvements

Acknowledge good work:

"Nice use of the strategy pattern here! This makes it easy to add
new payment methods in the future."

Review checklist

Functionality

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

Code Quality

  • Clear, descriptive naming
  • Functions are small and focused
  • No code duplication
  • Consistent with codebase style
  • No code smells

Security

  • Input validation
  • No hardcoded secrets
  • Authentication/authorization
  • No SQL injection vulnerabilities
  • No XSS vulnerabilities

Performance

  • No obvious bottlenecks
  • Efficient algorithms
  • Proper database queries
  • Resource management

Testing

  • Tests included
  • Good test coverage
  • Tests are maintainable
  • Edge cases tested

Documentation

  • Code is self-documenting
  • Comments where needed
  • Docs updated
  • Breaking changes documented

Common issues

Anti-patterns

God class:

# Bad: One class doing everything
class UserManager:
    def create_user(self): pass
    def send_email(self): pass
    def process_payment(self): pass
    def generate_report(self): pass

Magic numbers:

# Bad
if user.age > 18:
    pass

# Good
MINIMUM_AGE = 18
if user.age > MINIMUM_AGE:
    pass

Deep nesting:

# Bad
if condition1:
    if condition2:
        if condition3:
            if condition4:
                # deeply nested code

# Good (early returns)
if not condition1:
    return
if not condition2:
    return
if not condition3:
    return
if not condition4:
    return
# flat code

Security vulnerabilities

SQL Injection:

# Bad
query = f"SELECT * FROM users WHERE id = {user_id}"

# Good
query = "SELECT * FROM users WHERE id = %s"
cursor.execute(query, (user_id,))

XSS:

// Bad
element.innerHTML = userInput;

// Good
element.textContent = userInput;

Hardcoded secrets:

# Bad
API_KEY = "sk-1234567890abcdef"

# Good
API_KEY = os.environ.get("API_KEY")

Best practices

  1. Review promptly: Don't make authors wait
  2. Be respectful: Focus on code, not the person
how to use code-review

How to use code-review on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add code-review
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/supercent-io/skills-template --skill code-review

The skills CLI fetches code-review from GitHub repository supercent-io/skills-template and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/code-review

Reload or restart Cursor to activate code-review. Access the skill through slash commands (e.g., /code-review) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.749 reviews
  • Henry Martin· Dec 28, 2024

    Keeps context tight: code-review is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Pratham Ware· Dec 16, 2024

    code-review reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Jin Taylor· Dec 16, 2024

    I recommend code-review for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Chaitanya Patil· Dec 8, 2024

    Solid pick for teams standardizing on skills: code-review is focused, and the summary matches what you get after install.

  • Jin Brown· Dec 4, 2024

    code-review is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Piyush G· Nov 27, 2024

    We added code-review from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ava Martin· Nov 23, 2024

    Useful defaults in code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Henry Farah· Nov 19, 2024

    I recommend code-review for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • James Brown· Nov 7, 2024

    Keeps context tight: code-review is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Min Abbas· Oct 26, 2024

    code-review is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 49

1 / 5