prime

A command for loading a software project's context and producing a structured summary. It looks at the project files, documentation, technology choices, important code, and recent Git activity.

In plain words
What is it for?
It is for checking the file tree, reading project documentation, detecting the software stack, reviewing key files, and examining recent Git history.
Why use it?
It helps an agent understand an unfamiliar codebase before working on it. It collects the main project facts in one place.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/defaultperson/agent-setup/prime
Clone the repo
git clone --depth 1 https://github.com/DefaultPerson/agent-setup

Made for: Claude Code.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 549 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.00549
Opus 5 $0.00005 $0.00275
Sonnet 5 $0.00002 $0.00110
Haiku 4.5 $0.00001 $0.00055

Measured 2d ago against content hash 73c2d7e25524, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/prime.md · 79 lines

What it actually says

Build comprehensive understanding of the codebase. Run all steps, then output a concise summary.

Process

1. Project Structure

git ls-files | head -100

Show directory tree (depth 3, skip noise):

find . -maxdepth 3 -type f \
  -not -path '*/node_modules/*' \
  -not -path '*/.git/*' \
  -not -path '*/dist/*' \
  -not -path '*/build/*' \
  -not -path '*/__pycache__/*' \
  -not -path '*/.next/*' \
  | head -80

2. Core Documentation

Read whatever exists — skip what's missing:

  • README.md, CLAUDE.md
  • docs/ directory (if present — scan for architecture, API, specs)
  • Any other top-level docs (PRD, spec, CONTRIBUTING, ARCHITECTURE, etc.)

3. Stack Detection

Look for common config files to detect the stack:

  • package.json, pyproject.toml, go.mod, Cargo.toml, requirements.txt
  • Build/lint configs (tsconfig.json, ruff.toml, .eslintrc*, etc.)
  • Infra files (Dockerfile, docker-compose.yml, .github/workflows/)

4. Key Files

From the file tree, identify and read entry points, core schemas/models, and important service files.

5. Git Activity

git log --oneline -20
git branch -a
git diff --stat HEAD~5..HEAD 2>/dev/null

Output Summary

## Project Context

### Overview
- **Purpose**: {what this project does}
- **Tech Stack**: {languages, frameworks, key deps}

### Architecture
- **Structure**: {key directories, patterns}
- **Entry Points**: {main files}
- **Config**: {build tools, CI/CD, infra}

### Current State
- **Branch**: {current branch}
- **Recent Work**: {last 5 commits summary}
- **Active Areas**: {most changed files/dirs}

### Key Files
- {path} — {purpose}
- ...

Make the summary easy to scan — bullet points, clear headers, no walls of text.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 79 lines · 9 tokens per session scan A 73c2d7e25524

Subscribe to this mod's changes

prime is a command published in the GitHub repository DefaultPerson/agent-setup (11 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 549 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.