Context analysis
Skill yigityildiz0/universal-ai-skill-library/skills/common/context-analysis
Establish comprehensive understanding of project structure, architecture, dependencies, and current state before conducting detailed code review. Use as the.From its SKILL.md
npx -y skills add yigityildiz0/universal-ai-skill-library --skill context-analysisAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 24 days oldThe repository was created 24 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.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 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.
SKILL.md
5.2 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Code Review - Context Analysis
Establish comprehensive understanding of the project before conducting detailed code review. This skill is Phase 1 of the 6-phase code review methodology.
When to Use This Skill
Use this skill when you need to:
- Begin a comprehensive code review
- Onboard to an unfamiliar codebase
- Understand project architecture and design decisions
- Identify technical debt before detailed review
- Map dependencies and potential risks
- Plan follow-up review phases
Trigger phrases: "code review", "analyze codebase", "understand architecture", "project analysis", "technical due diligence", "codebase overview", "onboarding"
Review Mode Detection
This skill supports two modes:
- Full Codebase: Analyze the entire project structure, architecture, and dependencies
- Git Changes: Scope analysis to current git changes and their surrounding context
What This Skill Does
Analysis Areas
-
Repository Discovery
- Directory structure analysis
- Key files identification
- Documentation review
-
Architecture Understanding
- Entry points identification
- Design patterns recognition
- Module dependency mapping
-
Dependency Analysis
- External dependency listing
- Security vulnerability scan
- Outdated package detection
-
Build & Deployment
- Build system review
- CI/CD configuration
- Environment setup
-
Codebase Metrics
- Lines of code
- Complexity metrics
- Code duplication
Instructions
Step 1: Determine Review Mode
Full Codebase Mode:
# Get directory structure
tree -L 3 -I 'node_modules|venv|.venv|__pycache__|target|build'
# Identify key files
ls -la
# Read documentation
cat README.md
cat CONTRIBUTING.md
Git Changes Mode (Preflight):
# Scope the changes
git status -sb
git diff --stat
git diff
# Find related modules and usages
rg "function_name" --type-add 'src:*.{py,js,ts,java,go,cs,cpp}'
Edge Case Handling
- No changes detected: Inform the user and ask if they want to review staged changes (
git diff --cached) or a specific commit range - Large diff (>500 lines): Summarize changes by file first, then batch analysis by module or feature area
- Mixed concerns: Group findings by logical feature rather than file order
Step 2: Architecture Analysis
-
Identify Entry Points
- Look for main.py, index.js, Application.java
- Find CLI entry points
- Locate API endpoints
-
Map Design Patterns
- MVC, layered architecture
- Repository pattern
- Factory, singleton patterns
-
Trace Dependencies
- Internal module imports
- External library usage
-
Identify Critical Paths
- Authentication and authorization flows
- Payment or financial operations
- Data writes and mutations
- Network boundaries and external API calls
Step 3: Dependency Health Check
# Python
pip-audit
pip list --outdated
# JavaScript
npm audit
npm outdated
# Java
mvn versions:display-dependency-updates
Step 4: Generate Context Report
Create a report with:
- Executive summary
- Project structure
- Architecture analysis
- Dependency health
- Key findings
- Review focus recommendations
Output Template
# Code Review Context Analysis Report
**Project**: [Name]
**Date**: [Date]
**Reviewer**: [Name]
**Mode**: [Full Codebase / Git Changes]
## Executive Summary
- **Project Purpose**: [Description]
- **Primary Language**: [Language]
- **Architecture Style**: [Pattern]
## Project Structure
[Directory tree]
## Key Components
- Entry Points: [List]
- Core Modules: [List]
- External Interfaces: [APIs, CLI]
- Critical Paths: [Auth, payments, data writes, network]
## Dependency Health
- Total Dependencies: [Count]
- Outdated: [Count]
- Vulnerabilities: [Count]
## Key Findings
### Strengths
1. [Finding]
### Concerns
1. [Finding]
## Recommendations for Review Focus
1. [Area] - [Reason]
Quality Checklist
- Repository structure documented
- Entry points identified
- Architecture patterns recognized
- Dependencies analyzed
- Vulnerabilities checked
- Critical paths mapped
- Metrics collected
- Context report generated
Related Skills
code-quality- Code quality + SOLID + dead code review (Phase 2)security-review- Security analysis, 10-domain model (Phase 3)performance-review- Performance analysis (Phase 4)testing-review- Test assessment (Phase 5)final-report- Consolidated report with verdict (Phase 6)
Version: 2.0.0 Last Updated: February 2026 Based on: DevAI-Hub code review methodology + code-review-expert
Iterative Refinement Strategy
This skill is optimized for an iterative approach:
- Execute: Perform the core steps defined above.
- Review: Critically analyze the output (coverage, quality, completeness).
- Refine: If targets aren't met, repeat the specific implementation steps with improved context.
- Loop: Continue until the definition of done is satisfied.
What ships with it: 1 file
284 B alongside SKILL.md
agents/
- openai.yaml284 B