From legal-toolkit
Draft filing-ready criminal defense motions (suppress, dismiss, exclude, limine, compel, sentencing memo) from case documents and optional templates. Reads case files (PDF, DOCX, TXT), extracts facts, fills templates, produces complete motions with cited facts, IRAC/CRAC arguments, evidence references, and prayer for relief. All case law flagged [VERIFY]. Use when: (1) a user says 'draft a motion', 'write a motion to suppress', 'prepare a motion to dismiss', or similar, (2) a user provides case documents and asks for a motion, (3) a user has a motion template to fill with case facts.
npx claudepluginhub jdrodriguez/legal-toolkit --plugin legal-toolkitThis skill uses the workspace's default tool permissions.
Draft filing-ready criminal defense motions from case documents and templates. Reads case files, extracts facts, and produces complete motions with case-specific arguments -- not summaries, not outlines, full motions ready for attorney review.
Generates legal service documents including litigation proposals, consultation reports, non-litigation schemes, advice letters, communication reports, closing reports, and case analysis summaries from case materials or records. Use when structuring legal case info into professional formats.
Enforces Volokh's Academic Legal Writing rules for law review articles, seminar papers, and legal scholarship. Mandates docx templates, counterargument rebuttals, and primary source citations.
Generates templated responses to legal inquiries like DSARs, subpoenas, NDAs, and litigation holds, with escalation checks for complex cases requiring professional review.
Share bugs, ideas, or general feedback.
Draft filing-ready criminal defense motions from case documents and templates. Reads case files, extracts facts, and produces complete motions with case-specific arguments -- not summaries, not outlines, full motions ready for attorney review.
Resolve SKILL_DIR as the absolute path of this SKILL.md file's parent directory.
For cases with 5+ source documents or multiple motions requested, delegate the drafting work to subagents to avoid exceeding the context window.
WORK_DIR as {parent_dir}/{case_name}_motion_work.
$WORK_DIR/case_materials.md with source document headers.$WORK_DIR/motion_context.md.mkdir -p "$WORK_DIR/sections".| Agent | Task | Max Lines | Output File |
|---|---|---|---|
| Facts Agent | Caption + Statement of Facts + Evidence References (3a, 3b, 3e) | 200 | $WORK_DIR/sections/motion_facts.md |
| Law Agent | Legal Standard + Argument + Prayer for Relief (3c, 3d, 3f) | 250 | $WORK_DIR/sections/motion_law.md |
For multiple motions, launch one agent per motion, each drafting a complete motion (max 400 lines) and writing to $WORK_DIR/sections/motion_{type}.md.
Include in each agent's prompt — copy the relevant format specifications from the ## Step 3: Draft the Motion section below, plus all of the following rules verbatim:
Subagent Output Rules (mandatory)
- Do NOT add a title page or redundant motion heading. Start directly with your assigned section (facts or law). The orchestrator will assemble the final motion.
- Stay within {max_lines} lines. Be concise and precise — courts have page limits and verbosity weakens arguments.
- Do not duplicate content that belongs in the other agent's section. The facts agent must not argue law; the law agent must not restate the factual narrative.
- No preamble, no meta-commentary, no "Here is the draft" wrapper text. Output only the motion content itself.
- Read
$WORK_DIR/case_materials.mdand$WORK_DIR/motion_context.md. Follow the template if provided. Fill all caption fields from the case file — use [FILL] for missing values. Mark all case law as [VERIFY]. Write output to{output_file}.
Collect and assemble: Read output files in order — motion_facts.md first (caption, statement of facts, evidence references), then motion_law.md (legal standard, argument, prayer for relief). Merge into a single complete motion document. Trim any duplicated content or boilerplate that agents may have added despite instructions. Present with the gaps/verification checklist from Step 4.
Ask the user for the following (if not already provided):
If the user provided file paths, extract text before drafting.
PDF files:
python3 -c "
import sys
try:
import fitz
doc = fitz.open(sys.argv[1])
text = ''
for page in doc:
text += page.get_text()
if len(text.strip()) < 50:
print('SCANNED_PDF', file=sys.stderr)
sys.exit(1)
print(text)
except Exception as e:
print(f'ERROR: {e}', file=sys.stderr)
sys.exit(1)
" "<file_path>"
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.DOCX files:
python3 -c "
import sys
from docx import Document
doc = Document(sys.argv[1])
for p in doc.paragraphs:
print(p.text)
for table in doc.tables:
for row in table.rows:
print('\t'.join(cell.text for cell in row.cells))
" "<file_path>"
TXT/MD files: Read directly with the Read tool.
If the user pasted text directly: Skip extraction, use the text as-is.
Combine all extracted text into a single case file reference, preserving source file names for citation purposes (e.g., "Arrest Report, p. 3").
You are a criminal defense attorney drafting a motion for filing. If a motion template was provided, use it as the structural guide. Draw all facts exclusively from the case documents. Produce a complete, filing-ready draft.
Fill in every field from the case file: court name, case number, judge, defendant name, State/People/Commonwealth (match jurisdiction), motion title. No placeholders. If information is missing from the case file, flag it as [FILL -- not found in case file] rather than guessing.
Draw exclusively from the case file. Include specific dates, times, locations, officer names, and actions. Cite page numbers from the source documents throughout. Write as factual narrative -- this is advocacy, not a neutral recitation. Emphasize facts favorable to the defense. Include unfavorable facts where necessary for completeness, but frame them strategically.
State the applicable legal standard for the motion type. Reference the relevant constitutional provision, statute, or rule. If the template includes a legal standard section, follow its structure. Mark any case citations with [VERIFY].
Structure arguments following the template and the preferred format (IRAC, CRAC, or the template's own structure). For each argument:
If the knowledge base includes the NHTSA manual, cite specific manual sections and pages when arguing field sobriety test deviations. If state statutes are available, cite specific sections and subsections.
Order arguments by strength -- lead with the most compelling argument unless the template specifies a different order.
When citing officer conduct, witness statements, or test results, quote directly from the source document and include the page number. Format: "(Arrest Report, p. 3)" or "(Body Cam Transcript, 01:23:45)."
Match the template's format. Specify the exact relief requested: suppress specific evidence, dismiss specific charges, exclude specific testimony, preclude specific arguments at trial.
Present the complete draft to the attorney. After the draft, include:
Ask: "Want me to revise any sections, strengthen specific arguments, adjust the tone, or reorder the arguments?"
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.
Adapt the output structure for each motion type. A motion to compel looks different from a motion to suppress -- follow the template provided.