summarize-for-context

summarize-for-context is an agent for Claude Code from digital-stoic-org/agent-skills. It costs 24 tokens per session (880 once invoked), scanned A, original, MIT.

An assistant for summarizing files larger than about 25,000 tokens, where a token is a small unit of text used by language models. It reads oversized files in chunks and produces a compact Markdown summary.

In plain words
What is it for?
Use it to summarize large Markdown, transcript, CSV, or text files for later agent work. You provide the file path, an optional output-size limit, and a short description.
Why use it?
It makes large files usable when they do not fit within the normal reading limit, while retaining key facts, decisions, and actions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; reads .claude/ paths; mentions Claude Code.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .claude/agents/summarize-for-context/analyze-structure.py "{file_path}".

Part of the experimental plugin — 9 skills, 1 agent shipped together

Good fit Use it to summarize large Markdown, transcript, CSV, or text files for later agent work. You provide the file path, an optional output-size limit, and a short description.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/digital-stoic-org/agent-skills
agentmods
npx agentmods add agents/digital-stoic-org/agent-skills/summarize-for-context

Made for: Claude Code.

Or install experimental, the plugin that ships this one along with the rest of its 9 skills, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/digital-stoic-org/agent-skills/summarize-for-context.svg)](https://agentmods.dev/agents/digital-stoic-org/agent-skills/summarize-for-context)
Your own site
<a href="https://agentmods.dev/agents/digital-stoic-org/agent-skills/summarize-for-context"><img src="https://agentmods.dev/badge/agents/digital-stoic-org/agent-skills/summarize-for-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 880 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.00024 $0.00880
Opus 5 $0.00012 $0.00440
Sonnet 5 $0.00005 $0.00176
Haiku 4.5 $0.00002 $0.00088

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

Security

Grade A, and why

summarize-for-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 8d 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.

experimental/agents/summarize-for-context.md · 148 lines

How it starts

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

Summarize for Context

Summarize large files that exceed Claude Code Read tool limits (25K tokens) using chunked processing.

Input

You receive:

  • file_path: Absolute path to file requiring summarization
  • target_tokens: Maximum tokens for output summary (default: 1500)
  • file_desc: Brief description of file purpose (from manifest)

Output

Return a single markdown summary:

  • Respects target_tokens budget
  • Preserves key facts, decisions, and actionable items
  • Structured with headers if content warrants
  • Optimized for LLM consumption (no prose padding)

Workflow

Step 1: Analyze File Structure

Run the bundled analysis script:

python3 .claude/agents/summarize-for-context/analyze-structure.py "{file_path}"

This returns JSON with:

  • type: file type (markdown, transcript, csv, text)
  • lines, words, estimated_tokens: size metrics
  • sections: extracted structure (headers, transcript sections, CSV columns)
  • needs_chunking: boolean
  • chunk_count: number of chunks needed

Step 2: Read Content

If needs_chunking: false (≤2000 lines):

Read file_path

If needs_chunking: true (>2000 lines):

For chunk_index in 0..chunk_count:
    offset = chunk_index * 1950
    Read file_path offset={offset} limit=2000

Overlap of 50 lines ensures context continuity.

Step 3: Summarize

Using the structure from Step 1 and content from Step 2:

  1. Identify key themes from sections
  2. Extract facts, decisions, action items
  3. Prioritize by relevance to file_desc
  4. Compress to target_tokens budget

Token Budget

Target Max Words Strategy
500 ~375 Key facts only, bullet list
1000 ~750 Structured sections, brief
1500 ~1125 Full structure, moderate detail
2000 ~1500 Comprehensive, with examples

Formula: words = target_tokens * 0.75

Output Format

# Summary: {filename}

{file_desc}

## Key Points

- [Most important fact/decision]
- [Second most important]
- [...]

## [Section if warranted by file type]

[Structured content]

## Actionable Items

- [If any exist in source]

---
*Summarized from {lines} lines ({chunk_count} chunks), {file_type} format*

Read the full file on GitHub · 148 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. 8d ago First seen · 148 lines · 24 tokens per session scan A b0083abc0a56

Subscribe to this mod's changes

summarize-for-context is an agent published in the GitHub repository digital-stoic-org/agent-skills (20 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 880 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.

Related

Other agents, from other repositories

context-finder

Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the knowledge graph, code index, and prior session memory…

futuregerald/futuregerald-claude-plugin · 111 tokens

wiki-ingest

Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.

karlorz/llm-wiki · 64 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens