Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Uk Legislation Api

skill · brycewang-stanford/Auto-Empirical-Research-SkillsNOASSERTION licenceAudited 8 Oct 2026 · source e1ba289846fd

★ 4,537pushed 3 days ago
✓SAFEGrade B · 89/100 · 8 Oct 2026 · e1ba289
4,537repo stars · whole brycewang-stanford/Auto-Empirical-Research-Skills

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit e1ba289846fd and found no filesystem, network or shell access and no hard-coded secrets. What it does: Access UK laws and statutory instruments via the Legislation.gov.uk API

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Uk Legislation Api (brycewang-stanford/Auto-Empirical-Research-Skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/brycewang-stanford/uk-legislation-api

Trust audit

Audit 0.4.1 · source read 8 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha e1ba289846fd · 8 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

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

---
name: uk-legislation-api
description: "Access UK laws and statutory instruments via the Legislation.gov.uk API"
metadata:
  openclaw:
    emoji: "⚖️"
    category: "domains"
    subcategory: "law"
    keywords: ["UK law", "legislation", "statutory instruments", "legal research", "Parliament", "regulatory analysis"]
    source: "https://www.legislation.gov.uk"
---

# 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 Code | Description | Example |
|-----------|-------------|---------|
| `ukpga` | UK Public General Act | `/ukpga/2010/15` (Equality Act 2010) |
| `uksi` | UK Statutory Instrument | `/uksi/2020/1374` |
| `asp` | Act of Scottish Parliament | `/asp/2020/13` |
| `asc` | Act of Senedd Cymru (Wales) | `/asc/2021/4` |
| `nia` | Northern Ireland Act | `/nia/2022/2` |
| `ukla` | UK Local Act | `/ukla/2008/1` |
| `ukdsi` | UK Draft Statutory Instrument | `/ukdsi/2023/123` |
| `eur` | Retained 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

| Suffix | Format | Content-Type |
|--------|--------|-------------|
| `/data.xml` | Legislation XML (CLML) | `application/xml` |
| `/data.feed` | Atom feed | `application/atom+xml` |
| `/data.csv` | CSV export | `text/csv` |
| (none) | HTML rendering | `text/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(

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit e1ba289

Download folder ↗
git clone https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills
git -C Auto-Empirical-Research-Skills checkout e1ba289846fd

The author documents no install command, so this uses the repository directly. Our verdict covers commit e1ba289846fd only.

Works in which agents?

What its own text says, not a test

AgentStatusMore
OpenClawMentioned in its text, not testedSkills for OpenClaw · About OpenClaw
“Mentioned” means the skill’s text names the agent. We have not run it there.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source e1ba289846fd

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/brycewang-stanford/uk-legislation-api/badge.svg)](https://modelsatlas.com/skills/brycewang-stanford/uk-legislation-api/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/brycewang-stanford/uk-legislation-api/badge.svg)](https://modelsatlas.com/skills/brycewang-stanford/uk-legislation-api/)

Questions about Uk Legislation Api

What does the Uk Legislation Api skill do?
🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.
Is Uk Legislation Api safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Uk Legislation Api access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Uk Legislation Api work with?
Its documentation mentions openclaw. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (e1ba289846fd), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.