case-file-analyzer

case-file-analyzer is a skill for Claude Code, Codex from LegalQuants/lq-skills. It costs 61 tokens per session (2,736 once invoked), scanned A, original, Apache-2.0.

A proof-of-concept tool for analysing large folders of legal case files. It extracts facts, claims, and legal views into XML metadata, then checks for contradictions and builds a timeline.

In plain words
What is it for?
Use it to process case files one at a time, verify factual and logical claims, check completeness, and identify inconsistencies across documents.
Why use it?
It reduces the need to review every document manually and helps preserve context across large collections of files. It is not a finished, ready-to-use product.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to process case files one at a time, verify factual and logical claims, check completeness, and identify inconsistencies across documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/legalquants/lq-skills/case-file-analyzer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LegalQuants/lq-skills --skill case-file-analyzer
Clone the repo
git clone --depth 1 https://github.com/LegalQuants/lq-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for case-file-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/legalquants/lq-skills/case-file-analyzer/github.svg)](https://agentmods.dev/skills/legalquants/lq-skills/case-file-analyzer)
Your own site
<a href="https://agentmods.dev/skills/legalquants/lq-skills/case-file-analyzer"><img src="https://agentmods.dev/badge/skills/legalquants/lq-skills/case-file-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for case-file-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/legalquants/lq-skills/case-file-analyzer"><img src="https://agentmods.dev/badge/skills/legalquants/lq-skills/case-file-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,736 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.02736
Opus 5 $0.00030 $0.01368
Sonnet 5 $0.00012 $0.00547
Haiku 4.5 $0.00006 $0.00274

Measured 12d ago against content hash 10ec726da50d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

case-file-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/case-file-analyzer/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stateless Case File Analyzer (Ralph Loop Edition)

⚠️ Proof of concept. This is an open-source demo showing how far agentic case file revision can be implemented efficiently. It is not a finished ready-to-use product.

Attribute Value
Description Stateless, autonomous AI agent utilizing the R.A.L.P.H. pattern for adversarial and structured case file analysis. Runs parallel verification for factual claims, logic, and completeness across massive document directories.
Author Attorney Dennis G. Jansen / J-Law.de
Version 3.1.0
Jurisdiction Agnostic
Last Reviewed 2026-05
Last Reviewed By LegalQuants (QA remediation)
Tags legal-analysis, quality-control, multi-agent, verification, adversarial, certificate, ralph-loop

What it does & What it doesn't do

What it does:

  • Granular Extraction: Scans case files one by one in isolated executions, extracting facts, claims, and legal views into standardized XML metadata.
  • Context Preservation: Uses the R.A.L.P.H. pattern (stateless disk-I/O loops) to prevent "Lost in the Middle" context degradation on massive case files.
  • Adversarial Synthesis: Acts as a quality gate, reviewing fully prepared metadata across all files to synthesize a cohesive legal perspective and timeline.

What it doesn't do:

  • No Memory: It does not remember past conversational context. If it is not written to PRD.md or a state file, it does not exist.
  • No Legal Advice: It does not replace licensed human counsel. It is a structural decomposition and synthesis tool.
  • No Conversational Filler: It does not chat. It reads instructions, executes a single task, writes to disk, and terminates.

The 3-Step Execution Process

When triggered via "scan case files", the agent orchestrator must execute the following sequence via the R.A.L.P.H. loop:

  1. Step 1: Granular Review & Metadata Extraction Review each file individually. Create metadata, tags, and review results via the Ralphing Skill, unless the existing review on the disk is already complete and sufficient. Output using the Individual Summary Template.
  2. Step 2: Perspective Analysis Review the fully prepared review results and metadata from Step 1 across all files under a specific, user-defined legal perspective (e.g., procedural errors, substantive validity, evidentiary contradictions).
  3. Step 3: Holistic Synthesis Synthesize the conclusion and results across all relevant files into a final case report, utilizing the Synthesis Template.

Read the full file on GitHub · 122 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 122 lines · 61 tokens per session scan A 10ec726da50d

Subscribe to this mod's changes

case-file-analyzer is a skill published in the GitHub repository LegalQuants/lq-skills (54 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 2,736 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories