| name | caselaw-query |
| title | caselaw-query |
| description | Find appellate cases that cite or interpret a given statute via the CourtListener API (Free Law Project). Use AFTER a Harvester or web_fallback hit, when the user wants case law interpreting the statute. Returns case_name, court, date_filed, courtlistener URL, and a snippet — no opinion text generation. Strict no-fabrication. |
| author | barndonmai |
| author_url | https://github.com/barndonmai/specter/tree/main/openclaw/skills/caselaw_query |
| license | MIT |
| version | 0.1.0 |
| execution_mode | open |
| jurisdiction | general |
| practice | litigation |
| language | en |
caselaw-query
Surfaces real appellate decisions that cite a statute. The "case law interpreting key sections" axis from the hackathon rubric.
When to use this skill
- After
harvester_query.lookup_citation returns a hit and the user asks
things like:
- "any cases on this?"
- "how have courts interpreted this?"
- "is there precedent?"
- "what's the standard for 'reasonable' under § 22350?"
- After
pi_brief_format renders a brief, as a follow-up enrichment.
- For doctrine-level questions where the user names a known section.
When NOT to use it
- Not for fact-pattern triage ("client tripped on a sidewalk…"). CourtListener
is statute-citation-driven, not fact-pattern-driven.
- Not for damages comparables (CourtListener is appellate opinions, not jury
verdicts; settlements aren't there).
- Not as a first-line statute lookup. Always do statute lookup first —
this skill enriches the answer, doesn't replace it.
Hard rules — no fabrication
This skill only surfaces what CourtListener returns. Do not:
- Summarize an opinion you haven't fetched.
- Claim a holding the search snippet doesn't mention.
- Combine multiple cases into "the law says X" without citing each.
- Attribute a quote to an opinion unless the snippet shows it verbatim.
The brief response shape: list the top N cases with case name, court,
date, and the URL. The user clicks the URL to read the actual opinion.
Specter's role is retrieval, not summarization (per SOUL voice rules).
Required env
COURTLISTENER_API_KEY=<token from https://www.courtlistener.com/help/api/rest/#authentication>
Free tier (5,000 queries/hour) is more than enough for the hackathon.
Don't commit the key — .env is gitignored.
How to call
Shell
cd ~/Specter && .venv/bin/python -m openclaw.skills.caselaw_query.client \
"Cal. Veh. Code § 23152(a)" --k 5
cd ~/Specter && .venv/bin/python -m openclaw.skills.caselaw_query.client \
"Tex. Transp. Code § 545.351" --jurisdiction TX --k 3
Python