Marketplace Create skill Sign in

citation-format

Normalize messy citation strings ("CVC 23152a", "California Vehicle Code Section 23152(a)") into canonical form ("Cal. Veh. Code § 23152(a)") before passing to harvester-query.

ID: 785e3389-1f93-49d3-9d14-6c55351ce08c Version: 0.1.0 License: MIT Author: barndonmai Language: en Added: 2026-06-15
⬇ Download

citation-format

Users (and judges, on live demo queries) will type citations any number of ways. The Harvester's /lookup is exact-string match — it'll miss otherwise valid citations because of formatting drift. This skill normalizes them.

When to use this skill

  • Right before calling harvester-query.lookup_citation(...) if the user-provided citation isn't already in canonical form.
  • When you're not sure if a citation is canonical, just run it through normalize() — it's idempotent.

Canonical form (CA Vehicle Code example)

Cal. Veh. Code § 23152(a)
  • Cal. Veh. Code — the universal citation prefix (state-specific)
  • § — section sign with thin spaces
  • 23152(a) — section number with subsection

Use

from openclaw.skills.citation_format.normalize import normalize

normalize("CVC 23152a")                          # → "Cal. Veh. Code § 23152(a)"
normalize("California Vehicle Code Section 23152(a)")
normalize("cal veh § 23152(a)")

From shell:

cd ~/Specter && python3 openclaw/skills/citation_format/normalize.py "CVC 23152a"

Rules of thumb

  1. If you have already-canonical form (Cal. Veh. Code § 23152(a)), pass through unchanged.
  2. If user gives just a section number (23152(a)) and context is clearly California, prepend Cal. Veh. Code § .
  3. Don't guess across jurisdictions. If the user just says "23152(a)" with no state, ask which state. Don't default to CA silently.

Out of scope

  • Case citations (e.g. Smith v. Jones) — this is statute-only.
  • Federal citations (CFR, USC) — vehicle codes are state-level.
  • Resolving statutes that have been renumbered. Out of scope for hackathon.

Comments

Loading…

Related Skills

United States flagUnited States · general

vertical-legal

Pre-configured legal vertical pack for the ai-brain-starter substrate. Ships typed-memory categories for matter management and privilege handling, re…

adelaidasofia
United States flagUnited States · general

Tax Return Summary

Produces structured, citation-backed summaries of tax returns (Form 1040, schedules, W-2s, 1099s) for divorce, personal injury, and bankruptcy litiga…

CaseMark
United States flagUnited States · general

Statutory Interpretation Guide (US Law)

First-pass framework for reading, interpreting, and structuring statutory analysis of US federal, state, and local law. Produces draft analysis for a…

LegalQuants
United States flagUnited States · general

research-start-lawdroidai

Research roadmap for a legal issue — statutory starting points, case law areas, agency guidance, secondary sources (NCLC, Shriver Center, practice ma…

lawdroidAI
United States flagUnited States · general

Legal Project Management Summary

Produces U.S. legal project management summaries consolidating objectives, scope, timeline, budget, resources, risks, and next steps into a stakehold…

CaseMark