` | 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.
Plate IV β the panel of five: /legal review aggregates to a Contract Safety Score.
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
```
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.
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):
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.
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.
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`).
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.
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.