prime

prime is a command for Claude Code from TechDufus/oh-my-claude. It costs 20 tokens per session (2,602 once invoked), scanned A, original, MIT.

A command that quickly builds a briefing about the current project after starting a new session or clearing the conversation. It can focus on a task and optionally include only essential Git information or full code changes.

In plain words
What is it for?
Use it to orient an agent before coding, investigate a specific area such as database setup, or bring pull-request context into view.
Why use it?
It removes the need to manually rediscover what the project is doing, what changed, and what remains after losing session context.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

Part of the oh-my-claude plugin — 12 skills, 1 command, 7 agents, 8 hooks, 2 MCP servers shipped together

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/techdufus/oh-my-claude/prime
Clone the repo
git clone --depth 1 https://github.com/TechDufus/oh-my-claude

Made for: Claude Code.

Or install oh-my-claude, the plugin that ships this one along with the rest of its 12 skills, 1 command, 7 agents, 8 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prime

README.md
[![agentmods](https://agentmods.dev/badge/commands/techdufus/oh-my-claude/prime.svg)](https://agentmods.dev/commands/techdufus/oh-my-claude/prime)
Your own site
<a href="https://agentmods.dev/commands/techdufus/oh-my-claude/prime"><img src="https://agentmods.dev/badge/commands/techdufus/oh-my-claude/prime.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,602 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.1 $0.00020 $0.02602
Opus 5 $0.00010 $0.01301
Sonnet 5 $0.00004 $0.00520
Haiku 4.5 $0.00002 $0.00260

Measured 6d ago against content hash 4476d4b74319, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

plugins/oh-my-claude/commands/prime.md · 348 lines

How it starts

The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/prime - Context Priming for Fresh Sessions

Rapidly build complete understanding of current work state after /clear or new session start. Uses parallel subagents to maximize context gathering while minimizing main context token usage.

Usage

/prime                                    # Full context priming (default)
/prime <task-hint>                        # Prime with upcoming task focus
/prime --quick                            # Essential git state only (faster)
/prime --verbose                          # Include full diffs in report

Examples

/prime                                    # General orientation
/prime migrating postgres init scripts    # Focus exploration on postgres/init
/prime reviewing PR #42                   # Pull PR context to forefront

Arguments: $ARGUMENTS


Philosophy

Problem: Fresh sessions lack context about in-progress work.

Solution: Subagents explore repository state in parallel, then synthesize into a concise briefing. Main context receives only the summary, not raw exploration data.

Task-Focused: When a task hint is provided, subagents prioritize context relevant to that task (pyramid approach - start with intent).


Phase -1: Parse Arguments

Parse $ARGUMENTS to extract:

  • Task hint: Any non-flag text (e.g., "migrating postgres init scripts")
  • Flags: --quick, --verbose

Phase 0: Quick Snapshot (Main Agent)

Run these commands in parallel via Bash tool:

git branch --show-current
git rev-parse --abbrev-ref HEAD@{upstream} 2>/dev/null || echo "no upstream"
git status --short --branch
git log --oneline -5
git stash list --format="%gd: %s"

Display immediately:

## Quick Snapshot
- **Branch**: <current-branch> (tracking: <upstream-or-none>)
- **Status**: <N files changed, M staged, K untracked>
- **Recent commits**: <last 3-5 one-liners>
- **Stashes**: <count or "none">

If --quick flag provided, STOP HERE.


Subagent Prompt Template

Read the full file on GitHub · 348 lines

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. 6d ago First seen · 348 lines · 20 tokens per session scan A 4476d4b74319

Subscribe to this mod's changes

prime is a command published in the GitHub repository TechDufus/oh-my-claude (176 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 2,602 once invoked, about $0.0001 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.