The Counsel β€” a junior counsel in your pocket, England & Wales

UK Legal Skills

A junior counsel in your pocket.
Thirty-eight legal skills, twelve agents, and the entirety of England & Wales statute and case law β€” assembled into a single quiet assistant for Claude Code, run as /legal commands.

CI License: FSL-1.1-Apache-2.0 38 skills 12 agents 3 MCP servers England & Wales Documentation Made for Claude Code

πŸ“– Documentation Β· ⚑ Quick start Β· 🧭 Commands Β· 🌐 Hosted version

> [!WARNING] > **Not legal advice.** Everything here is AI-generated legal *analysis* and *drafting*, intended as a starting point. It is **not** a substitute for a qualified solicitor, and it covers **England & Wales only**. Always have a solicitor review before you sign a contract or rely on a generated document. --- ## The principle > *In the matter of any contract before you, the question is rarely* **what does the document say**. *It is what the document* **does** β€” *to your money, your obligations, and the next twenty years of your professional life.* **Specialist before general. Fact before form.** UK Legal Skills is built around how solicitors actually reason β€” not how chatbots usually answer. Each skill is grounded in a specific corner of England & Wales law, with the precise statute in the margin and a live check that the law it relies on is the law in force *this morning*. --- ## πŸ“‘ Contents - [Quick start](#-quick-start) - [The first read](#-the-first-read) - [The 38 commands](#-the-38-commands) - [The panel β€” orchestrators & agents](#-the-panel--orchestrators--agents) - [System architecture](#-system-architecture) - [Jurisdiction & legal currency](#-jurisdiction--legal-currency) - [Live UK legal data (MCP)](#-live-uk-legal-data-mcp) - [Risk scoring](#-risk-scoring) - [Who it's for](#-who-its-for) - [How it works](#-how-it-works) - [Repository layout](#-repository-layout) - [Development & tests](#-development--tests) - [Hosted version β€” The Counsel](#-hosted-version--the-counsel) - [FAQ](#-faq) - [Contributing](#-contributing) - [Data sources & licences](#-data-sources--licences) - [Licence](#-licence) --- ## ⚑ Quick start You need [Claude Code](https://docs.claude.com/en/docs/claude-code). Install the skills into `~/.claude/`: ```bash # One-liner β€” clones this repo and installs curl -fsSL https://raw.githubusercontent.com/davendra/uk-legal-skills/main/install.sh | bash ``` …or from a local clone: ```bash git clone https://github.com/davendra/uk-legal-skills.git cd uk-legal-skills ./install.sh ``` `install.sh` copies the `/legal` router, all **38 skills**, **12 agents**, the PDF/ingestion scripts, and the contract template into `~/.claude/`. Restart Claude Code, then: ``` /legal # the full command menu /legal first-read nda.pdf # 15-second triage: SIGN / NEGOTIATE / WALK /legal review lease.docx # full 5-agent review with a Safety Score /legal caselaw "unfair dismissal whistleblowing" ``` Input is always one of three shapes β€” a **file path**, **pasted text**, or a **URL**. Remove everything with `./uninstall.sh`.

CLI workflow β€” install, invoke, ingest, analyse, deliver
Plate I β€” install, invoke, ingest, analyse, deliver.

--- ## βš–οΈ The first read Most everyday legal work is *triage*: spotting the dangerous clause, the missing protection, the out-of-date statute. `/legal first-read` gives a Senior Counsel verdict in under fifteen seconds β€” **SIGN**, **NEGOTIATE**, or **WALK** β€” on a likelihood Γ— severity matrix, then routes anything red to the deep five-agent review.

The first read β€” SIGN, NEGOTIATE or WALK in under fifteen seconds
Plate II β€” the first read: a verdict before the deep review. contract β†’ triage β†’ SIGN Β· NEGOTIATE Β· WALK.

--- ## 🧭 The 38 commands Thirty-eight specialists, each one fluent in a single corner of England & Wales law. Invoke any with the `/legal` prefix.

The instrument β€” 38 skills, by category
Plate III β€” the instrument: thirty-eight skills, grouped by field.

| Command | What it does | |---------|--------------| | **πŸ”Ž Case Law** | | | `/legal caselaw ` | Search 63,000+ UK judgments from Find Case Law (National Archives) by keyword, party, judge, statute section, or citation | | **πŸ“ƒ Contract Analysis** | | | `/legal first-read ` | Senior Counsel triage β€” a fast (<15s) SIGN / NEGOTIATE / WALK verdict with a severity Γ— likelihood matrix | | `/legal review ` | **Flagship** β€” 5 parallel agents β†’ a 0–100 Contract Safety Score, clause-by-clause analysis, prioritised fixes | | `/legal risks ` | Deep risk scoring (1–10 per clause) with estimated GBP exposure and hidden-risk detection | | `/legal compare ` | Side-by-side diff of two versions, flagging dangerous changes with favourability analysis | | `/legal plain ` | Translate every clause from legalese into plain English, with a glossary | | `/legal negotiate ` | Counter-proposals with replacement language, talking points, and a ready-to-send email | | `/legal missing ` | Find protections that *should* be in the contract but aren't, with insert-ready clauses | | **🏠 Property** | | | `/legal property ` | Leases, ASTs, commercial leases, transfers β€” Housing Act 1988, LTA 1954, Renters' Rights Act 2025 status, SDLT | | `/legal tenancy ` | Tenancy review against Housing Act 1988, Tenant Fees Act 2019, and Renters' Rights Act 2025 with commencement checks | | **✍️ Document Generation** | | | `/legal nda ` | Generate a custom NDA β€” mutual, one-way, employee, or vendor | | `/legal terms ` | Generate UK GDPR / PECR-compliant terms of service by scanning what the site does | | `/legal privacy ` | Generate a privacy policy from detected data collection, referencing the ICO | | `/legal agreement ` | Freelancer contracts, partnerships, SOWs, MSAs β€” with IR35-aware contractor provisions | | `/legal freelancer ` | Review from the freelancer's perspective: contractor traps, IR35 indicators, restrictive covenants | | **πŸ‘” Employment & Corporate** | | | `/legal employment ` | Employment review β€” **4 parallel agents** against ERA 2025 reforms, Equality Act 2010, WTR 1998 | | `/legal corporate ` | Corporate review β€” **3 parallel agents** against Companies Act 2006 and ECCTA 2023 | | `/legal ir35 ` | IR35 status determination β€” 7-factor HMRC CEST-aligned assessment with a confidence score | | `/legal aml ` | AML/KYC review against MLR 2017, POCA 2002, SAMLA 2018, and SRA obligations | | **πŸ›‘οΈ Compliance & Reporting** | | | `/legal compliance ` | Gap analysis across UK GDPR, DPA 2018, Equality Act 2010, PCI-DSS, PECR, Cyber Essentials | | `/legal legislation-tracker ` | Scan for statutory references and flag outdated, amended, or repealed legislation | | `/legal pre-launch ` | Forward-looking regulatory gate β€” Online Safety Act, UK GDPR, EU AI Act, FCA Consumer Duty, ICO Children's Code, ASA, PECR | | `/legal report-pdf` | Client-ready A4 PDF with score gauges, risk charts, and a prioritised action checklist | | **πŸ›’ Consumer & ESG** | | | `/legal consumer ` | Consumer compliance against CRA 2015, DMCCA 2024, CCR 2013, UCTA 1977 with CMA enforcement risk | | `/legal esg ` | ESG review β€” Modern Slavery Act s.54 audit, UK SRS readiness, climate disclosure gaps | | `/legal dispute ` | Dispute clauses β€” pre-action protocol, ADR enforceability, fixed recoverable costs, limitation tracker | | **πŸŽ“ Specialist** | | | `/legal gdpr ` | In-depth UK GDPR / DPA 2018 / PECR audit, including Data (Use and Access) Act 2025 status | | `/legal ip ` | IP review β€” licences, assignments, trade marks, patents, CDPA 1988, AI-generated works | | `/legal debt ` | Debt recovery β€” pre-action protocol, limitation, enforcement routes, Late Payment Act 1998 | | `/legal immigration ` | Sponsor licence audits, Right to Work checks, Skilled Worker requirements, civil penalty exposure | | `/legal wills ` | Wills & probate β€” Wills Act 1837 execution, IHT planning, Inheritance Act 1975 claim risk, LPAs | | **πŸ“Š Business Intelligence** | | | `/legal benchmark ` | Benchmark every clause against England & Wales market standards (80+ benchmarks, 14 contract types) | | `/legal due-diligence ` | M&A due diligence β€” 60-item checklist across 8 categories | | `/legal board-pack
` | Companies Act-compliant minutes, resolutions, declarations, appointments, dividends | | `/legal regulatory-calendar` | 12-month filing calendar β€” Companies House, HMRC, ICO, FCA, SRA deadlines and penalties | | `/legal matter-brief ` | State-of-the-matter brief consolidating documents, prior reviews, deadlines, and next move | | **🧰 Platform Tools** | | | `/legal ai-compliance ` | AI compliance self-assessment for law firms β€” SRA Standards, UK AI principles, ICO guidance, EU AI Act | | **πŸ”§ Utility** | | | `/legal fetch-samples` | Find and catalogue public UK legal sample documents for testing | > The always-current, machine-readable catalogue is [`registry/skill-registry.json`](registry/skill-registry.json), rendered into the [full command reference](https://ailegal.the-counsel.co.uk/reference/all-commands). --- ## πŸ›οΈ The panel β€” orchestrators & agents Most skills run solo. Three are **orchestrators** that fan out to parallel specialist agents and then aggregate a **weighted** score β€” so the verdict is a blend of independent expert passes, not a single opinion.

The panel of five β€” /legal review, five agents, weighted aggregation
Plate IV β€” the panel of five: /legal review aggregates to a Contract Safety Score.

Employment review β€” four agents in parallel
Plate V β€” /legal employment: four agents in parallel against ERA 2025.

| Orchestrator | Agents | Weights | |--------------|--------|---------| | `/legal review` | `legal-clauses`, `legal-risks`, `legal-compliance`, `legal-terms`, `legal-recommendations` | 20 / 25 / 20 / 15 / 20 | | `/legal employment` | `legal-employment-contract`, `-rights`, `-discrimination`, `-obligations` | equal | | `/legal corporate` | `legal-corporate-compliance`, `-documents`, `-risk` | 35 / 35 / 30 | The remaining agents in [`agents/`](agents/) back individual skills. Change a subagent's output contract and you must update its parent orchestrator β€” the parity guard (`npm run test:skills`) keeps the whole graph honest. --- ## πŸ—ΊοΈ System architecture ``` You β†’ /legal router β†’ 38 skills β†’ (3 orchestrators fan out to 12 agents) β†’ MCP servers β†’ official UK sources β†’ report ```

System architecture β€” one canon, live UK law
Plate VI β€” the chambers: skills, agents, and live UK law, one canon.

Each skill is a **self-contained Markdown prompt** β€” no runtime, no SDK, no API key. The host agent reads the skill and runs it using its own capabilities (file reading, web fetch, subagents, MCP, PDF). That makes the skills portable, auditable, and easy to fork. --- ## βš–οΈ Jurisdiction & legal currency This suite is **England & Wales only**. Scots law and Northern Irish law are out of scope. Post-2024 reforms move fast, so commencement-aware skills (`employment`, `tenancy`, `gdpr`, `consumer`, `corporate`, `legislation-tracker`, `pre-launch`) run a **live in-force check** before treating any reform as binding β€” classifying every cited provision as current, transitional, prospective, repealed, or unknown.

Is the law in force? β€” commencement checked live on every analysis
Plate VII β€” is the law in force? Commencement checked live via MCP, every analysis.

Risk is always reported with standardised indicators: πŸ”΄ **High** Β· 🟑 **Medium** Β· 🟒 **Low**. --- ## πŸ“‘ Live UK legal data (MCP) Skills that need current law call three [Model Context Protocol](https://modelcontextprotocol.io) servers, registered in [`.mcp.json`](.mcp.json):

MCP β€” three live sources of UK law
Plate VIII β€” three live sources of UK law.

| Server | Source | Tools | |--------|--------|-------| | `uk-legislation` | legislation.gov.uk (OGL v3.0) | `search_legislation`, `lookup_statute`, `lookup_section`, `check_in_force`, `check_amendments`, `get_extent` | | `caselaw` | caselaw.nationalarchives.gov.uk (Open Justice Licence) | `search_caselaw`, `lookup_judgment`, `summarise_judgment`, `get_judgments_for_section`, search-by-judge / party | | `lex` | Remote HTTP, semantic search over 63,000 judgments | complements the local `caselaw` server | The two local servers are TypeScript and need a one-time build (no API key β€” they query public government APIs): ```bash cd mcp-servers/uk-legislation && npm install && npm run build cd ../caselaw && npm install && npm run build ``` --- ## πŸ“Š Risk scoring Every finding carries a standardised severity, and the flagship review aggregates them into a single 0–100 **Contract Safety Score** β€” written the way solicitors read, with the precise statute in the margin.

Risk scoring β€” the methodology
Plate IX β€” the risk methodology, from safe to refuse-to-sign.

--- ## πŸ§‘β€πŸ’Ό Who it's for - πŸ§‘β€πŸ’» **Freelancers & contractors** β€” check contracts for IR35 traps, unfair terms, and missing protections before you sign Β· `first-read β†’ freelancer β†’ ir35 β†’ negotiate` - 🏒 **Small business owners** β€” review supplier contracts, generate NDAs, audit UK GDPR compliance Β· `review β†’ compliance β†’ terms` - 🏠 **Property professionals** β€” analyse leases and tenancies against the Renters' Rights Act 2025 Β· `property β†’ tenancy` - βš–οΈ **In-house legal teams** β€” a first-pass triage tool so solicitors focus on what matters Β· `review β†’ benchmark β†’ due-diligence β†’ report-pdf` - πŸ‘©β€πŸ’» **Developers & legal tech** β€” extend with new skills or wire the MCP servers into your own apps Β· see [Contributing](CONTRIBUTING.md) --- ## 🧱 How it works A skill is just Markdown the host reads and executes β€” portable, auditable, forkable. There is no compiled code and no key baked in.

How it works β€” skills are Markdown the host reads and runs
Plate X β€” a skill is Markdown your agent host reads and runs.

--- ## πŸ“‚ Repository layout ``` uk-legal-skills/ β”œβ”€β”€ legal/SKILL.md # the /legal router β€” entry point + disclaimer β”œβ”€β”€ skills/legal-*/ # 38 self-contained skill prompts β”œβ”€β”€ agents/legal-*.md # 12 subagent prompts (orchestrator workers + specialists) β”œβ”€β”€ mcp-servers/ # uk-legislation & caselaw MCP servers (TypeScript) β”œβ”€β”€ scripts/ # PDF generation, document ingestion, audit/parity scripts β”œβ”€β”€ templates/ # contract template copied into ~/.claude on install β”œβ”€β”€ registry/ # skill-registry.json β€” the canonical command catalogue β”œβ”€β”€ samples/ # synthetic sample documents for testing β”œβ”€β”€ evaluation/ # expected-findings corpus + scorer β”œβ”€β”€ doc-site/ # VitePress documentation site (ailegal.the-counsel.co.uk) └── install.sh / uninstall.sh ``` --- ## πŸ§ͺ Development & tests A small audit suite keeps skills, agents, router, registry, and docs in lockstep (Node 18+): ```bash npm run test:skills # 38-skill ↔ 12-agent ↔ router ↔ registry parity guard npm run test:docs # regenerate the command reference and check docs parity npm run test:evaluations # validate the expected-findings eval corpus npm run docs:generate # rebuild the command reference from the registry ``` The MCP servers carry their own `node --test` suites (`cd mcp-servers/ && npm test`).

One registry, four consumers, one audit
Plate XI β€” one registry, several consumers, one audit. The single source of truth.

--- ## 🌐 Hosted version β€” The Counsel Prefer a polished web app to the terminal? **[The Counsel](https://the-counsel.co.uk)** is a hosted product built on these same skills β€” document upload, live streaming analysis, audio briefings, tracked-changes export, and matter management in the browser. This repository is the source-available **skills engine**; The Counsel is a separate, independently deployed product. Use whichever fits your workflow. --- ## ❓ FAQ
Do I need an API key? Not for the `/legal` commands β€” the agent host (Claude Code) provides model access. The MCP servers also need no key; they query public government APIs.
Is this legal advice? No. It's AI-generated analysis and drafting to use as a starting point. Always have a qualified solicitor review before you sign or rely on anything.
Does it cover Scotland or Northern Ireland? No β€” England & Wales only, by design. The statutes, section numbers, and market standards are all E&W-specific.
How does it stay current with new legislation? Commencement-aware skills run live in-force checks through the legislation MCP server before treating a reform as binding β€” see Jurisdiction & legal currency.
Can I add my own skill? Yes β€” see CONTRIBUTING.md. Add a SKILL.md, wire it into the router and registry/skill-registry.json, and run npm run test:skills.
--- ## 🀝 Contributing Contributions are welcome β€” new skills, agent improvements, MCP tooling, sample documents, and docs. Start with [CONTRIBUTING.md](CONTRIBUTING.md). The golden rules: **England & Wales only**, every output starts with the disclaimer block, risk indicators are πŸ”΄/🟑/🟒, and the parity guard must pass.

How to contribute β€” fork, branch, test, open a PR
Plate XII β€” fork, branch, test, open a pull request.

--- ## πŸ“š Data sources & licences - **Legislation** β€” [legislation.gov.uk](https://www.legislation.gov.uk) under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). - **Case law** β€” [Find Case Law, The National Archives](https://caselaw.nationalarchives.gov.uk) under the [Open Justice Licence](https://caselaw.nationalarchives.gov.uk/open-justice-licence). Not affiliated with or endorsed by HM Government, HM Courts & Tribunals Service, or The National Archives. --- ## πŸ“œ Disclaimer ``` AI-Generated Legal Analysis β€” This output is produced by AI and does not constitute legal advice. It is intended as a starting point for review. Always consult a qualified solicitor before signing contracts or relying on generated legal documents. This tool is designed for use under the laws of England and Wales. ``` --- ## πŸ“„ Licence **Source-available** under the [Functional Source License (FSL-1.1-Apache-2.0)](LICENSE.md): use it inside your firm or business, for research, and when serving your own clients; fork and modify freely. You may **not** repackage it as a competing product or hosted service β€” that needs a [commercial licence](LICENSE.md#commercial-licensing). Each release converts to Apache 2.0 two years after its date.

UK Legal Skills β€” Established MMXXVI Β· Built for England & Wales Β· Not legal advice.

If this saved you time, a ⭐ helps others find it.