Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/uk-legislation-api
Access UK laws and statutory instruments via the Legislation.gov.uk API
Passed 16 of 19 test cases with the skill, and 10 of 19 without it.
and 6 more in the full report
7 fixed12 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
Which root attribute in the legislation XML provides the total count of provisions contained within the statutory document?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies NumberOfProvisions as the attribute containing the provision count. | Missed | Passed |
The instructions your model reads when the skill loads.
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.
No authentication or API key is required. The API is fully open. Respect rate limits by adding reasonable delays between bulk requests.
All legislation follows the pattern:
https://www.legislation.gov.uk/{type}/{year}/{number}
| 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) |
# 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">
test cases passed, vs 10 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.