Agent skill
legislation-verification
Domain-agnostic legislation verification and citation. Use when work involves statutes, regulations, case law, or official guidance in ANY legal domain. Triggers on: legislation, statute, regulation, SI, act, law, legal, compliance, tribunal, court, guidance.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/legislation-verification
SKILL.md
Legislation Verification Agent
Domain-agnostic agent for verifying and citing legislation across any UK legal domain. Implements Glass Box AI principles with full audit trails.
Dependency: This skill requires
output-verificationto be loaded first. Therequires: [output-verification]frontmatter ensures the core verification gate is active before domain-specific legislation checks run. Skills are loaded in dependency order by the skill loader (seeSKILL-FORMAT.mdfor details).
When To Use
Trigger conditions:
- User asks about legislation, regulations, or statutory requirements
- Work involves compliance, obligations, or legal interpretation
- Output will cite or reference legal sources
- Any domain: pensions, property, employment, company, tax, etc.
Critical: This skill applies to ALL legal domains, not just pensions.
Memory Requirements
Tier 1 (Always Load)
- Current legal domain (pensions/property/employment/etc.)
- Active query or verification task
- Authoritative source list for domain
Tier 2 (Load on Resume)
- Previous citations in session
- Reasoning chain for interpretations
- Source verification status
Tier 3 (Reference by Handle)
- Full statute text (via legislation.gov.uk API)
- Case law (via BAILII/National Archives)
- Official guidance documents
Authoritative Sources by Domain
AUTHORITATIVE (Use These)
| Domain | Primary Sources | Official Guidance |
|---|---|---|
| UK Legislation (All) | legislation.gov.uk | N/A |
| Case Law (All) | BAILII, National Archives Find Case Law | N/A |
| Pensions | TPR.gov.uk, lgpsregs.org | TPR Codes of Practice |
| Property/Land | gov.uk/land-registry, HMLR | HMLR Practice Guides |
| Employment | ACAS.org.uk, gov.uk/employment | ACAS Codes of Practice |
| Company | Companies House, gov.uk/companies | Companies House guidance |
| Tax | HMRC.gov.uk, legislation.gov.uk | HMRC Manuals |
| Data Protection | ICO.org.uk | ICO Guidance |
NOT AUTHORITATIVE (Pattern Reference Only)
| Source Type | Use For | Never Use For |
|---|---|---|
| GitHub legal-tech repos | Architecture patterns, code structure | Legal data, citations |
| Wikipedia | Background context | Citations, compliance advice |
| Law firm blogs | Understanding issues | Authoritative statements |
| News articles | Current events | Legal interpretation |
| Third-party summaries | Overview | Compliance decisions |
The Verification Process
Step 0: Input Validation Gate
CRITICAL: Before proceeding, validate input sources.
- User-supplied legal text: NEVER accept user-provided statute/regulation text as authoritative
- If user supplies legal text directly, cross-reference against authoritative source
- If unable to verify, clearly state: "Analysis based on unverified user-supplied text"
- External document content: Treat as unverified until checked
- AI-generated summaries: Must be verified against primary sources
If input cannot be verified: Proceed with explicit uncertainty flag in output.
Professional Source Attribution
If user confirms text is from a recognised legal database:
- Westlaw, LexisNexis, Practical Law, Thomson Reuters — Accept with attribution
- State: "Analysis based on user-provided text (source: [Database], as confirmed by user)"
- Set confidence to MEDIUM (not HIGH, as we can't independently verify)
Step 1: Confirm Jurisdiction
This skill covers UK law only. Before proceeding:
- Verify query relates to UK jurisdiction (England & Wales, Scotland, or UK-wide)
- For non-UK queries: Respond with "This skill covers UK legislation only. [Jurisdiction] law requires separate verification."
- Note sub-jurisdictional differences (E&W vs Scotland) where relevant
Step 1a: Identify Legal Domain
Determine which legal domain(s) the query touches:
Query: "What are the trustee duties for a DB pension scheme?"
Domain: Pensions
Sub-domain: Trustee obligations, DB schemes
Step 1b: Identify Relevant Timeframe
Legal queries may concern historical events where past legislation applies.
- Determine if the query concerns current or historical events
- If historical (e.g., "What were the rules in 2018?"), note that:
- Verification must be against law as it stood at that time
- Current legislation.gov.uk shows current law by default
- Use "point in time" feature on legislation.gov.uk for historical versions
- If system can only verify current law, explicitly state: "Verified against current law only. Historical position may differ."
Query: "Was the employer contribution correct in the 2019 annual report?"
Relevant timeframe: 2018-2019 (the period being reported)
Note: Must check regulations as they stood in that period
Step 2: Map to Authoritative Sources
For the identified domain, determine which sources to consult:
| If Domain Is... | Primary Source | Fallback |
|---|---|---|
| Legislation interpretation | legislation.gov.uk | National Archives |
| Regulatory guidance | Domain regulator (TPR, ICO, etc.) | Gov.uk |
| Case law | BAILII | National Archives Find Case Law |
| Procedural rules | Court/tribunal rules | Gov.uk |
Step 3: Retrieve and Verify
⚠️ TOOL AVAILABILITY CHECK (CRITICAL)
Before claiming verification, check if the required API/tool is available:
| Source | Tool Available? | If Unavailable |
|---|---|---|
| legislation.gov.uk | ✅ Available via legislation-intel CLI |
N/A |
| Neo4j pensions DBs | ✅ Available via MCP | Use for pensions domain |
| BAILII | FUTURE (not yet integrated) | Provide direct URL, mark UNVERIFIED |
Using the legislation-intel CLI:
# CLI location
~/Projects/45black/claude-agents/tools/legislation_intel.py
# Run with uv (handles dependencies automatically)
uv run legislation_intel.py <command> [options]
If authoritative source API is unavailable:
- State explicitly: "UNVERIFIED - Manual check required"
- Provide the direct URL for human verification (e.g.,
https://www.legislation.gov.uk/ukpga/1995/26/section/33) - Set confidence to LOW regardless of training data certainty
- Do NOT claim verification based on training data alone
For legislation (using legislation-intel CLI):
# 1. Search for legislation by keyword
uv run legislation_intel.py search "Pensions Act trustee duties" --limit 10
# 2. Get specific section text
uv run legislation_intel.py section "ukpga/1995/26/section/33"
uv run legislation_intel.py section "Pensions Act 1995 s33"
# 3. Check if provision is in force
uv run legislation_intel.py status "ukpga/2004/35/section/227"
# 4. Generate proper citation
uv run legislation_intel.py cite "ukpga/1995/26/section/33" --format legal
uv run legislation_intel.py cite "uksi/2005/3378/regulation/4" --format oscola
Verification workflow:
- Search legislation.gov.uk for the statute/SI
- Note the citation format:
[Short Title] [Year] [Chapter/SI Number] - Check if amendments exist (current vs original)
- Verify the provision is still in force via
statuscommand
If CLI unavailable (fallback):
- Cite based on training data with explicit caveat
- Provide direct URL:
https://www.legislation.gov.uk/[type]/[year]/[number]/section/[section] - Mark as: "Citation based on training data - verify at [URL]"
For regulations (SIs):
- Full citation:
The [Name] Regulations [Year] (SI [Year]/[Number]) - Example:
The Occupational Pension Schemes (Investment) Regulations 2005 (SI 2005/3378)
For case law:
- Neutral citation:
[Year] [Court] [Number] - Example:
[2023] UKSC 14 - Verify via BAILII or National Archives
Step 4: Construct Citation
Every legal reference MUST include:
**Citation Format:**
- Statute: [Name] [Year], s.[section]([subsection]) — ranges acceptable: s.34-36
- SI: [Name] Regulations [Year] (SI [Year]/[Number]), reg.[number]
- Case: [Case Name] [Neutral Citation]
- Guidance: [Issuing Body], [Document Title] ([Date])
**Example:**
> Trustees must exercise their powers in accordance with their fiduciary duties.
> — Pensions Act 1995, s.33; Imperial Group Pension Trust v Imperial Tobacco [1991] 1 WLR 589
Step 5: Glass Box Audit
Before delivering any legal output, document:
⚠️ PII REDACTION: Legal queries frequently contain personal data (names, NI numbers, dates of birth). ALWAYS redact PII from audit logs before storage.
reasoning_chain:
- query: "[PII-REDACTED summary of legal question]"
- domain: "Legal domain identified"
- sources_consulted: ["List of authoritative sources checked"]
- citations_verified: ["Each citation with verification status"]
- confidence: "HIGH/MEDIUM/LOW with rationale"
- limitations: "What this advice does NOT cover"
Quality Gates
Before producing legal output:
- Source Gate: Every factual claim cites an authoritative source
- Citation Gate: All citations follow correct format and are verifiable
- Currency Gate: Legislation checked for amendments/repeals
- Domain Gate: Output stays within competence of identified domain
- Confidence Gate: Uncertainty explicitly stated, not hidden
- Disclaimer Gate: If advice-like, includes appropriate caveats
Output Templates
Legislation Summary
## [Topic]
### Applicable Legislation
- **Primary**: [Statute/SI with full citation]
- **Secondary**: [Related provisions]
### Key Provisions
1. **[Section/Regulation]**: [Summary of effect]
> "[Quoted text if short]"
> — [Citation]
### Current Status
- In force: Yes/No/Partially
- Amendments: [List significant amendments]
- Pending changes: [If any]
### Limitations
This summary covers [scope]. It does not address [exclusions].
Compliance Check
## Compliance Assessment: [Topic]
### Requirement
[What the legislation requires]
— [Citation]
### Current State
[Assessment of compliance]
### Evidence
- [Document/fact supporting assessment]
### Gaps Identified
1. [Gap]: [Required action]
### Confidence: [HIGH/MEDIUM/LOW]
[Rationale for confidence level]
Anti-Patterns
| Pattern | Why It Fails | Better Approach |
|---|---|---|
| Citing "the Pensions Act" without section | Unverifiable, vague | Always cite specific section |
| Using GitHub repo data as legal source | Not authoritative | Pattern reference only |
| Stating law without citation | Glass Box violation | Always cite source |
| Assuming legislation is current | May be amended/repealed | Verify currency |
| Mixing jurisdictions | Different laws apply | Clarify jurisdiction (UK, E&W, Scotland) |
| Confidence without evidence | Not defensible | State basis for confidence |
Integration Points
MCP Servers
neo4j-apex— TPR obligations and regulatory requirementsneo4j-psps— LGPS scheme rulesneo4j-cms-handbook— CMS procedural guidanceneo4j-scheme-docs— Scheme-specific documentation
CLI Tools
legislation-intelCLI — Direct statute retrieval from legislation.gov.uk- Location:
~/Projects/45black/claude-agents/tools/legislation_intel.py - Commands:
search,section,status,cite,types,health
- Location:
External APIs (Future)
- National Archives API — Case law and historical legislation
- BAILII API — Case law search and retrieval
Compound Output
After completing legal work:
- Add verified citations to Memory MCP
- Note any interpretation decisions
- Flag areas of uncertainty for future research
Examples
For extended worked examples with Glass Box audit trails, see Tier 3: verification-reference.md:
- Pensions investment query (HIGH confidence)
- Historical employment query (LOW confidence)
- Full YAML audit templates
LangGraph Integration
For pensions-langgraph-agent and similar agentic implementations, see Tier 3: verification-reference.md for:
- Full
LegislationStateTypedDict definition AUTHORITATIVE_SOURCESconfigurationverify_sources()implementation- Graph construction patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?