legal-search
Search US and EU case law, court opinions, dockets, and regulations via CourtListener, Harvard Case Law, and EUR-Lex. Use when: (1) finding US court opinions by keyword or citation, (2) searching federal and state dockets, (3) querying EU legislation and case law, (4) looking up cases by date range or jurisdiction. NOT for: current legislation text (use congress.gov), legal advice (never provide), patent search (use USPTO APIs).
Best use case
legal-search is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Search US and EU case law, court opinions, dockets, and regulations via CourtListener, Harvard Case Law, and EUR-Lex. Use when: (1) finding US court opinions by keyword or citation, (2) searching federal and state dockets, (3) querying EU legislation and case law, (4) looking up cases by date range or jurisdiction. NOT for: current legislation text (use congress.gov), legal advice (never provide), patent search (use USPTO APIs).
Teams using legal-search should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/legal-search/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How legal-search Compares
| Feature / Agent | legal-search | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Search US and EU case law, court opinions, dockets, and regulations via CourtListener, Harvard Case Law, and EUR-Lex. Use when: (1) finding US court opinions by keyword or citation, (2) searching federal and state dockets, (3) querying EU legislation and case law, (4) looking up cases by date range or jurisdiction. NOT for: current legislation text (use congress.gov), legal advice (never provide), patent search (use USPTO APIs).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Legal Case Law and Regulation Search
Search US case law via CourtListener and Harvard Case Law Access Project, and EU
law via EUR-Lex. Covers court opinions, dockets, and legislative documents.
## CourtListener API (US Case Law)
Free, open API for US federal and state court opinions and dockets.
Base URL: `https://www.courtlistener.com/api/rest/v4/`
### Search Opinions
```bash
curl -s "https://www.courtlistener.com/api/rest/v4/search/?q=qualified+immunity&type=o&order_by=score+desc" \
| python3 -c "
import sys, json
data = json.load(sys.stdin)
for r in data.get('results', [])[:10]:
name = r.get('caseName', 'N/A')
court = r.get('court', 'N/A')
date = r.get('dateFiled', 'N/A')
cite = r.get('citation', [r.get('sibling_ids', 'N/A')])
print(f'[{date}] {name}')
print(f' Court: {court}')
print()
"
```
### Search Dockets
```bash
curl -s "https://www.courtlistener.com/api/rest/v4/search/?q=antitrust+merger&type=r&order_by=score+desc"
```
### Filter by Date Range
```bash
curl -s "https://www.courtlistener.com/api/rest/v4/search/?q=fourth+amendment+digital+privacy&type=o&filed_after=2020-01-01&filed_before=2024-12-31&order_by=dateFiled+desc"
```
### Filter by Court
```bash
# Supreme Court opinions
curl -s "https://www.courtlistener.com/api/rest/v4/search/?q=free+speech&type=o&court=scotus&order_by=dateFiled+desc"
# Specific circuit court
curl -s "https://www.courtlistener.com/api/rest/v4/search/?q=patent+eligibility&type=o&court=cafc&order_by=dateFiled+desc"
```
### Common Court Codes
`scotus` (SCOTUS), `ca1`-`ca11` (Circuit Courts), `cafc` (Federal Circuit),
`cadc` (DC Circuit), `nyd` (SDNY), `cand` (N.D. Cal).
## Harvard Case Law Access Project
Historical US case law (1658-2020). Free API with registration.
Base URL: `https://api.case.law/v1/`
### Search Cases
```bash
curl -s "https://api.case.law/v1/cases/?search=miranda+rights&decision_date_min=2000-01-01&page_size=10" \
| python3 -c "
import sys, json
data = json.load(sys.stdin)
for c in data.get('results', []):
name = c.get('name_abbreviation', 'N/A')
date = c.get('decision_date', 'N/A')
court = c.get('court', {}).get('name', 'N/A')
cite = c.get('citations', [{}])[0].get('cite', 'N/A') if c.get('citations') else 'N/A'
print(f'[{date}] {name}')
print(f' Citation: {cite} Court: {court}\n')
"
```
### Search by Citation
```bash
curl -s "https://api.case.law/v1/cases/?cite=410+U.S.+113"
```
### Filter by Jurisdiction
```bash
curl -s "https://api.case.law/v1/cases/?search=eminent+domain&jurisdiction=cal&decision_date_min=2010-01-01&page_size=10"
```
## EUR-Lex (EU Law)
Access EU legislation, case law, and treaties via the EUR-Lex SPARQL endpoint.
### Search EU Legislation via SPARQL
```bash
curl -s -G "https://eur-lex.europa.eu/EURLexWebService" \
--data-urlencode "query=SELECT ?doc ?title WHERE {
?doc a <http://publications.europa.eu/ontology/cdm#regulation> ;
<http://publications.europa.eu/ontology/cdm#resource_legal_title> ?title .
FILTER(CONTAINS(LCASE(?title), 'artificial intelligence'))
} LIMIT 10" \
--data-urlencode "format=application/sparql-results+json"
```
### Lookup by CELEX Number
```bash
curl -s "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679" -o gdpr.html
```
## Best Practices
1. Use CourtListener for recent US case law; it has the most up-to-date coverage.
2. Use Harvard Case Law for historical cases and bulk data access.
3. CourtListener requires no API key for basic search; register for higher rate limits.
4. Always include date filters to narrow results for broad legal topics.
5. For citation lookups, normalize to standard reporter format (e.g., "410 U.S. 113").
6. EUR-Lex SPARQL queries can be complex; start with keyword REST search first.
7. Never provide legal advice; present search results as reference material only.Related Skills
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
social-science-research
Orchestrates a social science research workflow from literature review through data collection, text analysis, statistical modeling, and report generation. Use when conducting empirical social science research, policy analysis, or mixed-methods studies. NOT for pure natural science analysis or clinical trial data.
search-strategy
COPYRIGHT NOTICE
research-reflection
Reflect on completed research tasks to improve future performance. Use when: a research task has just been completed and the agent should evaluate its own process, store lessons learned, or retrieve past reflections before starting new work. NOT for: active research execution or data analysis.
research-lookup
Look up current research information using the Parallel Chat API (primary) or Perplexity sonar-pro-search (academic paper searches). Automatically routes queries to the best backend. Use for finding papers, gathering research data, and verifying scientific information.
research-literature
COPYRIGHT NOTICE
research-grants
Write competitive research proposals for NSF, NIH, DOE, DARPA, and Taiwan NSTC. Agency-specific formatting, review criteria, budget preparation, broader impacts, significance statements, innovation narratives, and compliance with submission requirements.
research-ethics
Guides research ethics compliance including IRB protocol preparation, informed consent document drafting, research integrity standards, data management plans, and ethical considerations for human/animal subjects; trigger when users discuss IRB, ethical approval, consent forms, or responsible conduct of research.
pubmed-search
Search PubMed/MEDLINE for biomedical literature via NCBI E-utilities API. Use when: (1) searching medical/biomedical papers, (2) finding clinical studies, (3) querying with MeSH terms, (4) retrieving abstracts by PMID. NOT for: non-biomedical papers (use arxiv-search or semantic-scholar), full-text access (PubMed provides abstracts), or social science literature.
psychology-research
Conduct psychological research analysis including mental health, cognitive science, and behavioral studies
perplexity-search
Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.
openalex-search
Open academic metadata via OpenAlex API. Use when: user needs author profiles, institution data, concept mapping, or open citation data. NOT for: full-text search or downloading papers.