# prime

prime prepares agent context at the start of a session by inspecting project structure, reading core docs, and summarizing findings.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 3990 repo stars
- Author: disler
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/disler/claude-code-hooks-mastery/tree/HEAD/.claude/commands/prime.md
- Updated: 2026-03-04
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/prime

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/prime.md` — Call it with /prime. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/prime.md` — Call it with /prompts:prime. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/prime.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/prime.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/disler/claude-code-hooks-mastery/tree/HEAD/.claude/commands/prime.md

## When to use it
- inspect repository file trees using git
- read internal markdown guides before coding
- produce an architectural summary for a fresh session

## Example prompts
- /prime
- Run /prime and summarize the codebase architecture

## Similar
- [agent-rules](https://affpapa.org/en/nevibecode/skills/agent-rules.md) — skill · 850 installs
- [git-commit](https://affpapa.org/en/nevibecode/skills/ilteoood-git-commit.md) — skill · 624 installs
- [claude-code-bash-patterns](https://affpapa.org/en/nevibecode/skills/claude-code-bash-patterns.md) — skill · 414 installs
- [recall](https://affpapa.org/en/nevibecode/skills/backnotprop-recall.md) — skill · 10100 installs
- [remove-worktree](https://affpapa.org/en/nevibecode/commands/remove-worktree.md) — command · ★ 6529 repo stars
- [status](https://affpapa.org/en/nevibecode/commands/carlrannaberg-status.md) — command · ★ 763 repo stars

From the same set: [disler/claude-code-hooks-mastery](https://affpapa.org/en/nevibecode/by/disler/claude-code-hooks-mastery.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
