prime — Claude Code command: what it does, how to install
prime prepares agent context at the start of a session by inspecting project structure, reading core docs, and summarizing findings.
no license ★ 3,990 updated 2026-03-04
.claude/commands/prime.mdWhat prime does
The command initializes session context by listing tracked files via git ls-files. Next, it reviews README.md alongside internal reference guides stored in ai_docs/.
The examined documents include instructions on Claude Code hooks, uv single-file scripts, custom slash commands, and subagents. It finishes by generating an overview of the codebase purpose. The command requires both Bash and Read permissions to execute.
What it helps with
- inspect repository file trees using git
- read internal markdown guides before coding
- produce an architectural summary for a fresh session
Example prompts for the agent
- /prime
- Run /prime and summarize the codebase architecture
How to install prime
Manually: put the files in place
.claude/commands/prime.mdCall it with /prime. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/prime.mdCall it with /prompts:prime. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/prime.prompt.mdManually: put the files in place
.gemini/commands/prime.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about prime
How to install prime in Claude Code?
Save the command file to .claude/commands/prime.md.
What does prime do?
It inspects tracked files with git ls-files, reviews README.md plus guides in ai_docs/, and delivers a project overview.
Which tools are needed for prime?
The command definition explicitly requires access to Bash and Read.