Legal Citation Extraction logo

Legal Citation Extraction

Organization
open-legal-products
legal-citation-extraction

Extract every legal citation from an English-language text by pattern rather than judgement: ECLI identifiers (CJEU and national), EU act identifiers (CELEX, Official Journal references, Regulation and Directive numbers), case names and numbers, and cited provisions, then normalise, deduplicate, and resolve short references (ibid., id., supra, op. cit., the above-cited judgment) to their antecedents. The front-end to citation verification: find every citation first, then check it. Use before verifying authorities, before sending a brief or opinion, or when asked what a text cites.

Overview

Publisheropen-legal-products
Repositorymike-workflows
Skill namelegal-citation-extraction
Stars
91
Forks
43
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by open-legal-products on GitHub. Read the source before you install it.

Installation

Install the Legal Citation Extraction AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/open-legal-products/mike-workflows/tree/main/assistant-workflows/eu-gdpr-pack/legal-citation-extraction
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/open-legal-products/mike-workflows.git /tmp/mike-workflows
mkdir -p .claude/skills
cp -r /tmp/mike-workflows/assistant-workflows/eu-gdpr-pack/legal-citation-extraction .claude/skills/legal-citation-extraction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal Citation Extraction in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Legal Citation Extraction on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Legal Citation Extraction is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Legal Citation Extraction

You can only verify what you first find. Grounding a citation checks whether it exists in the source - but it runs on a list that someone has to assemble first. This workflow is that front-end: it walks the text and lists every authority, so none slips past verification. A missed citation is an unverified one.

Extraction is mechanical - by patterns and rules, not by judgement - on purpose: an unconstrained reading might miss a citation or invent one.

Three steps

  1. Extraction - recognise and capture every reference by the patterns below.
  2. Aggregation - resolve short references (ibid., id., supra, op. cit., "the above-cited judgment") to their antecedents by the pointer-aware rules below, so they count as one citation, not several.
  3. Hand-off - pass the structured list to verification: does each cited authority exist, and does it say what the text claims.

Citation patterns

Case law

  • ECLI (EU): ECLI:EU:C:2020:559 (Court of Justice), ECLI:EU:T:2019:... (General Court).
  • ECLI (national): ECLI:NL:HR:2021:..., ECLI:DE:BGH:..., ECLI:PL:SN:....
  • Case names and numbers: Party v Party; CJEU case numbers C-123/20, C-123/20 P (appeal), joined cases C-123/20 and C-124/20; General Court T-456/19.

EU legislation

  • CELEX: 32016R0679, 32019L0790 (sector + year + type + number).
  • Named acts: Regulation (EU) 2016/679, Directive 2019/790, Regulation (EC) No 1/2003.
  • Official Journal: OJ L 119, OJ C 326.

Provisions

  • Article 5(1)(a) GDPR, Art. 263 TFEU, section 12, § 3(2).

Aggregation - short references

Short reference forms carry different resolution rules - they cannot all be sent to the nearest antecedent:

  • ibid., id., loc. cit. - refer to the immediately preceding authority.
  • supra, op. cit. - often carry a pointer that overrides proximity: an author name, a title fragment, or a note number ("Kranenborg, op. cit., p. 12"; "supra note 14"). Resolve by the pointer first; fall back to proximity only when the reference is bare.
  • Descriptive forms (the cited judgment, the above-cited) - match by the described attributes (court, party, subject), not by position alone.

Where more than one antecedent matches, or none does, mark the reference unresolved - manual review instead of guessing: a wrong merge silently fuses two distinct authorities into one. Count each resolved reference as the same citation as its antecedent, but record where it occurs.

Output format

A numbered table with columns: Type, Citation (normalised), Occurrences (page or offset), Antecedent (if a short reference). Close with the list of citations to verify.

Limits

  • Extraction catches references in a known format. A descriptive reference with no identifier ("the Court's data-protection case law") has nothing to match - mark it "no identifier, manual check".
  • This is not existence verification - it says what is cited, not whether the citation is real.
  • The patterns cover the common EU and ECLI formats; an unusual citation style may slip through. At high stakes, review by hand as well.

Attribution

The extraction, aggregation, and annotation architecture follows eyecite (Free Law Project), BSD-2-Clause (https://github.com/freelawproject/eyecite), as a design pattern only - no eyecite code is used. US reporter patterns are dropped; the ECLI, CELEX, OJ, and EU citation patterns and the antecedent rules are the author's own.

Frequently asked questions

What does the Legal Citation Extraction AI skill do?

Extract every legal citation from an English-language text by pattern rather than judgement: ECLI identifiers (CJEU and national), EU act identifiers (CELEX, Official Journal references, Regulation and Directive numbers), case names and numbers, and cited provisions, then normalise, deduplicate, and resolve short references (ibid., id., supra, op. cit., the above-cited judgment) to their antecedents. The front-end to citation verification: find every citation first, then check it. Use before verifying authorities, before sending a brief or opinion, or when asked what a text cites.

Why use Legal Citation Extraction on TypingMind?

Because you install it once and use it with any model. Legal Citation Extraction is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Legal Citation Extraction in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/open-legal-products/mike-workflows/tree/main/assistant-workflows/eu-gdpr-pack/legal-citation-extraction. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Legal Citation Extraction?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Legal Citation Extraction?

As many as you like. As long as a model supports skills, you can use Legal Citation Extraction with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Legal Citation Extraction AI skill free?

Yes. It is published on GitHub by open-legal-products under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇