skills/very-long-text-summarization/SKILL.md
Summarizes very long texts (books, handbooks, biographies, codebases) using hierarchical multi-pass extraction with cheap model armies. Produces structured knowledge maps, not just summaries. Use when processing 50+ page documents, professional handbooks, career biographies, or any text too large for a single context window. Activate on "summarize book", "summarize handbook", "long document", "extract knowledge", "distill text", "professional biography". NOT for short text summarization (<10 pages), real-time chat summarization, or code documentation (use technical-writer).
npx skillsauth add curiositech/windags-skills very-long-text-summarizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Processes texts too large for a single context window using hierarchical multi-pass extraction with armies of cheap models. Produces structured knowledge maps, indexed summaries, and skill drafts — not just prose compression.
1. Output Mode Selection
If user wants quick understanding for meeting prep:
→ Use SUMMARY mode (2-pass: Haiku army → Sonnet synthesis)
If user needs machine-readable knowledge for downstream processing:
→ Use KNOWLEDGE-MAP mode (2-pass with full structured extraction)
If user wants to convert handbook expertise into Claude skill:
→ Use SKILL-DRAFT mode (3-pass: add Opus refinement)
2. Document Size Assessment
If < 20 pages (< 40K tokens):
→ Skip this skill, use direct summarization
If 20-200 pages (40K-400K tokens):
→ Standard 3-pass pipeline, 4K chunks with 500-token overlap
If 200+ pages (400K+ tokens):
→ Large document mode: 8K chunks, 1K overlap, parallel batch processing
3. Quality vs Cost Trade-off
If budget < $0.05:
→ Haiku-only mode: single pass extraction, no synthesis
If budget $0.05-0.20:
→ Standard mode: Haiku extraction → Sonnet synthesis
If budget > $0.20 AND output is skill-draft:
→ Premium mode: Add Opus refinement pass
4. Iteration Threshold
If knowledge map has < 80% concept coverage on first pass:
→ Run second extraction pass with focused prompts on gaps
If extracted processes have < 3 decision points each:
→ Re-extract with decision-focused template
If < 5 failure modes identified in technical text:
→ Run failure-mining pass with anti-pattern detection
Schema Bloat
Chunking Amnesia
Attention Dilution
Traceability Gap
False Convergence
Example 1: Technical Handbook with Cost/Quality Trade-off
Document: "PostgreSQL Administration Handbook" (450 pages, $0.30 budget)
Pass 1 Decision: 450 pages = ~900K tokens = ~225 chunks. At $0.001/chunk = $0.225 for Haiku army. Budget allows standard mode.
Chunking Strategy: Semantic chunking on section headings (##). Average chunk: 4K tokens, 500 overlap.
Pass 1 Extraction (parallel, 3 seconds wall time):
Pass 2 Synthesis (Sonnet, $0.08): Merges 225 chunk extractions into knowledge map with:
Quality Check: Coverage analysis shows 15 failure modes identified, 12 processes have ≥3 decision points each. Meets acceptance criteria.
Total Cost: $0.30, Output: 47-page knowledge map with full traceability.
Example 2: Dense Legal Text Showing Chunking Failure
Document: "Federal Tax Code Section 1031" (78 pages of dense legal text)
First Attempt - Fixed Chunking: 4K token chunks on hard boundaries.
Failure Detection: Knowledge map shows "exchange property" and "sale property" as unrelated concepts. Cross-reference validation fails.
Fix - Semantic Chunking: Split on subsection boundaries (numbered paragraphs).
Result: Correctly extracts "Like-kind exchange applies EXCEPT when property held primarily for sale" as single integrated rule.
Example 3: Codebase Extraction Result
Document: Ruby on Rails codebase (500 files, 50K lines)
Challenge: Code spans multiple files, architectural patterns emerge across modules.
Approach:
Pass 1 Results:
Pass 2 Synthesis:
Output: Architecture knowledge map showing Rails expertise patterns, not code documentation.
Knowledge Map Completeness
Process Extraction Validation
Traceability Verification
Expertise Pattern Quality
Cost/Quality Optimization
Use other skills instead:
For short documents (<10 pages):
For real-time chat summarization:
conversation-synthesizer — this skill is designed for static documents, not live streamsFor code documentation generation:
technical-writer — this skill extracts architectural knowledge, not API docsFor research paper analysis:
research-craft — this skill handles single long documents, not multi-document synthesisFor meeting transcripts:
meeting-synthesizer — this skill assumes structured text, not conversational flowWhen NOT to iterate further:
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.