# citewarden

> Verify legal case citations against the CourtListener record to catch hallucinations and party name mismatches.

citewarden is a free AI agent skill on Agensi by Umer Farooq, in Legal & Compliance. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Umer Farooq](https://www.agensi.io/creators/umer-farooq-1)
- Category: [Legal & Compliance](https://www.agensi.io/skills/legal-compliance)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/citewarden
- Tags: legal, security, legal-compliance, courtlistener, python, citation-checking

## About this skill

LLM-drafted legal documents often include fabricated or mismatched case citations, leading to severe professional and judicial consequences. CiteWarden mitigates this risk by verifying citations against the real court record rather than relying on model memory. It identifies hallucinated cases that reuse real reporter volumes and pages but substitute incorrect party names.

### What it does
- **Citation Extraction** automatically parses legal text to identify full case citations, short forms, and statutes.
- **Record Verification** checks full volume and page citations against the CourtListener/Free Law Project database.
- **Name Cross-Checking** detects instances where a citation refers to a real case but the provided party names do not match the official record.
- **Categorized Reporting** separates verifiable full citations from short-form references (`Id.`, `supra`) and non-case citations like statutes.
- **Risk Signaling** flags unmatched citations for manual review without making definitive claims of fabrication.

### How it works
1. **Source Ingestion** where the user pastes a brief or memo into the agent environment.
2. **Secure Writing** of the untrusted text to a local temporary file to prevent shell injection or command breakage.
3. **Execution** of the verification script using a Free Law Project API token to query the official record.
4. **Data Analysis** of the resulting JSON to match party names and verify citation existence.
5. **Report Delivery** including a verification table, mismatch alerts, and mandatory legal disclaimers.

### Frameworks & tools
The skill requires `python3` with the `eyecite` and `requests` libraries. It interfaces with the **CourtListener API** and uses local file handling to process legal documents securely.

### Why this beats prompting it yourself
Standard LLMs frequently hallucinate convincing but non-existent case law because they predict tokens rather than querying databases. CiteWarden forces an external truth check against a primary source, catching "phantom" citations that look correct but point to the wrong case or no case at all.

### Use cases
- Verify AI-generated drafts before filing them with a court.
- Cite-check opposing counsel's briefs for fabricated authority.
- Audit internal memos for accuracy in citation formatting and naming.
- Rapidly identify non-indexed or unpublished cases requiring manual lookup.

### Known limitations
This tool does not verify statutes, regulations, or local rules. It cannot determine if a case is still "good law" (it does not Shepardize) or if a specific quote within the case is accurate.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the citewarden skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does CiteWarden differ from a standard LLM's ability to check citations?

CiteWarden performs a live cross-reference of your document's citations against the CourtListener database to ensure party names match the official record, catching "hallucinations" that standard LLMs often generate.

### Does this tool verify if a case is still valid law or perform Shepard's signals?

The skill focuses on identifying whether a cited case exists and if the party names are correct; it does not perform "Shepardizing" to determine if a case has been overturned or is still good law.

### What technical prerequisites or API keys do I need to run CiteWarden?

This skill is designed for AI agents that support Python environments and requires a Free Law Project API token to access the official CourtListener record.

### What is included in the purchase of this skill?

You will receive the CiteWarden agent skill package, installation instructions for the required Python libraries (eyecite and requests), and a guide for configuring your CourtListener API integration.

### Can CiteWarden verify short-form citations like "Id." or "supra"?

CiteWarden is optimized for full case citations (volume and page); while it identifies short-form references like "Id." and "supra" for your review, it cannot verify them against the database without a full citation context.

### How does CiteWarden handle the security of the legal documents I process?

To protect sensitive legal data, the skill writes text to a local temporary file for processing rather than passing raw text through potentially insecure shell commands.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
