From pr
Generate comprehensive technical snapshot of a codebase using code-explorer agents for deep analysis. Reads existing checkpoints, PRDs, RFDs, and references to build context. Saves to .claude/checkpoints/checkpoint-N/snapshot.md with auto-incrementing checkpoint numbers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pr:create-snapshotThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a comprehensive technical snapshot of a codebase that serves as a complete handoff document for developers unfamiliar with the project, using code-explorer agents for deep analysis.
Generate a comprehensive technical snapshot of a codebase that serves as a complete handoff document for developers unfamiliar with the project, using code-explorer agents for deep analysis.
This skill launches 4 code-explorer agents in parallel for deep codebase analysis. Each agent focuses on a different dimension (architecture, features, dev context, UI/UX) and returns findings independently.
Default: subagents. Snapshot exploration agents are independent — each analyzes a different aspect of the codebase and reports key files. There is no need for inter-agent communication since findings are synthesized by you after all agents complete.
When agent teams could help: For very large codebases where exploration agents might benefit from sharing discoveries in real-time (e.g., the architecture agent finding a pattern that the feature agent should trace differently). In practice, this is rare — subagents are sufficient for nearly all snapshot generation tasks.
If the calling command passes --team, respect that flag and launch agents as a team. Otherwise, use subagents.
Goal: Identify project root
Target Directory: $ARGUMENTS
$ARGUMENTS is provided, use that path as the project rootOutput Location: {project_root}/.claude/checkpoints/checkpoint-{N}/snapshot.md
Goal: Detect whether this is an existing codebase being onboarded vs. a new project, and set up checkpoint structure accordingly
Actions:
Detect project type by checking for:
src/, lib/, app/, package.json, requirements.txt, Cargo.toml, go.mod, *.py, *.js, *.ts, etc.).claude/checkpoints/)If existing codebase WITHOUT checkpoint structure (has source files but no .claude/checkpoints/):
.claude/checkpoints/ directorycheckpoint-1 (NOT checkpoint-0 — checkpoint-0 is reserved for new projects that start with a PRD before any code exists)CLAUDE.md exists in the project root, suggest: "Consider running /pr:handle-claude-md to set up a CLAUDE.md for this project"If existing codebase WITH checkpoint structure (has both source files and .claude/checkpoints/):
If new/empty project (no source files, no checkpoint structure):
/pr:create-prd first to set up checkpoint-0 with a Product Requirements Document."Goal: Determine checkpoint number and create directory
Actions:
Check if .claude/checkpoints/ directory exists
If it doesn't exist, create it and use checkpoint-1
If it exists, find the highest existing checkpoint number and increment by 1 (do NOT simply count directories — numbering may have gaps):
# Find the highest checkpoint number, not just count directories
HIGHEST=$(ls -d {project_root}/.claude/checkpoints/checkpoint-* 2>/dev/null | grep -oE 'checkpoint-[0-9]+' | grep -oE '[0-9]+' | sort -n | tail -1)
NEXT_CHECKPOINT=$((HIGHEST + 1))
Validate sequential numbering: Check that existing checkpoints are sequentially numbered (0, 1, 2, ...) with no gaps. If gaps are found, warn the user before proceeding.
Create the new checkpoint directory: .claude/checkpoints/checkpoint-{N}/
Goal: Build context from existing documentation before exploring
CRITICAL: This phase must complete before codebase exploration.
Actions:
ls -d {project_root}/.claude/checkpoints/checkpoint-* 2>/dev/null | sort -V
For each checkpoint (in order), read:
prd.md (if exists, typically in checkpoint-0)snapshot.md (if exists)rfd/ folder:find {project_root}/.claude/checkpoints/checkpoint-*/rfd -name "rfd-*.md" 2>/dev/null | sort
Read all reference documents:
find {project_root}/.claude/references -name "*.md" 2>/dev/null | sort
Goal: Deep understanding of the current codebase using code-explorer agents
Actions:
Launch 4 code-explorer agents in parallel (subagents by default) with different focuses:
Agent 1 - Architecture Overview:
Analyze the overall architecture of this codebase. Focus on:
- Directory structure and module organization
- Technology stack (frontend, backend, database, infrastructure)
- Design patterns and architectural decisions
- Configuration and build setup
- Entry points and main execution flow
Return a list of 5-10 key architectural files to read.
Agent 2 - Feature Analysis:
Identify and analyze all features in this codebase. Focus on:
- Completed features and their implementation
- In-progress features (partial implementation, TODOs)
- Planned features (mentioned in docs/comments)
- Key components and their responsibilities
Return a list of 5-10 key feature files to read.
Agent 3 - Development Context:
Analyze the development context of this codebase. Focus on:
- Testing strategy and coverage
- Deployment and CI/CD setup
- Development workflow (scripts, commands)
- Dependencies and third-party integrations
- Known issues and technical debt
Return a list of 5-10 key development files to read.
Agent 4 - UI/UX & Design Analysis:
Analyze the UI, UX, and visual design aspects of this codebase. Focus on:
- Design system and component library used (e.g., shadcn/ui, Material UI, custom)
- Color palette, themes, and color variables/tokens
- Typography: fonts, sizes, weights, line heights
- Spacing system and layout patterns
- Button styles, form elements, and interactive components
- Icons, images, and multimedia assets
- Animation and transition patterns
- Responsive design breakpoints and mobile considerations
- Accessibility features (ARIA, keyboard nav, screen reader support)
- Dark mode / light mode implementation
- CSS architecture (Tailwind, CSS modules, styled-components, etc.)
- Design tokens and theming configuration files
Return a list of 5-10 key design/style files to read (CSS, theme configs, component files with significant styling).
Wait for all agents to complete
Read all key files identified by agents
Synthesize findings into comprehensive understanding
Goal: Identify changes since last snapshot
Actions:
If this is not checkpoint-1:
If this is checkpoint-1:
Goal: Write comprehensive snapshot document
Actions:
Generate the snapshot following the template structure (see supporting template.md).
Key sections to include:
Goal: Write file and confirm completion
Actions:
Write the snapshot to {project_root}/.claude/checkpoints/checkpoint-{N}/snapshot.md
Report completion with:
.claude/
├── checkpoints/ # Project checkpoints (snapshots over time)
│ ├── checkpoint-0/ # Initial checkpoint (before development)
│ │ ├── prd.md # Product Requirements Document
│ │ └── rfd/ # Request for Development documents
│ │ ├── 1-authentication/
│ │ │ └── rfd-2025-01-24-1430.md
│ │ └── ...
│ │
│ ├── checkpoint-1/ # First development checkpoint
│ │ ├── snapshot.md # Codebase snapshot at this point
│ │ └── rfd/
│ │ └── ...
│ │
│ └── checkpoint-{N}/ # Additional checkpoints
│ ├── snapshot.md
│ └── rfd/
│
└── references/ # Reference documents
├── team-guidelines/
├── package-docs/
├── workflows/
├── api-specs/
└── {other-reference-folders}/
{N}-{feature-name}/rfd-{YYYY-MM-DD}-{HHMM}.md with timestamp of creationDO NOT:
snapshot.md — they are immutable historical recordsprd.md or prior RFDs unless explicitly requested by the usernpx claudepluginhub pouriarouzrokh/pr-claude-plugins --plugin prUniversal project workflow guide that reads the existing codebase, keeps changes small, and explains technical decisions in plain language. Use when starting, modifying, debugging, or deploying software projects.
Performs preliminary codebase fact-finding and produces structured research reports. Use before cw-spec to understand unfamiliar codebases and generate enriched context.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.