MCP HubMCP Hub
스킬 목록으로 돌아가기

review-codebase

pjt222
업데이트됨 2 days ago
5 조회
17
2
17
GitHub에서 보기
메타design

정보

이 스킬은 전체 코드베이스에 대해 아키텍처, 보안, 코드 품질, UX/접근성을 한 번에 분석하는 포괄적이고 다단계의 리뷰를 수행합니다. 심각도 등급이 매겨진 발견 사항들의 우선순위 표를 출력하며, 이는 GitHub 이슈로 직접 변환되도록 구성되어 있습니다. 풀 리퀘스트와 같은 개별 변경 사항을 검토하기보다는 깊이 있고 체계적인 감사를 위해 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/review-codebase

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Review Codebase

Multi-phase deep codebase review producing severity-rated findings with fix-order recommendations. Unlike review-pull-request (scoped to a diff) or single-domain reviews (security-audit-codebase, review-software-architecture), this skill covers an entire project or subproject across all quality dimensions in one pass.

When to Use

  • Whole-project or subproject review (not PR-scoped)
  • New codebase onboarding — building a mental model of what exists and what needs attention
  • Periodic health checks after sustained development
  • Pre-release quality gate across architecture, security, code quality, and UX
  • When the output should feed directly into issue creation or sprint planning

Inputs

  • Required: target_path — root directory of the codebase or subproject to review
  • Optional:
    • scope — which phases to run: full (default), security, architecture, quality, ux
    • output_formatfindings (table only), report (narrative), both (default)
    • severity_threshold — minimum severity to include: LOW (default), MEDIUM, HIGH, CRITICAL

Procedure

Step 1: Census

Inventory the codebase to establish scope and identify review targets.

  1. Count files by language/type: find target_path -type f | sort by extension
  2. Measure total line counts per language
  3. Identify test directories and estimate test coverage (files with tests vs files without)
  4. Check dependency state: lockfiles present, outdated dependencies, known vulnerabilities
  5. Note build system, CI/CD configuration, and documentation state
  6. Record the census as the opening section of the report

Got: A factual inventory — file counts, languages, test presence, dependency health. No judgments yet.

If fail: If the target path is empty or inaccessible, stop and report. If specific subdirectories are inaccessible, note them and continue with what is available.

Step 2: Architecture Review

Assess structural health: coupling, duplication, data flow, and separation of concerns.

  1. Map the module/directory structure and identify the primary architectural pattern
  2. Check for code duplication — repeated logic across files, copy-paste patterns
  3. Assess coupling — how many files must change for a single feature modification
  4. Evaluate data flow — are there clear boundaries between layers (UI, logic, data)?
  5. Identify dead code, unused exports, and orphaned files
  6. Check for consistent patterns — does the codebase follow its own conventions?
  7. Rate each finding: CRITICAL, HIGH, MEDIUM, or LOW

Got: A list of architectural findings with severity ratings and file references. Common findings: mode dispatch duplication, missing abstraction layers, circular dependencies.

If fail: If the codebase is too small for meaningful architecture review (< 5 files), note this and skip to Step 3. Architecture review requires enough code to have structure.

Step 3: Security Audit

Identify security vulnerabilities and defensive coding gaps.

  1. Scan for injection vectors: HTML injection (innerHTML), SQL injection, command injection
  2. Check authentication and authorization patterns (if applicable)
  3. Review error handling — are errors silently swallowed? Do error messages leak internals?
  4. Audit dependency versions against known CVEs
  5. Check for hardcoded secrets, API keys, or credentials
  6. Review Docker/container security: root user, exposed ports, build secrets
  7. Check localStorage/sessionStorage for sensitive data storage
  8. Rate each finding: CRITICAL, HIGH, MEDIUM, or LOW

Got: A list of security findings with severity, affected files, and remediation guidance. CRITICAL findings include injection vulnerabilities and exposed secrets.

If fail: If no security-relevant code exists (pure documentation project), note this and skip to Step 4.

Step 4: Code Quality

Evaluate maintainability, readability, and defensive coding.

  1. Identify magic numbers and hardcoded values that should be named constants
  2. Check for consistent naming conventions across the codebase
  3. Find missing input validation at system boundaries
  4. Assess error handling patterns — are they consistent? Do they provide useful messages?
  5. Check for commented-out code, TODO/FIXME markers, and incomplete implementations
  6. Review test quality — are tests testing behavior or implementation details?
  7. Rate each finding: CRITICAL, HIGH, MEDIUM, or LOW

Got: A list of quality findings focused on maintainability. Common findings: magic numbers, inconsistent patterns, missing guards.

If fail: If the codebase is generated or minified, note this and adjust expectations. Generated code has different quality criteria than hand-written code.

Step 5: UX and Accessibility (if frontend exists)

Evaluate user experience and accessibility compliance.

  1. Check ARIA roles, labels, and landmarks on interactive elements
  2. Verify keyboard navigation — can all interactive elements be reached via Tab?
  3. Test focus management — does focus move logically when panels open/close?
  4. Check responsive design — test at common breakpoints (320px, 768px, 1024px)
  5. Verify color contrast ratios meet WCAG 2.1 AA standards
  6. Check screen reader compatibility — are dynamic content changes announced?
  7. Rate each finding: CRITICAL, HIGH, MEDIUM, or LOW

Got: A list of UX/a11y findings with WCAG references where applicable. If no frontend exists, this step produces "N/A — no frontend code detected."

If fail: If frontend code exists but cannot be rendered (missing build step), audit the source code statically and note that runtime testing was not possible.

Step 6: Findings Synthesis

Compile all findings into a prioritized summary.

  1. Merge findings from all phases into a single table
  2. Sort by severity (CRITICAL first, then HIGH, MEDIUM, LOW)
  3. Within each severity level, group by theme (security, architecture, quality, UX)
  4. For each finding, include: severity, phase, file(s), one-line description, suggested fix
  5. Produce a recommended fix order that considers dependencies between fixes
  6. Summarize: total findings by severity, top 3 priorities, estimated effort level

Got: A findings table with columns: #, Severity, Phase, File(s), Finding, Fix. A fix-order recommendation that accounts for dependencies (e.g., "refactor architecture before adding tests").

If fail: If no findings were produced, this is itself a finding — either the codebase is exceptionally clean or the review was too shallow. Re-examine at least one phase with deeper inspection.

Validation

  • All requested phases were completed (or explicitly skipped with justification)
  • Every finding has a severity rating (CRITICAL/HIGH/MEDIUM/LOW)
  • Every finding references at least one file or directory
  • The findings table is sorted by severity
  • Fix-order recommendations account for dependencies between findings
  • The summary includes total counts by severity
  • If output_format includes report, narrative sections accompany the table

Scaling with Rest

Between review phases, use /rest as a checkpoint — especially between phases 2-5, which require different analytical perspectives. A checkpoint rest (brief, transitional) prevents the momentum of one phase from biasing the next. See the rest skill's "Scaling Rest" section for guidance on checkpoint vs full rest.

Pitfalls

  • Boiling the ocean: Reviewing every line of a large codebase produces noise. Focus on high-impact areas: entry points, security boundaries, and architectural seams
  • Severity inflation: Not every finding is CRITICAL. Reserve CRITICAL for exploitable vulnerabilities and data-loss risks. Most architectural issues are MEDIUM
  • Missing the forest for the trees: Individual code quality issues matter less than systemic patterns. If magic numbers appear in 20 files, that is one architectural finding, not 20 quality findings
  • Skipping the census: The census (Step 1) seems bureaucratic but prevents reviewing code that does not exist or missing entire directories
  • Phase bleed: Security findings during architecture review, or quality findings during security audit. Note them for the correct phase rather than mixing concerns — it produces a cleaner findings table

Related Skills

  • security-audit-codebase — deep-dive security audit when the review-codebase security phase reveals complex vulnerabilities
  • review-software-architecture — detailed architecture review for specific subsystems
  • review-ux-ui — comprehensive UX/accessibility audit beyond what phase 5 covers
  • review-pull-request — diff-scoped review for individual changes
  • clean-codebase — implements the code quality fixes identified by this review
  • create-github-issues — converts findings table into tracked GitHub issues

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-lite/skills/review-codebase
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

content-collections

메타

이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.

스킬 보기

polymarket

메타

이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.

스킬 보기

creating-opencode-plugins

메타

이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.

스킬 보기

sglang

메타

SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.

스킬 보기