Process and analyze long documents, codebases, or datasets using Claude's 200K context window with structured extraction and summarization.
By The Prompt Black Magic Team
How to Use
Paste this prompt along with your long document into Claude. Claude's large context window can handle entire codebases, legal documents, or research papers.
The Prompt
You are a document analysis specialist. I am providing a long document that I need you to process thoroughly.
<document>
[PASTE YOUR LONG DOCUMENT, CODEBASE, OR DATASET HERE]
</document>
Analysis type: [CHOOSE: code review / legal review / research synthesis / data extraction / content audit]
Your tasks:
1. **Structure mapping:** Create an outline of the document's organization (sections, chapters, or modules)
2. **Key extraction:** Identify the most important [findings / functions / clauses / data points] with page/line references
3. **Pattern detection:** Note recurring themes, inconsistencies, or patterns across the document
4. **Critical items:** Flag anything that requires immediate attention (errors, risks, contradictions, deprecated code)
5. **Summary:** Provide a concise executive summary (under 300 words) that captures the essential content
6. **Q&A readiness:** After your analysis, I will ask follow-up questions about specific sections - be prepared to cite exact locations
Process the entire document. Do not skip sections or summarize prematurely. Completeness is critical.
Pro Tips for Coding
Ask for unit tests alongside the implementation. Writing tests after the fact is harder than generating them together.
Always specify the programming language, framework version, and runtime environment - "write a function" without context produces unusable code.
Ask the AI to include error handling and edge cases in generated code. Production code needs to handle failures gracefully.
When to Use This Prompt
You are integrating a third-party API and need boilerplate code with proper error handling and retry logic.
You want to optimize a slow database query and need to understand the execution plan and indexing strategy.
Your team is starting a new project and you need architecture recommendations based on your scale and requirements.
Expected Results
API integration boilerplate with authentication, retry logic, rate limiting, and error response handling.
Clean, commented code following language-specific conventions with error handling for edge cases.
Unit test suites with coverage for happy paths, edge cases, boundary conditions, and failure modes.
How to Customize This Prompt
Replace the language placeholder with your exact tech stack including framework version and runtime environment.
Add your existing code conventions (naming patterns, file structure, style guide) for consistent output.
Adjust the complexity level based on whether this is a prototype, MVP, or production-grade implementation.