deep-context

deep-context is a skill for Claude Code 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 Code

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

Good fit Use it when you need background before making changes, or when you want to understand a codebase's architecture, structure, or behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arpitnath/claude-capsule-kit/deep-context
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.

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.

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/github.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/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 deep-context

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00047 $0.02898
Opus 5.5 $0.00019 $0.01159
Sonnet 5.5 $0.00009 $0.00580
Haiku 4.5 $0.00005 $0.00290

Measured 2mo ago against content hash 208c110451be, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (93 stars, last pushed 5mo ago), licensed MIT. It adds 47 tokens to every session and 2,898 once invoked, about $0.0002 per session on Opus 5.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

context-engine

Loads and manages company context for all C-suite advisor skills. Reads /.claude/company-context.md, detects stale context (older than 90 days), enriches context during conversations, and enforces privacy/anonymization rules before external API calls. Use when starting any C-suite advisor session, when context looks…

alirezarezvani/claude-skills · 78 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

using-forgetful-memory

Guidance for using Forgetful semantic memory effectively. Applies Zettelkasten atomic memory principles. Use when deciding whether to query or create memories, structuring memory content, or understanding memory importance scoring. Guidance only. Use when you say "how do I create a memory", "how do I link memories…

rjmurillo/ai-agents · 117 tokens

encode-repo-serena

Populates the Forgetful knowledge base using Serena's LSP-powered symbol analysis for accurate, comprehensive codebase understanding. Use when you say "encode this repository", "populate forgetful with this codebase", "onboard to this repo", "refresh project understanding", or "build knowledge base for this project".…

rjmurillo/ai-agents · 97 tokens

exploring-knowledge-graph

Guidance for deep knowledge graph traversal across memories, entities, and relationships. Use when needing comprehensive context before planning, investigating connections between concepts, or answering "what do you know about X" questions.

rjmurillo/ai-agents · 47 tokens

vibing-chat-recall

Use when a vibing.nvim chat session's context feels lost or discontinuous — after a session reset, a dropped connection, or when Claude's own reasoning no longer matches what was discussed earlier in this conversation. Re-reads this conversation's own chat buffer (the buffer announced via the "Current vibing.nvim chat…

shabaraba/vibing.nvim · 130 tokens