Agent skill

Uk Legislation API

by wentorai in wentorai/research-plugins

Access UK laws and statutory instruments via the Legislation.gov.uk API

MITAuto-check passedLegal & Compliance

Install Uk Legislation API

skills CLI
$ npx skills add wentorai/research-plugins --skill uk-legislation-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wentorai/research-plugins uk-legislation-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/law/uk-legislation-api .claude/skills/uk-legislation-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
uk-legislation-api
GitHub stars
298
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
331 words
Files
1
Skills in repo
405
Repo updated
First seen
Licence
MIT

At a glance

Access UK laws and statutory instruments via the Legislation.gov.uk API

  • Legal & Compliance work in your project
  • SKILL.md covers Overview, Authentication, URL Structure and Core Endpoints, plus 4 more sections
  • Calls curl; reaches legislation.gov.uk and purl.org

What it does

Uk Legislation API is an agent skill from wentorai/research-plugins. Access UK laws and statutory instruments via the Legislation.gov.uk API

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Legal & Compliance. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

When your agent uses it

  • Legal & Compliance work in your project

Example prompts

  • “/uk-legislation-api”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • legislation.gov.uk
    • purl.org
    • w3.org

    Also links to:

    • legislation.github.io
    • nationalarchives.gov.uk

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Uk Legislation API loads about 1.7k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 331 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 331 words, ~1,749 tokens.

Download SKILL.mdSave it as .claude/skills/uk-legislation-api/SKILL.md (or your agent's skills folder).
name
uk-legislation-api
description
Access UK laws and statutory instruments via the Legislation.gov.uk API

UK Legislation API (legislation.gov.uk)

Overview

The Legislation.gov.uk API, maintained by The National Archives, provides open access to the full text of UK legislation from 1267 to the present day. The database covers over 100,000 items including Acts of Parliament, Statutory Instruments, Scottish and Welsh legislation, and Northern Ireland statutes. All data is available as structured XML with Dublin Core metadata, Atom feeds, and HTML. The API supports point-in-time versions showing how legislation read at any given date, plus amendment tracking.

Authentication

No authentication or API key is required. The API is fully open. Respect rate limits by adding reasonable delays between bulk requests.

URL Structure

All legislation follows the pattern:

https://www.legislation.gov.uk/{type}/{year}/{number}
Legislation Types
Type CodeDescriptionExample
ukpgaUK Public General Act/ukpga/2010/15 (Equality Act 2010)
uksiUK Statutory Instrument/uksi/2020/1374
aspAct of Scottish Parliament/asp/2020/13
ascAct of Senedd Cymru (Wales)/asc/2021/4
niaNorthern Ireland Act/nia/2022/2
uklaUK Local Act/ukla/2008/1
ukdsiUK Draft Statutory Instrument/ukdsi/2023/123
eurRetained EU Legislation/eur/2016/679 (GDPR)

Core Endpoints

Full Legislation Text (XML)
bash
# Fetch the Equality Act 2010 — returns structured XML with Dublin Core metadata
curl "https://www.legislation.gov.uk/ukpga/2010/15/data.xml"
# Response: <Legislation DocumentURI="http://www.legislation.gov.uk/ukpga/2010/15"
#   NumberOfProvisions="564">
#   <dc:title>Equality Act 2010</dc:title>
#   <dc:description>An Act to make provision to require Ministers...</dc:description>

# Fetch Data Protection Act 2018
curl "https://www.legislation.gov.uk/ukpga/2018/12/data.xml"
# Response: <dc:title>Data Protection Act 2018</dc:title>
#   NumberOfProvisions="1181"

# Fetch a Statutory Instrument
curl "https://www.legislation.gov.uk/uksi/2020/1374/data.xml"
# Response: <dc:title>The Health Protection (Coronavirus, Restric...</dc:title>
Specific Sections
bash
# Fetch a single section
curl "https://www.legislation.gov.uk/ukpga/2010/15/section/1/data.xml"

# Fetch table of contents
curl "https://www.legislation.gov.uk/ukpga/2010/15/contents/data.xml"

# Fetch a specific Part
curl "https://www.legislation.gov.uk/ukpga/2010/15/part/1/data.xml"

# Fetch a Schedule
curl "https://www.legislation.gov.uk/ukpga/2010/15/schedule/1/data.xml"
Search and Discovery
bash
# Search by title — returns HTTP 300 with multiple matches
curl "https://www.legislation.gov.uk/id?title=equality+act"

# Browse by type, title keyword, and year
curl "https://www.legislation.gov.uk/ukpga?title=data+protection&year=2018"

# List recent Acts via Atom feed
curl "https://www.legislation.gov.uk/new/ukpga/data.feed"
# Response: <openSearch:totalResults> with <entry> elements per Act
Amendment Tracking
bash
# Changes affecting a specific Act (Atom feed, paginated)
curl "https://www.legislation.gov.uk/changes/affected/ukpga/2010/15/data.feed"
# Response: <title>Changes to Legislation</title>
#   <leg:totalPages>25</leg:totalPages>
#   Each <entry> describes one amendment with source and target provisions

# Changes made BY a specific Act
curl "https://www.legislation.gov.uk/changes/affecting/ukpga/2010/15/data.feed"
Point-in-Time Versions
bash
# Legislation as it stood on a specific date
curl "https://www.legislation.gov.uk/ukpga/2010/15/2015-01-01/data.xml"

# Enacted (original) version
curl "https://www.legislation.gov.uk/ukpga/2010/15/enacted/data.xml"

Data Formats

SuffixFormatContent-Type
/data.xmlLegislation XML (CLML)application/xml
/data.feedAtom feedapplication/atom+xml
/data.csvCSV exporttext/csv
(none)HTML renderingtext/html

The primary XML format uses the Crown Legislation Markup Language (CLML) schema with namespaces for legislation, ukm:Metadata, and Dublin Core (dc:, dct:) elements. Each document includes NumberOfProvisions, RestrictExtent (geographic applicability like E+W+S+N.I.), and RestrictStartDate.

Academic Use Cases

  • Legislative history: Track how a statute has evolved using point-in-time versions and amendment feeds
  • Policy analysis: Compare regulatory regimes across UK jurisdictions (England, Scotland, Wales, NI)
  • Corpus linguistics: Build legislative text corpora from XML for NLP analysis of legal language
  • Regulatory impact studies: Use the changes feed to measure legislative amendment frequency
  • Comparative law: Contrast UK statutory instruments with primary legislation structure
  • Brexit research: Analyse retained EU legislation (type eur) and its UK modifications

Python Usage

python
import requests
from xml.etree import ElementTree as ET

BASE = "https://www.legislation.gov.uk"
NS = {"leg": "http://www.legislation.gov.uk/namespaces/legislation",
      "ukm": "http://www.legislation.gov.uk/namespaces/metadata",
      "dc": "http://purl.org/dc/elements/1.1/",
      "atom": "http://www.w3.org/2005/Atom"}

def get_legislation(leg_type: str, year: int, number: int) -> dict:
    """Fetch UK legislation metadata and full XML."""
    url = f"{BASE}/{leg_type}/{year}/{number}/data.xml"
    resp = requests.get(url)
    resp.raise_for_status()
    root = ET.fromstring(resp.content)
    meta = root.find(".//ukm:Metadata", NS)
    return {
        "title": meta.findtext("dc:title", namespaces=NS),
        "description": meta.findtext("dc:description", namespaces=NS),
        "provisions": root.attrib.get("NumberOfProvisions"),
        "extent": root.attrib.get("RestrictExtent"),
        "uri": root.attrib.get("DocumentURI"),
        "xml": resp.content
    }

# Example: fetch the Equality Act 2010
act = get_legislation("ukpga", 2010, 15)
print(f"{act['title']} — {act['provisions']} provisions, extent: {act['extent']}")
# Output: Equality Act 2010 — 564 provisions, extent: E+W+S+N.I.

References

© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/domains/law/uk-legislation-api of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Uk Legislation API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Uk Legislation API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Uk Legislation API this skillwentorai/research-plugins2981 repos~1.7kAutomated safety check: PassMIT
Paper to Chinese Patent DrafterYuan1z0825/nature-skills47k1 repos~1.1kAutomated safety check: PassApache-2.0
C15tc15t/c15t1.9k1 repos~1.6kAutomated safety check: PassApache-2.0
Contract Reviewevolsb/claude-legal-skill4641 repos~3.6kAutomated safety check: PassMIT
Legal Clinic Client Intakeanthropics/claude-for-legal9.6k3 repos~3.2kAutomated safety check: PassApache-2.0
Paper To Cn Patentsnipp-zha/Paper-to-patent-Skill1061 repos~959Automated safety check: PassNone

Similar skills

  • Paper to Chinese Patent Drafter

    Yuan1z0825/nature-skills

    Drafts Chinese invention patent applications and technical disclosures from research papers or inventor materials, tying each claim feature to source evidence.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Legal & ComplianceAuto-check passed
  • C15t

    c15t/c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.

    1.9k GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • Contract Review

    evolsb/claude-legal-skill

    Review legal contracts, NDAs, employment agreements, SaaS terms, and M&A documents.

    464 GitHub starsUsed in 1 repo~3.6k tokens
    Legal & ComplianceAuto-check passed
  • Legal Clinic Client Intake

    anthropics/claude-for-legal

    Official

    Structures a legal clinic client intake interview and produces a case summary with cross-area issue spotting, conflict flags and triage classification.

    9.6k GitHub starsUsed in 3 repos~3.2k tokens
    Legal & ComplianceAuto-check passed
  • Paper To Cn Patent

    snipp-zha/Paper-to-patent-Skill

    Convert scientific papers, theses, technical reports, source code, figures, or research manuscripts into evidence-grounded Chinese invention patent drafts.

    106 GitHub starsUsed in 1 repo~959 tokens
    Legal & ComplianceAuto-check passed
  • Employment Contract Templates

    ynulihao/AgentSkillOS

    Create employment contracts, offer letters, and HR policy documents following legal best practices.

    617 GitHub starsUsed in 12 repos~4.1k tokens
    Legal & ComplianceAuto-check passed

More from wentorai/research-plugins

All 405 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Uk Legislation API

What does Uk Legislation API do?

Access UK laws and statutory instruments via the Legislation.gov.uk API. Uk Legislation API is an agent skill from wentorai/research-plugins.

When should I use Uk Legislation API?

Uk Legislation API fits situations like: legal & Compliance work in your project.

How do I install Uk Legislation API in Claude Code?

Run `npx skills add wentorai/research-plugins --skill uk-legislation-api -a claude-code`. Or copy the skill folder (skills/domains/law/uk-legislation-api in wentorai/research-plugins) into .claude/skills/uk-legislation-api in your project. Claude Code loads it when a task matches its description.

How do I install Uk Legislation API in Codex?

Run `npx skills add wentorai/research-plugins --skill uk-legislation-api -a codex`. Or copy the skill folder (skills/domains/law/uk-legislation-api in wentorai/research-plugins) into .agents/skills/uk-legislation-api in your project. Codex loads it when a task matches its description.

Can I use Uk Legislation API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill uk-legislation-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/uk-legislation-api, .gemini/skills/uk-legislation-api, .github/skills/uk-legislation-api and .opencode/skills/uk-legislation-api in your project.

What does Uk Legislation API need to run?

Going by SKILL.md and its folder, Uk Legislation API needs the command-line tools its instructions call (curl). Our summary lists: Python 3.

Does Uk Legislation API access the network?

SKILL.md names 5 domains. In commands or code: legislation.gov.uk, purl.org and w3.org; the agent is likely to contact these when it follows the instructions. As links in the text: legislation.github.io and nationalarchives.gov.uk. This is read from the text; nothing was executed.

Is Uk Legislation API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Uk Legislation API use?

Uk Legislation API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Uk Legislation API use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Uk Legislation API?

Skills that share tags, products or a category with Uk Legislation API: Paper to Chinese Patent Drafter (Yuan1z0825/nature-skills, 47k stars), C15t (c15t/c15t, 1.9k stars), Contract Review (evolsb/claude-legal-skill, 464 stars) and Legal Clinic Client Intake (anthropics/claude-for-legal, 9.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Uk Legislation API?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.

Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.