deep-context

deep-context is a skill for Claude Code, Codex from arpitnath/claude-capsule-kit. It costs 47 tokens per session (2,898 once invoked), scanned A, original, MIT.

A method for building a detailed understanding of an unfamiliar codebase. It gathers context in stages and uses code reading, dependency analysis, and specialist help instead of loading everything at once.

In plain words
What is it for?
Use it when you need background before making changes, or when you want to understand a codebase's architecture, structure, or behavior.
Why use it?
It reduces the chance of missing relationships or overwhelming the working context when a system is large or unfamiliar.

Skill for Claude CodeCodex

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 skills/arpitnath/claude-capsule-kit/deep-context
Any agent
npx skills add arpitnath/claude-capsule-kit --skill deep-context
Clone the repo
git clone --depth 1 https://github.com/arpitnath/claude-capsule-kit

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/arpitnath/claude-capsule-kit/deep-context.svg)](https://agentmods.dev/skills/arpitnath/claude-capsule-kit/deep-context)
Your own site
<a href="https://agentmods.dev/skills/arpitnath/claude-capsule-kit/deep-context"><img src="https://agentmods.dev/badge/skills/arpitnath/claude-capsule-kit/deep-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,898 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.00047 $0.02898
Opus 5 $0.00023 $0.01449
Sonnet 5 $0.00009 $0.00580
Haiku 4.5 $0.00005 $0.00290

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

Security

Grade A, and why

deep-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 5d 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/deep-context/SKILL.md · 447 lines

How it starts

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

Deep Context Builder

You are a Deep Context Builder responsible for systematically building comprehensive codebase understanding through multiple layers of context gathering instead of overwhelming your main context window.

Purpose

Problem: Building codebase understanding by reading files sequentially overwhelms context, misses relationships, and doesn't persist knowledge.

Solution: Multi-layer context building using Capsule (automatic), progressive reading, dependency analysis, and specialist agents—each with fresh context.

When to Use This Skill

Auto-triggers on keywords:

  • "don't have context", "you don't have enough context"
  • "understand the codebase", "learn about this system"
  • "need background", "how does this work"
  • "explain the architecture", "what's the structure"

Context indicators:

  • User says you're missing understanding
  • Complex task needs architectural knowledge
  • Unfamiliar part of codebase
  • Need to understand before implementing

Manual invocation: /deep-context


The Multi-Layer Context Building System

Layer 1: CAPSULE CONTEXT (Automatic)

Goal: Review what Capsule has already provided

At session start, session-start.js automatically injects:

  • Last Session — Summary of most recent session
  • Top Discoveries — Most-accessed architectural insights
  • Recent Files — Last 3 files worked on
  • Team Activity (crew mode) — What other teammates have been doing

What to check:

  • Review the injected context for past decisions and patterns
  • Don't re-read files already mentioned in injected context
  • Build on discoveries from previous sessions
  • Check for related team work (in crew mode)

Output: Historical + session context, automatically provided


Layer 2: PROGRESSIVE READER (Large Files)

Goal: Understand file structure WITHOUT reading entire files

For large files (>50KB):

Step 1: List file structure

$HOME/.claude/bin/progressive-reader --path <file> --list

Read the full file on GitHub · 447 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. 5d ago First seen · 447 lines · 47 tokens per session scan A 208c110451be

Subscribe to this mod's changes

deep-context is a skill published in the GitHub repository arpitnath/claude-capsule-kit (90 stars, last pushed 3mo ago), licensed MIT. It adds 47 tokens to every session and 2,898 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory-consolidate

Reflective consolidation pass over Serena memory files. Separates durable context (preferences, working style, key relationships, recurring workflows) from dated context (projects, deadlines, one-off tasks), merges duplicate topic files onto the richer path, converts relative dates to absolute ones, and tidies…

rjmurillo/ai-agents · 137 tokens

memory-enhancement

Manage memory citations, verify code references, and track confidence scores. Use when adding citations to memories, checking memory health, or verifying code references are still valid. Use when you say "add a citation", "verify this memory's code refs", "check memory health". Do NOT use for searching or creating…

rjmurillo/ai-agents · 80 tokens

memory

Thin router for the tiered memory system. Points callers at the focused sub-skills for each operation, Tier 1 search, the reflexion write path, the memory-first gate, maintenance, and consolidation. Use when you ask "what do we know about X", "recall prior context", or "search memory" and are not sure which operation…

rjmurillo/ai-agents · 99 tokens

research-and-incorporate

Research external topics, create comprehensive analysis, and incorporate learnings into Serena and Forgetful memory systems. Use when you say "research and incorporate {topic}", "study {topic} and add to memory", "deep dive on {topic}", or "learn about {topic} for the project". Works on external concepts, frameworks…

rjmurillo/ai-agents · 111 tokens

curating-memories

Guidance for maintaining Forgetful record quality and in-file Serena supersession markers. Covers updating outdated records, marking obsolete content, and linking related knowledge. Use when you say "how do I update a memory", "how do I mark a memory obsolete", or "how do I deduplicate Forgetful memories". Do NOT use…

rjmurillo/ai-agents · 89 tokens