name: prime
description: Evaluate an existing codebase to produce a detailed report on project purpose, health, status, and recommended next steps
effort: high
allowed-tools: Read, Glob, Grep, Bash(git:*)
Prime
Perform a comprehensive evaluation of the current codebase/project and produce a structured report covering what the project is, where it stands, and what should happen next. This is the skill to use when encountering any project for the first time, resuming work after a break, or needing a full situational assessment before making decisions.
This skill is read-only. It NEVER modifies files, commits, or pushes.
Proactive Triggers
Suggest this skill when:
- User starts a new session and asks about the project, e.g. "what is this project" or "tell me about this codebase"
- User is encountering a repository for the first time or resuming work after a break
- User asks about project health, code quality, or documentation status
- Before making architectural decisions that require understanding the current state
- User says "give me an overview" or "assess this project"
Input
Arguments: $ARGUMENTS
Optional arguments:
- A specific focus area (e.g., "testing", "deployment readiness", "documentation")
- A path to a subdirectory to scope the analysis
If no arguments are provided, evaluate the entire project from the repository root.
Instructions
Execute ALL phases below. Use the Task tool with subagent_type=Explore for broad codebase searches to avoid flooding context. Use Glob, Grep, and Read directly for targeted lookups.
Phase 1: Project Identity
Determine what this project IS.
- Read project manifests -- Check for
package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, build.gradle, Gemfile, *.csproj, Makefile, docker-compose.yml, or similar. Extract: project name, version, description, language/runtime, declared dependencies.
- Read documentation -- Check for
README.md, CLAUDE.md, CONTRIBUTING.md, docs/, wiki/. Extract: stated purpose, architecture overview, setup instructions.
- Scan entry points -- Identify main entry points (
main.*, index.*, app.*, __main__.py, cli.*, server.*). Trace the top-level execution flow.
- Identify project type -- Classify as: library, CLI tool, web application, API service, plugin/extension, monorepo, data pipeline, mobile app, infrastructure-as-code, or other.
Output for report: Project name, type, language(s), purpose (1-3 sentences), key dependencies.
Phase 2: Repository Health
Assess the project's current state and activity.
Git history analysis:
git log --oneline -20 # Recent activity
git log --format='%ai' -1 # Last commit date
git log --format='%ai' --reverse | head -1 # First commit date
git shortlog -sn --no-merges | head -10 # Top contributors
git log --since="30 days ago" --oneline | wc -l # Activity last 30 days
Branch status:
git branch -a --sort=-committerdate | head -10 # Active branches
git status -s # Working tree state
Open work detection -- Check for: TODO, FIXME, HACK, XXX comments across source files. Check for IMPLEMENTATION_PLAN.md, PROGRESS.md, RECOMMENDATIONS.md, open GitHub issues/PRs if gh is available.
Lab notebook -- Check for LAB_NOTEBOOK.md. If present, read it thoroughly and extract:
- Decision Log: Active decisions and their rationale — these reflect architectural and operational choices that shape what happens next
- Open Action Items: Pending follow-ups with priority and source entry — these are the project's known TODO list beyond code comments
- Recent experiment entries: Last 3-5 entries with status — reveals what was recently tried, what worked, what failed
- Current Baseline: System state measurements — more current and specific than README descriptions
The lab notebook is often the richest source of project context. Incorporate its findings throughout the report, not just in this section.
Dependency freshness -- Check lock files for staleness. Note any pinned versions that might be outdated. Check for security advisory files or npm audit/pip-audit results if available.
Output for report: Repository age, activity level (active/maintained/stale/abandoned), contributor count, working tree status, open work items, lab notebook summary (if present).
Phase 3: Code Quality & Architecture
Evaluate the codebase structure and quality.
Project structure -- Map the directory tree (top 3 levels). Identify the architectural pattern: monolith, microservices, plugin architecture, layered, hexagonal, MVC, etc.
Code metrics:
- Total source files (by language)
- Approximate lines of code (use
wc -l on source files, exclude node_modules, venv, build artifacts)
- Largest files (potential god classes/modules)
- Circular dependency indicators
Test coverage:
- Test directory presence and structure
- Test count (if runnable without setup)
- Coverage configuration (pytest-cov, jest --coverage, etc.)
- Test-to-source ratio
CI/CD pipeline:
- Check
.github/workflows/, .gitlab-ci.yml, Jenkinsfile, Dockerfile, etc.
- What does CI run? (lint, test, build, deploy)
- Are there quality gates? (coverage thresholds, linting enforcement)
Configuration & secrets:
.env files (check .gitignore coverage)
- Config files and their complexity
- Secret management approach
Code quality signals:
- Linter configuration (eslint, ruff, clippy, golangci-lint)
- Type checking (TypeScript, mypy, pyright)
- Pre-commit hooks
- Code formatting enforcement
Output for report: Architecture pattern, code size, test coverage status, CI/CD maturity, quality tooling summary.
Phase 4: Documentation & Developer Experience
Assess how easy it is to understand and work with this project.
Documentation completeness:
- README: Does it explain setup, usage, and contribution?
- API documentation (if applicable)
- Architecture Decision Records (ADRs)
- LAB_NOTEBOOK.md (experiment log with decisions, action items, and baselines)
- Inline code comments (density and quality)
- CLAUDE.md or similar AI-context files
Developer onboarding:
- Can a new developer set up the project from README alone?
- Are there development scripts (
make dev, npm run dev, docker-compose up)?
- Is there a
CONTRIBUTING.md?
Dependency documentation:
- Are system dependencies documented?
- Are environment variables documented?
- Are third-party service requirements listed?
Output for report: Documentation grade (A-F), onboarding friction points, missing documentation.
Phase 5: Risk Assessment
Identify potential problems and blockers.
Technical debt indicators:
- Large files with high complexity
- Duplicated code patterns
- Deprecated dependency usage
- TODO/FIXME density
- Disabled tests
Security posture:
- Hardcoded credentials or API keys
.env in git history
- Dependency vulnerabilities (if audit tools available)
- Input validation patterns
Operational risks:
- Single points of failure
- Missing error handling patterns
- No monitoring/logging infrastructure
- Missing backup/recovery procedures
Output for report: Risk items categorized as Critical/High/Medium/Low.
Phase 6: Recommended Next Steps
Based on ALL findings, produce a prioritized action plan.
Before constructing recommendations, review all findings from Phases 2-5 holistically. Identify shared root causes and interrelationships between issues. Group related findings into integrated corrective actions rather than listing isolated fixes. The goal is recommendations that, when executed together, produce architecturally coherent improvements — not a whack-a-mole list of patches where fixing one issue creates or worsens another.
Immediate actions (do now, < 1 hour each):
- Critical security fixes
- Broken CI/tests
- Missing .gitignore entries
Short-term improvements (this week):
- Documentation gaps
- Test coverage gaps
- Dependency updates
- Code quality quick wins
Strategic initiatives (plan and schedule):
- Architectural improvements
- New feature opportunities
- Performance optimizations
- Scalability preparations
Suggested first task:
- Based on the full analysis, recommend the single most impactful thing to do next
- Explain WHY this is the highest-leverage action
- If multiple issues share a root cause, recommend addressing that root cause rather than the individual symptoms
Output
Present findings as a structured in-conversation report with this format:
# Project Prime Report
**Project:** [name]
**Generated:** [date]
**Scope:** [full repo | specific path]
---
## 1. Project Identity
| Field | Value |
|-------|-------|
| Name | [name] |
| Type | [library/CLI/webapp/API/etc.] |
| Language(s) | [primary, secondary] |
| Version | [current version or "unversioned"] |
| Purpose | [1-3 sentence description] |
**Key Dependencies:** [top 5-10 dependencies with purpose]
---
## 2. Repository Health
| Metric | Value |
|--------|-------|
| Age | [first commit to now] |
| Last Activity | [last commit date] |
| Activity Level | [Active/Maintained/Stale/Abandoned] |
| Contributors | [count] |
| Working Tree | [Clean/Modified/Uncommitted changes] |
| Open Work | [IMPLEMENTATION_PLAN items, TODOs, issues] |
| Lab Notebook | [Present/Absent — if present: # entries, # active decisions, # open action items] |
---
## 3. Code Quality & Architecture
| Metric | Value |
|--------|-------|
| Architecture | [pattern] |
| Source Files | [count by language] |
| Lines of Code | [approximate] |
| Test Files | [count] |
| Test Coverage | [percentage or "not configured"] |
| CI/CD | [present/absent, what it runs] |
| Linting | [tool and status] |
| Type Checking | [tool and status] |
**Largest Modules:** [top 3-5 files by size]
---
## 4. Documentation
| Aspect | Grade | Notes |
|--------|-------|-------|
| README | [A-F] | [what's good/missing] |
| Setup Guide | [A-F] | [can you get running from docs alone?] |
| API Docs | [A-F or N/A] | [coverage level] |
| Architecture Docs | [A-F] | [ADRs, diagrams, etc.] |
| Code Comments | [A-F] | [density and quality] |
| **Overall** | **[A-F]** | |
---
## 5. Risk Assessment
### Critical
- [item or "None identified"]
### High
- [items]
### Medium
- [items]
### Low
- [items]
---
## 6. Recommended Next Steps
### Immediate (< 1 hour)
1. [action] -- [why]
### Short-term (this week)
1. [action] -- [why]
2. [action] -- [why]
### Strategic (plan & schedule)
1. [action] -- [why]
### Suggested First Task
> [Specific, actionable recommendation with rationale]
---
*Report generated by /prime on [date]*
Example
User: /prime
Claude: [Analyzes the codebase across all 6 phases]
# Project Prime Report
**Project:** claude-marketplace
**Generated:** 2026-02-16
...
[Full structured report]
User: /prime testing
Claude: [Focuses analysis on testing infrastructure and coverage]
# Project Prime Report (Focus: Testing)
...
User: /prime plugins/bpmn-plugin
Claude: [Scopes analysis to the bpmn-plugin subdirectory]
# Project Prime Report
**Project:** bpmn-plugin
**Scope:** plugins/bpmn-plugin
...
Error Handling
- If not in a git repository: Note this in the report, skip git-dependent analysis, proceed with file-based analysis
- If project is empty or near-empty: Produce abbreviated report noting the project appears to be in initial scaffolding phase
- If a specific tool (gh, npm, pip) is unavailable: Skip that check, note it as "unable to assess" in the report
- If the project is extremely large (>10,000 files): Use sampling -- analyze representative directories rather than exhaustive scan
- If arguments specify a path that doesn't exist: Report the error and fall back to full repository analysis
Performance
| Project Size |
Expected Duration |
| Small (< 50 files) |
30-60 seconds |
| Medium (50-200 files) |
1-3 minutes |
| Large (200-500 files) |
3-5 minutes |
| Very Large (500+ files) |
5-10 minutes |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: davistroy-claude-marketplace-prime3description: ---4---5---6name: prime7description: Evaluate an existing codebase to produce a detailed report on project purpose, health, status, and recommended next steps8effort: high9allowed-tools: Read, Glob, Grep, Bash(git:*)10---1112# Prime1314Perform a comprehensive evaluation of the current codebase/project and produce a structured report covering what the project is, where it stands, and what should happen next. This is the skill to use when encountering any project for the first time, resuming work after a break, or needing a full situational assessment before making decisions.1516**This skill is read-only. It NEVER modifies files, commits, or pushes.**1718## Proactive Triggers1920Suggest this skill when:211. User starts a new session and asks about the project, e.g. "what is this project" or "tell me about this codebase"222. User is encountering a repository for the first time or resuming work after a break233. User asks about project health, code quality, or documentation status244. Before making architectural decisions that require understanding the current state255. User says "give me an overview" or "assess this project"2627## Input2829**Arguments:** `$ARGUMENTS`3031Optional arguments:32- A specific focus area (e.g., "testing", "deployment readiness", "documentation")33- A path to a subdirectory to scope the analysis3435If no arguments are provided, evaluate the entire project from the repository root.3637## Instructions3839Execute ALL phases below. Use the Task tool with `subagent_type=Explore` for broad codebase searches to avoid flooding context. Use Glob, Grep, and Read directly for targeted lookups.4041### Phase 1: Project Identity4243Determine what this project IS.44451. **Read project manifests** -- Check for `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `pom.xml`, `build.gradle`, `Gemfile`, `*.csproj`, `Makefile`, `docker-compose.yml`, or similar. Extract: project name, version, description, language/runtime, declared dependencies.462. **Read documentation** -- Check for `README.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `docs/`, `wiki/`. Extract: stated purpose, architecture overview, setup instructions.473. **Scan entry points** -- Identify main entry points (`main.*`, `index.*`, `app.*`, `__main__.py`, `cli.*`, `server.*`). Trace the top-level execution flow.484. **Identify project type** -- Classify as: library, CLI tool, web application, API service, plugin/extension, monorepo, data pipeline, mobile app, infrastructure-as-code, or other.4950**Output for report:** Project name, type, language(s), purpose (1-3 sentences), key dependencies.5152### Phase 2: Repository Health5354Assess the project's current state and activity.55561. **Git history analysis:**57 ```bash58 git log --oneline -20 # Recent activity59 git log --format='%ai' -1 # Last commit date60 git log --format='%ai' --reverse | head -1 # First commit date61 git shortlog -sn --no-merges | head -10 # Top contributors62 git log --since="30 days ago" --oneline | wc -l # Activity last 30 days63 ```64652. **Branch status:**66 ```bash67 git branch -a --sort=-committerdate | head -10 # Active branches68 git status -s # Working tree state69 ```70713. **Open work detection** -- Check for: `TODO`, `FIXME`, `HACK`, `XXX` comments across source files. Check for `IMPLEMENTATION_PLAN.md`, `PROGRESS.md`, `RECOMMENDATIONS.md`, open GitHub issues/PRs if `gh` is available.72734. **Lab notebook** -- Check for `LAB_NOTEBOOK.md`. If present, read it thoroughly and extract:74 - **Decision Log:** Active decisions and their rationale — these reflect architectural and operational choices that shape what happens next75 - **Open Action Items:** Pending follow-ups with priority and source entry — these are the project's known TODO list beyond code comments76 - **Recent experiment entries:** Last 3-5 entries with status — reveals what was recently tried, what worked, what failed77 - **Current Baseline:** System state measurements — more current and specific than README descriptions7879 The lab notebook is often the richest source of project context. Incorporate its findings throughout the report, not just in this section.80815. **Dependency freshness** -- Check lock files for staleness. Note any pinned versions that might be outdated. Check for security advisory files or `npm audit`/`pip-audit` results if available.8283**Output for report:** Repository age, activity level (active/maintained/stale/abandoned), contributor count, working tree status, open work items, lab notebook summary (if present).8485### Phase 3: Code Quality & Architecture8687Evaluate the codebase structure and quality.88891. **Project structure** -- Map the directory tree (top 3 levels). Identify the architectural pattern: monolith, microservices, plugin architecture, layered, hexagonal, MVC, etc.90912. **Code metrics:**92 - Total source files (by language)93 - Approximate lines of code (use `wc -l` on source files, exclude node_modules, venv, build artifacts)94 - Largest files (potential god classes/modules)95 - Circular dependency indicators96973. **Test coverage:**98 - Test directory presence and structure99 - Test count (if runnable without setup)100 - Coverage configuration (pytest-cov, jest --coverage, etc.)101 - Test-to-source ratio1021034. **CI/CD pipeline:**104 - Check `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`, `Dockerfile`, etc.105 - What does CI run? (lint, test, build, deploy)106 - Are there quality gates? (coverage thresholds, linting enforcement)1071085. **Configuration & secrets:**109 - `.env` files (check .gitignore coverage)110 - Config files and their complexity111 - Secret management approach1121136. **Code quality signals:**114 - Linter configuration (eslint, ruff, clippy, golangci-lint)115 - Type checking (TypeScript, mypy, pyright)116 - Pre-commit hooks117 - Code formatting enforcement118119**Output for report:** Architecture pattern, code size, test coverage status, CI/CD maturity, quality tooling summary.120121### Phase 4: Documentation & Developer Experience122123Assess how easy it is to understand and work with this project.1241251. **Documentation completeness:**126 - README: Does it explain setup, usage, and contribution?127 - API documentation (if applicable)128 - Architecture Decision Records (ADRs)129 - LAB_NOTEBOOK.md (experiment log with decisions, action items, and baselines)130 - Inline code comments (density and quality)131 - CLAUDE.md or similar AI-context files1321332. **Developer onboarding:**134 - Can a new developer set up the project from README alone?135 - Are there development scripts (`make dev`, `npm run dev`, `docker-compose up`)?136 - Is there a `CONTRIBUTING.md`?1371383. **Dependency documentation:**139 - Are system dependencies documented?140 - Are environment variables documented?141 - Are third-party service requirements listed?142143**Output for report:** Documentation grade (A-F), onboarding friction points, missing documentation.144145### Phase 5: Risk Assessment146147Identify potential problems and blockers.1481491. **Technical debt indicators:**150 - Large files with high complexity151 - Duplicated code patterns152 - Deprecated dependency usage153 - TODO/FIXME density154 - Disabled tests1551562. **Security posture:**157 - Hardcoded credentials or API keys158 - `.env` in git history159 - Dependency vulnerabilities (if audit tools available)160 - Input validation patterns1611623. **Operational risks:**163 - Single points of failure164 - Missing error handling patterns165 - No monitoring/logging infrastructure166 - Missing backup/recovery procedures167168**Output for report:** Risk items categorized as Critical/High/Medium/Low.169170### Phase 6: Recommended Next Steps171172Based on ALL findings, produce a prioritized action plan.173174**Before constructing recommendations**, review all findings from Phases 2-5 holistically. Identify shared root causes and interrelationships between issues. Group related findings into integrated corrective actions rather than listing isolated fixes. The goal is recommendations that, when executed together, produce architecturally coherent improvements — not a whack-a-mole list of patches where fixing one issue creates or worsens another.1751761. **Immediate actions** (do now, < 1 hour each):177 - Critical security fixes178 - Broken CI/tests179 - Missing .gitignore entries1801812. **Short-term improvements** (this week):182 - Documentation gaps183 - Test coverage gaps184 - Dependency updates185 - Code quality quick wins1861873. **Strategic initiatives** (plan and schedule):188 - Architectural improvements189 - New feature opportunities190 - Performance optimizations191 - Scalability preparations1921934. **Suggested first task:**194 - Based on the full analysis, recommend the single most impactful thing to do next195 - Explain WHY this is the highest-leverage action196 - If multiple issues share a root cause, recommend addressing that root cause rather than the individual symptoms197198## Output199200Present findings as a structured in-conversation report with this format:201202```markdown203# Project Prime Report204**Project:** [name]205**Generated:** [date]206**Scope:** [full repo | specific path]207208---209210## 1. Project Identity211212| Field | Value |213|-------|-------|214| Name | [name] |215| Type | [library/CLI/webapp/API/etc.] |216| Language(s) | [primary, secondary] |217| Version | [current version or "unversioned"] |218| Purpose | [1-3 sentence description] |219220**Key Dependencies:** [top 5-10 dependencies with purpose]221222---223224## 2. Repository Health225226| Metric | Value |227|--------|-------|228| Age | [first commit to now] |229| Last Activity | [last commit date] |230| Activity Level | [Active/Maintained/Stale/Abandoned] |231| Contributors | [count] |232| Working Tree | [Clean/Modified/Uncommitted changes] |233| Open Work | [IMPLEMENTATION_PLAN items, TODOs, issues] |234| Lab Notebook | [Present/Absent — if present: # entries, # active decisions, # open action items] |235236---237238## 3. Code Quality & Architecture239240| Metric | Value |241|--------|-------|242| Architecture | [pattern] |243| Source Files | [count by language] |244| Lines of Code | [approximate] |245| Test Files | [count] |246| Test Coverage | [percentage or "not configured"] |247| CI/CD | [present/absent, what it runs] |248| Linting | [tool and status] |249| Type Checking | [tool and status] |250251**Largest Modules:** [top 3-5 files by size]252253---254255## 4. Documentation256257| Aspect | Grade | Notes |258|--------|-------|-------|259| README | [A-F] | [what's good/missing] |260| Setup Guide | [A-F] | [can you get running from docs alone?] |261| API Docs | [A-F or N/A] | [coverage level] |262| Architecture Docs | [A-F] | [ADRs, diagrams, etc.] |263| Code Comments | [A-F] | [density and quality] |264| **Overall** | **[A-F]** | |265266---267268## 5. Risk Assessment269270### Critical271- [item or "None identified"]272273### High274- [items]275276### Medium277- [items]278279### Low280- [items]281282---283284## 6. Recommended Next Steps285286### Immediate (< 1 hour)2871. [action] -- [why]288289### Short-term (this week)2901. [action] -- [why]2912. [action] -- [why]292293### Strategic (plan & schedule)2941. [action] -- [why]295296### Suggested First Task297> [Specific, actionable recommendation with rationale]298299---300301*Report generated by /prime on [date]*302```303304## Example305306```yaml307User: /prime308309Claude: [Analyzes the codebase across all 6 phases]310311# Project Prime Report312**Project:** claude-marketplace313**Generated:** 2026-02-16314...315[Full structured report]316```317318```yaml319User: /prime testing320321Claude: [Focuses analysis on testing infrastructure and coverage]322323# Project Prime Report (Focus: Testing)324...325```326327```yaml328User: /prime plugins/bpmn-plugin329330Claude: [Scopes analysis to the bpmn-plugin subdirectory]331332# Project Prime Report333**Project:** bpmn-plugin334**Scope:** plugins/bpmn-plugin335...336```337338## Error Handling339340- If not in a git repository: Note this in the report, skip git-dependent analysis, proceed with file-based analysis341- If project is empty or near-empty: Produce abbreviated report noting the project appears to be in initial scaffolding phase342- If a specific tool (gh, npm, pip) is unavailable: Skip that check, note it as "unable to assess" in the report343- If the project is extremely large (>10,000 files): Use sampling -- analyze representative directories rather than exhaustive scan344- If arguments specify a path that doesn't exist: Report the error and fall back to full repository analysis345346## Performance347348| Project Size | Expected Duration |349|--------------|-------------------|350| Small (< 50 files) | 30-60 seconds |351| Medium (50-200 files) | 1-3 minutes |352| Large (200-500 files) | 3-5 minutes |353| Very Large (500+ files) | 5-10 minutes |354355---356> Converted and distributed by [TomeVault](https://tomevault.io/claim/davistroy) — claim your Tome and manage your conversions.357<!-- tomevault:4.0:skill_md:2026-04-13 -->