prime-context

prime-context is a skill for Claude Code from rodrigopg/claude-skill-prime-context. It costs 105 tokens per session (2,560 once invoked), scanned A, original, MIT.

A skill for keeping project context in small, area-specific Markdown files, with a thin AGENTS.md or CLAUDE.md file directing the agent to them.

In plain words
What is it for?
Use it to load context for a named area, record the current session’s learnings, and reorganize oversized project instructions into a routed context structure.
Why use it?
It prevents every session from loading a large instruction file and lets the agent save corrections, decisions, and pitfalls discovered during work for future sessions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/dev/app.

Part of the prime-context plugin — 1 skill, 1 hook shipped together

Good fit Use it to load context for a named area, record the current session’s learnings, and reorganize oversized project instructions into a routed context structure.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add rodrigopg/claude-skill-prime-context
Claude Code
/plugin install prime-context

Made for: Claude Code.

Or install prime-context, the plugin that ships this one along with the rest of its 1 skill, 1 hook.

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-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/rodrigopg/claude-skill-prime-context/prime-context/github.svg)](https://agentmods.dev/skills/rodrigopg/claude-skill-prime-context/prime-context)
Your own site
<a href="https://agentmods.dev/skills/rodrigopg/claude-skill-prime-context/prime-context"><img src="https://agentmods.dev/badge/skills/rodrigopg/claude-skill-prime-context/prime-context/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prime-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/rodrigopg/claude-skill-prime-context/prime-context"><img src="https://agentmods.dev/badge/skills/rodrigopg/claude-skill-prime-context/prime-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00105 $0.02560
Opus 5 $0.00053 $0.01280
Sonnet 5 $0.00021 $0.00512
Haiku 4.5 $0.00011 $0.00256

Measured 9d ago against content hash 14604e2ada14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prime-context 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 9d 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.

skills/prime-context/SKILL.md · 233 lines

How it starts

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

Prime Context

Manage project context efficiently — never load everything at once.

Core philosophy

AGENTS.md must be thin. It is loaded in EVERY session — every line costs tokens in every conversation. Detailed content lives in .claude/context/<area>.md and is read only when the task requires it. AGENTS.md contains only: overview (2 lines), routing table, non-negotiable rules, PR checklist.

This skill covers both directions: <area> is the read path (assemble the right context into a session); the bare call is the write path (learn — persist this session's learnings into those same files, so the next session starts smarter).

MEMORY.md format (specification)

MEMORY.md lives at ~/.claude/projects/<hash>/memory/MEMORY.md, where <hash> is the project's absolute path with every / replaced by - (Claude Code's project-folder convention, e.g. /home/dev/app-home-dev-app). It is a pointer index only — one line per memory file, never inline content:

- [Short title](filename.md) — one-line hook describing when this matters

Each referenced memory file is self-contained Markdown, optionally with frontmatter (name, description, type: user|feedback|project|reference). Rules:

  • MEMORY.md never holds memory content, only pointers — keeps the index cheap to scan.
  • Dead pointers (file missing) are flagged by doctor and during load.
  • Memory files are point-in-time — warn when the newest is older than 7 days.

Command: learn (default — no argument, or the literal word learn)

Capture what this session taught into the context files. Claude Code already loads AGENTS.md/CLAUDE.md at session start — re-reading it adds nothing. The bare call's job is the opposite direction: write the session's learnings down so the next session starts smarter.

Flow:

  1. Review the current conversation for durable learnings: user corrections, decisions made, pitfalls hit, commands/configs discovered, gotchas that cost time. Ignore anything only relevant to this one task.
  2. Route each learning:
    • Area-specific → append to the matching .claude/context/<area>.md (fuzzy-match as in load). No matching area → propose creating one (file + routing-table row).
    • User preference → a file in ~/.claude/projects/<hash>/memory/ plus a pointer line in MEMORY.md (create the directory and the MEMORY.md spec header if absent).
  3. Before appending, check the target file — skip anything already recorded; update in place if the learning supersedes an existing line.
  4. Report one bullet per learning written, with its destination file. Nothing durable in the session → say learn: nothing new and stop. Never touch AGENTS.md itself (rules there are managed via improve).

Read the full file on GitHub · 233 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. 9d ago First seen · 233 lines · 0 tokens per session scan A 14604e2ada14

Subscribe to this mod's changes

prime-context is a skill published in the GitHub repository rodrigopg/claude-skill-prime-context (1 stars, last pushed 1mo ago), licensed MIT. It adds 105 tokens to every session and 2,560 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

memory-and-handoff

Two-mode skill: (1) session memory — load/persist durable workflow state under .cc10x/ (activeContext, patterns, progress) so context survives compaction; (2) handoff package — portable, secrets-redacted export for a coworker, different tool, or fresh non-cc10x session.

romiluz13/cc10x · 70 tokens

agent-common

Shared preamble loaded by all cc10x agents — memory protocol, contract format, output rules.

romiluz13/cc10x · 23 tokens

faf-context

Use FAF project context tools on this server — init, score, sync, discover; claim equals wire.

Wolfe-Jam/rust-faf-mcp · 24 tokens

remember

Capture a durable learning into the personal Trove. Use when the user says remember this, note this, save to trove, add to my trove, or when a session surfaces a decision, gotcha, convention/preference, or external reference worth keeping. Writes one atomic entry file and updates INDEX.md.

anishfyi/trove · 65 tokens

init

Initialize a personal Trove, a local file-based knowledge index for Claude Code. Use when the user says start/set up/create my trove, or when they want to remember things but no trove exists yet. Scaffolds the trove directory, INDEX.md and entries/ folder at user scope (/.claude/trove, follows you everywhere) or…

anishfyi/trove · 89 tokens

index

Index the repository into Trove memory layers (symbols, modules, subsystems, architecture). Use when the user asks to index the repo, build the trove index, refresh symbols, or re-index after large changes.

anishfyi/trove · 46 tokens