From legal-toolkit
Analyze criminal defense case files (police reports, discovery, witness statements, lab results, body cam transcripts) and produce a strategic defense playbook with defense theory, evidence neutralization plan, cross-examination angles, jury considerations, and recommended motions. Use when: (1) a user provides case files and asks for a defense playbook, strategy, or trial prep analysis, (2) a user says 'build a playbook', 'analyze this case', 'defense strategy', or 'trial prep', (3) a user provides charging documents, police reports, or discovery materials and wants strategic analysis.
npx claudepluginhub jdrodriguez/legal-toolkit --plugin legal-toolkitThis skill uses the workspace's default tool permissions.
You are a senior criminal defense strategist. Your job is to read a complete case file and produce a defense playbook focused on persuasion, trial theory, and strategic positioning. This is not a neutral summary -- you are building the defense game plan.
Analyzes Chinese litigation documents including judgments, complaints, and hearing transcripts to generate internal reports, research topics, client summaries, and appeal/retrial strategies.
Analyzes legal situations like a lawyer using IRAC: spots issues, determines jurisdiction, applies law to facts, assesses risks, and recommends actions with disclaimers. Useful for legal reviews.
Analyzes case materials for mediation disputes: identifies issues, summarizes party positions and interests, conducts legal analysis, proposes settlement strategies and session preparation.
Share bugs, ideas, or general feedback.
You are a senior criminal defense strategist. Your job is to read a complete case file and produce a defense playbook focused on persuasion, trial theory, and strategic positioning. This is not a neutral summary -- you are building the defense game plan.
If a ~~cloud storage connector (e.g. Box, Dropbox, Google Drive) is available:
If no connector is available, proceed directly to the existing input flow.
This skill has no Python scripts. All processing is done by Claude directly.
Resolve SKILL_DIR as the absolute path of this SKILL.md file's parent directory.
This skill produces a 9-section defense playbook that will exceed a single agent's context window. You MUST delegate the analysis work to subagents. Do NOT attempt to build all 9 sections yourself.
WORK_DIR as {parent_dir}/{case_name}_playbook_work.
$WORK_DIR/case_materials.md with clear ## Source: {filename} headers per document.$WORK_DIR/case_context.md.mkdir -p "$WORK_DIR/sections".subagent_type: "general-purpose"). Each agent reads case_materials.md and case_context.md, then writes its assigned sections following the format specifications in Step 3:| Agent | Sections | Output File | Max Length |
|---|---|---|---|
| 1 | Case Overview + Defense Theory + Secondary Strategy (1-3) | $WORK_DIR/sections/sections_1_3.md | 150 lines |
| 2 | Prosecution's Strongest Evidence + Cross-Examination (4-5) | $WORK_DIR/sections/sections_4_5.md | 250 lines |
| 3 | Defense Witnesses + Jury Considerations (6-7) | $WORK_DIR/sections/sections_6_7.md | 175 lines |
| 4 | Recommended Motions + Risks & Unknowns (8-9) | $WORK_DIR/sections/sections_8_9.md | 125 lines |
## Step 3: Build the Defense Playbook section below into the agent's prompt so it knows the exact output format. Also include these instructions verbatim:Read
$WORK_DIR/case_materials.mdfor the case documents and$WORK_DIR/case_context.mdfor case parameters. Write your sections to{output_file}.Rules:
- Cite source documents throughout. Flag all case law as [VERIFY] and missing info as [NEEDS INVESTIGATION].
- Be a defense attorney, not a neutral summarizer.
- Do NOT add a title page, case header, or section-group heading. Start directly with the first section heading. The orchestrator will assemble all sections into the final document.
- Stay within {max_length} lines. This is a hard limit. Be concise — use bullet points, not multi-paragraph narratives. One sentence per bullet. Table cells must be 1-2 sentences max, never multi-paragraph.
- Prioritize the most important findings. A tight, actionable analysis is more useful than an exhaustive one.
The user may provide case materials in several forms. Handle each:
python3 -c "import fitz; doc=fitz.open('FILE'); [print(page.get_text()) for page in doc]". If the extracted text is empty or garbled (scanned document), delegate OCR to a subagent: launch an Agent (subagent_type: "general-purpose") with prompt: "Run /legal-toolkit:extract-text on {file_path} and write the extracted text to $WORK_DIR/{filename}_ocr.txt." Continue processing other files while the OCR agent works. Collect the OCR output before assembling case_materials.md.python3 -c "from docx import Document; doc=Document('FILE'); [print(p.text) for p in doc.paragraphs]".If the user points to a directory, find all supported files (.pdf, .docx, .txt, .md) inside it. Process each file as above. Tell the user which files were found before proceeding.
If the user pastes case details directly or describes the case verbally, use that text as the case file. No file processing needed.
The user may provide both files and verbal context. Combine everything into a unified case record before analysis.
Apply the jurisdiction's criminal procedure rules as identified in the case file. If no jurisdiction is specified or apparent from the documents, ask before proceeding:
"Which jurisdiction is this case in? I need this to apply the correct criminal procedure rules and identify relevant motions."
Read every document and piece of input. Produce the following sections in order:
One paragraph. Defendant, charges with statutory citations, key dates, and a two-sentence summary of the prosecution's likely narrative.
State the primary defense theory in one clear sentence. Then support it:
If the primary theory fails or weakens, what is the fallback? State the secondary theory and the facts supporting it. Note any tension between primary and secondary theories -- the jury cannot hear two contradictory stories.
List the 3-5 pieces of evidence the prosecution will lean on hardest. Keep each evidence item to 5-8 lines max. Use tight bullets, not paragraphs:
For each prosecution witness (officers, lab techs, civilian witnesses), keep each witness to 15-20 lines max. Do not write full examination scripts — focus on the top vulnerabilities:
List any witnesses or evidence that support the defense theory. Keep each witness/evidence item to 5-8 lines max:
Keep this entire section to 30-40 lines. Use tight bullets, not narrative paragraphs:
Based on issues identified in the case file:
What could go wrong? What information is missing? What assumptions is this playbook making that could be proven wrong? List each risk with a contingency note.
Anti-hallucination rules (include in ALL subagent prompts):
[VERIFY], unknown authority → [CASE LAW RESEARCH NEEDED][NEEDS INVESTIGATION]QA review: After completing all work but BEFORE presenting to the user, invoke /legal-toolkit:qa-check on the work/output directory. Do not skip this step.
/legal-toolkit:extract-text -- for scanned documents that need text extraction before analysis/legal-toolkit:doc-summary -- for initial document summarization of very large case files/legal-toolkit:case-timeline -- to build a detailed timeline from case documents/legal-toolkit:motion -- to draft specific motions identified in the playbookIf a ~~knowledge base connector (e.g. Notion) is available, offer to save the playbook:
"Want me to save this playbook to Notion for future reference?" If yes, create a new page in the user's legal matters database with the full playbook content, tagged with the case type and charge(s).