agentleFS
gurdasnijorgurdasnijor/claude-skills-2/skills/engineering-team/code-reviewer/SKILL.md

code-reviewer

Skill0 starsChanged 12 months agoMITView on GitHub

Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go. Includes automated code analysis, best practice checking, security scanning, and review checklist generation. Use when reviewing pull requests, providing code feedback, identifying issues, or ensuring code quality standards.

  • Installs packages

129 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use sql-query-expert, git-doc-updater and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Marine-softdrink524Skill

    sql-query-expert

    Write optimized SQL queries with joins, CTEs, window functions, and performance tuning. Based on Anthropic's Claude Cookbooks.

    Also in 3 projects that use this

  • u9401066Skill

    git-doc-updater

    Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.

    Also in 3 projects that use this

  • u9401066Skill

    git-precommit

    Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.

    Also in 3 projects that use this

  • JeffallanSkill

    secure-code-guardian

    Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.

    Also in 4 projects that use this

  • alirezarezvaniSkill

    readme-updater

    Keep README files current with project changes. Use when project structure changes, features added, or setup instructions modified. Suggests README updates based on code changes. Triggers on significant project changes, new features, dependency changes.

    Also in 4 projects that use this

  • JohnJBorenSkill

    test-engineer

    Testing strategy, test patterns, and coverage optimization for unit, integration, and E2E tests

    Also in 9 projects that use this

  • +3 more from u9401066

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 111 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use questions to guide learning

    line 350
  2. Very specific:

    Tool usage: Run any script with --help flag

    line 409

“Common” is measured: kept by at least 6 in 10 of the 111 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Reviewer

Expert code review skill with automated analysis tools for modern programming languages. Provides comprehensive review checklists, coding standards enforcement, and anti-pattern detection across TypeScript, JavaScript, Python, Swift, Kotlin, and Go.

Overview

This skill delivers production-ready code review capabilities through three Python automation tools and extensive reference documentation. Whether conducting pull request reviews, enforcing coding standards, or identifying common anti-patterns, this skill ensures consistent, high-quality code across your team.

Use this skill when:

  • Reviewing pull requests for quality and security
  • Enforcing language-specific coding standards
  • Identifying common anti-patterns and code smells
  • Generating comprehensive review reports
  • Training team members on best practices

Quick Start

Analyze a Pull Request

# Basic PR analysis
python scripts/pr_analyzer.py 123 --repo=company/project

# Full quality check on codebase
python scripts/code_quality_checker.py ./src --language=typescript

# Generate comprehensive review report
python scripts/review_report_generator.py 123 --format=markdown

Access Documentation

  • Review Checklist: references/code_review_checklist.md
  • Coding Standards: references/coding_standards.md
  • Anti-Patterns Guide: references/common_antipatterns.md

Core Capabilities

  • Automated Pull Request Analysis - Comprehensive PR analysis with metrics, complexity scores, and review priority recommendations
  • Multi-Language Code Quality Checking - Support for TypeScript, JavaScript, Python, Swift, Kotlin, and Go with SOLID principles validation
  • Security Vulnerability Detection - Identify SQL injection, XSS, authentication issues, and other security concerns
  • Best Practice Enforcement - Language-specific coding standards, naming conventions, and patterns
  • Anti-Pattern Detection - Catalog of common anti-patterns across languages, databases, and testing
  • Automated Review Report Generation - Detailed, actionable reports with categorized findings and feedback suggestions

Python Tools

1. PR Analyzer

Automated pull request analysis with comprehensive metrics and insights.

Features:

  • Code diff analysis and impact assessment
  • Complexity metrics calculation
  • Test coverage evaluation
  • Security vulnerability detection
  • Breaking change identification
  • Review priority recommendations

Usage:

python scripts/pr_analyzer.py <pr-number> [--repo=owner/name]
python scripts/pr_analyzer.py 123 --repo=company/project --json

Output:

PR Analysis Report (#123):
- Files Changed: 12 files
- Lines Changed: +245 / -87
- Complexity Score: Medium (6/10)
- Test Coverage Impact: +3%
- Security Concerns: 1 medium issue
- Review Priority: High
- Estimated Review Time: 45 minutes

Recommendations:
1. Review authentication changes carefully (security-critical)
2. Verify test coverage for new UserService methods
3. Consider breaking into smaller PRs (>300 lines)

2. Code Quality Checker

Comprehensive code analysis across multiple languages with actionable recommendations.

Features:

  • Multi-language support (TS/JS/Python/Swift/Kotlin/Go)
  • SOLID principles validation
  • Code smell detection
  • Performance issue identification
  • Documentation quality assessment
  • Configurable rulesets

Usage:

python scripts/code_quality_checker.py <path> [--language=typescript]
python scripts/code_quality_checker.py ./src --verbose --json

Checks:

  • Cyclomatic complexity
  • Function/method length
  • Code duplication
  • Naming conventions
  • Error handling patterns
  • Test coverage

3. Review Report Generator

Generate detailed, actionable review reports with categorized findings.

Features:

  • Multi-level issue categorization (blocking/major/minor)
  • Language-specific best practice checks
  • Security vulnerability assessment
  • Performance concern flagging
  • Markdown/JSON output formats
  • Automated feedback suggestions

Usage:

python scripts/review_report_generator.py <pr-number> [options]
python scripts/review_report_generator.py 123 --format=markdown

Reference Documentation

Detailed guides available in the references/ directory:

Code Review Checklist

code_review_checklist.md - Comprehensive review guide covering:

  • Pre-review preparation and context gathering
  • Code quality assessment (functionality, readability, maintainability)
  • Language-specific checklists (TypeScript/JavaScript, Python, Swift, Kotlin, Go)
  • Testing requirements and best practices
  • Security review checklist (injection, auth, data protection)
  • Architecture and scalability considerations
  • Documentation standards
  • Git workflow and commit quality
  • Performance optimization checks
  • Feedback guidelines and review priorities

Coding Standards

coding_standards.md - Language-specific standards including:

  • Naming conventions across all supported languages
  • TypeScript/JavaScript best practices and modern patterns
  • React-specific standards (hooks, components, performance)
  • Python PEP 8 compliance and Pythonic patterns
  • Swift optionals handling and protocol-oriented design
  • Kotlin null safety and data classes
  • Go error handling and interfaces
  • Code formatting and file organization
  • Documentation standards (JSDoc, docstrings)
  • Linting and formatting tool recommendations

Common Anti-Patterns

common_antipatterns.md - Catalog of anti-patterns to avoid:

  • General anti-patterns (God objects, magic numbers, deep nesting, premature optimization)
  • TypeScript/JavaScript issues (callback hell, 'any' type abuse, React prop mutations)
  • Python problems (mutable defaults, bare except, context manager neglect)
  • Swift pitfalls (force unwrapping, retain cycles, IUO overuse)
  • Kotlin concerns (null assertion abuse, data class neglect)
  • Go mistakes (error ignoring, defer neglect, goroutine leaks)
  • Database anti-patterns (N+1 queries, missing indexes, SELECT *)
  • Security vulnerabilities (SQL injection, plaintext passwords, secret exposure)
  • Performance issues (unnecessary re-renders, bulk loading)
  • Testing anti-patterns (implementation testing, test interdependence)

Key Workflows

Workflow 1: Pull Request Review

# 1. Analyze the PR
python scripts/pr_analyzer.py 123 --repo=company/project

# 2. Review changed files with quality checker
python scripts/code_quality_checker.py ./src --language=typescript

# 3. Generate comprehensive review report
python scripts/review_report_generator.py 123 --format=markdown

# 4. Review output and provide feedback using checklist
# Reference: references/code_review_checklist.md

Workflow 2: Codebase Quality Audit

# 1. Run quality checker on entire codebase
python scripts/code_quality_checker.py ./ --verbose

# 2. Identify anti-patterns
grep -r "any" src/**/*.ts  # TypeScript: avoid 'any'
grep -r "except:" src/**/*.py  # Python: check bare excepts

# 3. Generate comprehensive report
python scripts/code_quality_checker.py ./ --json > quality-report.json

# 4. Prioritize fixes
# Review report and tackle blocking/major issues first

Workflow 3: Team Standards Enforcement

# 1. Configure linters based on standards
# ESLint for TypeScript/JavaScript
# pylint/flake8 for Python
# SwiftLint for Swift
# Reference: references/coding_standards.md

# 2. Setup pre-commit hooks
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
python scripts/code_quality_checker.py $(git diff --cached --name-only)
EOF
chmod +x .git/hooks/pre-commit

# 3. Add CI/CD quality gates
# GitHub Actions example:
# - name: Code Quality Check
#   run: python scripts/code_quality_checker.py ./src

Language Support

TypeScript/JavaScript

  • Type safety validation
  • React patterns and hooks
  • Async/await best practices
  • Modern ES6+ features
  • ESLint/Prettier integration

Python

  • PEP 8 compliance
  • Type hints validation
  • Pythonic patterns
  • Context managers
  • Import organization

Swift

  • Optional safety
  • Protocol-oriented design
  • Memory management
  • SwiftLint integration

Kotlin

  • Null safety
  • Data classes
  • Coroutines
  • Extension functions

Go

  • Error handling
  • Goroutine management
  • Interface design
  • Idiomatic Go

Best Practices Summary

Review Priorities

  1. Security - SQL injection, XSS, authentication issues
  2. Correctness - Logic errors, edge case handling
  3. Performance - N+1 queries, memory leaks, inefficient algorithms
  4. Maintainability - Code clarity, documentation, test coverage
  5. Style - Formatting, naming conventions (automated preferred)

Common Red Flags

  • Functions >50 lines
  • Cyclomatic complexity >10
  • Test coverage <70%
  • No error handling
  • Hardcoded secrets
  • Commented-out code
  • Missing documentation

Effective Feedback

DO:

  • Be constructive and specific
  • Explain the "why" behind suggestions
  • Acknowledge good practices
  • Suggest alternatives
  • Use questions to guide learning

DON'T:

  • Focus on personal preferences
  • Be vague or unclear
  • Nitpick trivial issues
  • Assume bad intentions
  • Skip positive feedback

Integration

CI/CD Pipeline

# .github/workflows/code-review.yml
name: Code Review
on: [pull_request]

jobs:
  quality-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
      - name: Run Quality Checker
        run: python scripts/code_quality_checker.py ./src
      - name: Generate Report
        run: python scripts/review_report_generator.py ${{ github.event.pull_request.number }}

Pre-commit Hooks

# Install pre-commit framework
pip install pre-commit

# Add .pre-commit-config.yaml
hooks:
  - repo: local
    hooks:
      - id: code-quality
        name: Code Quality Check
        entry: python scripts/code_quality_checker.py
        language: system

Additional Resources

  • Review Checklist: references/code_review_checklist.md
  • Coding Standards: references/coding_standards.md
  • Anti-Patterns: references/common_antipatterns.md
  • Python Tools: scripts/ directory

Getting Help

  1. Review guidelines: See code_review_checklist.md
  2. Language standards: Consult coding_standards.md
  3. Pattern recognition: Review common_antipatterns.md
  4. Tool usage: Run any script with --help flag

Version: 1.0.0 Last Updated: 2025-11-08 Documentation Structure: Progressive disclosure with references/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.