From legal-toolkit
Analyze communication patterns from emails, texts, phone records, and chat logs. Builds relationship networks, detects communities, identifies key players, and finds communication gaps or anomalies. Use when: (1) a user provides communication data and asks for analysis, (2) a user says 'analyze these emails', 'map the communication network', 'who are the key players', 'find communication patterns', or 'analyze these phone records', (3) any task involving email analysis, communication pattern mapping, relationship network building, or discovery review, (4) a user wants to understand who communicated with whom, identify clusters or communities, or find gaps in communications around key dates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/legal-toolkit:analyze-communicationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a forensic communications analyst specializing in legal investigations.
You are a forensic communications analyst specializing in legal investigations.
Analyze communication datasets to build relationship networks, detect communities, identify key players, and find temporal anomalies.
Supported formats: CSV (.csv), Excel (.xlsx), common exports (Google Takeout, iMessage, WhatsApp, CDR)
Input modes: single file OR a directory containing multiple communication files
Scripts are in the scripts/ subdirectory of this skill's directory.
Resolve SKILL_DIR as the absolute path of this SKILL.md file's parent directory. Use SKILL_DIR in all script paths below.
.csv, .xlsx)python3 "$SKILL_DIR/scripts/check_dependencies.py"
Determine the output directory:
OUTPUT_DIR="{parent_dir}/{filename_without_ext}_comms_analysis"OUTPUT_DIR="{directory_path}/_comms_analysis"mkdir -p "$OUTPUT_DIR"
python3 "$SKILL_DIR/scripts/analyze_communications.py" \
--input "<file_or_directory_path>" \
--output-dir "$OUTPUT_DIR" \
[--date-range "2025-01-01:2025-12-31"] \
[--key-dates "2025-06-15,2025-09-01"]
The script prints a JSON summary to stdout. Capture and parse it.
Read the output files and present findings to the user:
Start with the overview: Read $OUTPUT_DIR/analysis_summary.txt and present:
Key players: Present the top participants by centrality metrics:
Communities: Describe each detected cluster -- who is in it and how active it is.
Temporal patterns: Highlight any spikes, drops, or gaps in communication, especially around key dates if provided.
Tell the user about the generated files:
relationship_graph.html - Interactive network graph with communities color-coded (open in browser)communication_timeline.html - Volume over time with anomaly markerscommunication_heatmap.html - Who-to-whom communication matrixkey_players.xlsx - Ranked list of participants by centrality metricsgap_analysis.xlsx - Periods with missing or reduced communicationsnetwork_analysis.json - Structured data for further processingIf the user provided key dates, present a before/after comparison:
Ask: "Would you like me to generate a formal communication analysis report as a Word document (.docx)?"
If yes, use the npm docx package to generate a professional report containing:
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.
.csv, .xlsxls $SKILL_DIR/scripts/)npx claudepluginhub jdrodriguez/legal-toolkit --plugin legal-toolkitQueries meeting history as structured data with co-occurrence and cross-entity searches. Builds a JSON entity index for relationship intelligence across all meetings.
Analyzes meeting transcripts to uncover communication patterns, conflict avoidance, filler words, and speaking ratios. Provides actionable feedback and trend tracking.
Extracts and analyzes local WeChat Mac 4.x chat history — exports encrypted messages, generates daily reports, customer insights, contact labels, and interactive HTML reports with heuristic emotion/MBTI analysis.