/lex-uk-law:lex-uk-lawfrom lex-uk-law
Researches UK legislation via the Lex API: searches Acts, sections, amendments, and explanatory notes. Useful for questions about UK law, statutory instruments, or legal requirements.
Ships in lex-uk-law. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You have access to the complete corpus of UK legislation from The National Archives via MCP tools. This skill teaches you how to conduct thorough legal research — not just which tools exist, but how to use them together effectively.
Different questions need different approaches. Choose the right workflow for the task.
When the user asks about a legal topic (e.g. "unfair dismissal", "data protection for AI"):
search_for_legislation_acts with a natural language query. Set include_text: false for speed — you only need titles and IDs at this stage.search_for_legislation_sections for each relevant Act found. Pass the legislation_id to scope your search. This is where the substantive law lives. Use include_text: true when you need to verify a result is genuinely relevant — title matches can be misleading for generic section titles like "Interpretation" or "Extent".search_amendments on key Acts — legislation may have been significantly amended or even partially repealed since enactment. This is easy to miss and important.get_explanatory_note_by_legislation or get_explanatory_note_by_section to understand Parliament's intent. Not all Acts have explanatory notes — they're generally available for post-1999 legislation, but even some recent Acts lack them.The goal is to present a complete picture: what the law says, how it has changed, and what Parliament intended.
When the user asks about a specific provision:
lookup_legislation with legislation_type, year, and number.search_for_legislation_sections with the legislation_id and an empty query to retrieve by filter.search_amendment_sections with the provision_id (e.g. "ukpga/1998/42/section/3"), then also search_amendments at the Act level. Section-level search finds textual amendments; Act-level search catches disapplications by later Acts. Both are needed for a complete picture.get_explanatory_note_by_section for context on what the provision means.When the user asks about changes to legislation:
search_amendment_sections with the provision_id (e.g. "ukpga/1998/42/section/3"). The provision_id must include the section path, not just the Act ID.search_amendments with the legislation_id. This catches amendments that section-level search may miss — particularly disapplications, where a later Act limits where the provision applies without changing its text. Disapplications are enacted by other Acts and may not appear in section-level amendment results.search_for_legislation_sections with a query like "amends [Act name]" or "section [N] [Act name]". Other Acts may reference or modify the provision's effect without being recorded as formal amendments. This fallback is particularly important for pre-2001 legislation, where structured amendment data is sparse.get_explanatory_note_by_legislation for an overview of the whole Act, or get_explanatory_note_by_section for a specific provision.search_explanatory_note with a natural language query if you don't know which Act is relevant.note_type to focus on specific sections of the explanatory material (overview, policy_background, legal_background, extent, provisions, commencement, related_documents).The database contains ~85,000 Acts from 1267 onwards, including major public general Acts. When researching historical legislation:
year_from and year_to work reliably across the full date range. Use them to narrow results to the relevant period.search_for_legislation_sections using the legislation_id and include_text: true to read the actual provisions.ukpga/Vict/8-9/20 for 8 & 9 Vict. c. 20). These work as legislation_id values in all tools.search_for_legislation_acts returns whole Acts ranked by relevance. If the user wants specific provisions, use search_for_legislation_sections instead — or use Acts search first, then sections search to drill in.search_amendment_sections finds direct textual amendments but can miss disapplications enacted by other Acts. Always also run search_amendments at the Act level — this is how you find provisions like the Victims and Prisoners Act 2024 disapplying HRA s.3 in specific contexts.include_text: true and read the actual provision before citing it — especially for sections with generic titles.search_for_legislation_acts — find Acts/SIs by topic. Key params: query, legislation_type, year_from/year_to, include_text, limit.search_for_legislation_sections — find provisions within legislation. Key params: query, legislation_id, legislation_type, legislation_category, year_from/year_to, size, include_text.lookup_legislation — get a specific Act by type/year/number.get_legislation_sections — list all sections of an Act by legislation_id.get_legislation_full_text — complete text. Set include_schedules: true only if specifically needed.proxy_legislation_data — enriched metadata from legislation.gov.uk.search_explanatory_note — search note content. Key params: query, legislation_id, note_type, section_type.get_explanatory_note_by_legislation — all notes for an Act.get_explanatory_note_by_section — note for a specific section number.search_amendments — Act-level amendments. Key params: legislation_id, search_amended.search_amendment_sections — section-level amendments. Key params: provision_id, search_amended.When presenting legal research:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub i-dot-ai/lex --plugin lex-uk-lawOther plugins' skills for the same job