lex
Centralized 'Truth Engine' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.
About this skill
LEX, or Legal-Entity-X-ref, is a sophisticated AI agent skill designed as a structured truth engine to eliminate legal 'hallucinations' by grounding agents in verified government references and legislation. It provides deterministic, accurate legal context across more than 29 jurisdictions, including the US, EU, and Canada. This skill is invaluable for tasks requiring precise legal information, such as business formation, employment law compliance, and detailed contract drafting. By leveraging this tool, AI agents can access authoritative legal data, ensuring outputs are compliant, accurate, and free from speculative or incorrect legal interpretations.
Best use case
Comparing legal requirements and identifying compliance gaps across multiple international jurisdictions; drafting legally sound contracts; obtaining verified legal context for business formation and employment law; and preventing AI agents from generating inaccurate or speculative legal information.
Centralized 'Truth Engine' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.
Accurate, verified, and jurisdiction-specific legal context. Legally compliant contract drafts and business formation guidance. Elimination of legal hallucinations and speculative advice from AI outputs. Clear identification of compliance gaps between territories.
Practical example
Example input
Please compare the legal requirements for employee data privacy between California (US), Germany (EU), and Ontario (CA) when establishing a new tech startup. Specifically, highlight key differences in consent requirements and data retention policies. Then, provide a basic contract clause template for employee data privacy that would satisfy all three jurisdictions.
Example output
**Comparison of Employee Data Privacy Requirements:** * **California (CCPA/CPRA):** Requires explicit consent for sensitive personal information. Employees have rights to know, delete, and opt-out of sales. Data retention must be reasonably necessary for the disclosed purpose. * **Germany (GDPR/BDSG):** Requires a lawful basis (e.g., consent, contract necessity, legitimate interest) for processing. Consent must be freely given, specific, informed, and unambiguous. Strict data minimization and retention principles apply; data should only be kept as long as necessary. * **Ontario (PIPEDA/PHIPA):** Requires informed consent for collection, use, and disclosure of personal information. Data must be collected for reasonable purposes and retained only as long as necessary to fulfill those purposes. **Key Differences:** GDPR/BDSG (Germany) sets a higher bar for consent and has stricter accountability. CCPA/CPRA (California) focuses on consumer rights, extended to employees. PIPEDA (Ontario) is broader but less prescriptive than GDPR. **Sample Employee Data Privacy Clause (Multi-Jurisdictional):** '**Employee Data Privacy:** The Company shall collect, process, and store Employee personal data strictly in accordance with applicable data protection laws, including but not limited to the California Consumer Privacy Act (CCPA/CPRA), the General Data Protection Regulation (GDPR) and the Federal Data Protection Act (BDSG) in Germany, and the Personal Information Protection and Electronic Documents Act (PIPEDA) in Ontario, Canada. By accepting employment, the Employee acknowledges and explicitly consents to the Company's processing of their personal data (including sensitive personal data) solely for legitimate business purposes, such as payroll, benefits administration, performance management, and legal compliance. The Company commits to implementing appropriate technical and organizational measures to protect such data, ensuring data minimization, and retaining data only for as long as necessary to fulfill the stated purposes or as required by law. Employees retain rights pertaining to their personal data as granted by their respective jurisdictional laws, including rights to access, rectification, erasure, and objection to processing.' *This clause aims for general compliance, but specific legal counsel should be sought for definitive implementation.*
When to use this skill
- When an AI agent needs to perform legal research requiring verified government references and legislation from multiple jurisdictions (e.g., US, EU, CA). When drafting contracts or legal documents where accuracy and compliance with specific regional laws are critical. When analyzing business formation requirements or employment law implications across different countries. When there is a risk of legal hallucinations and the need for a 'truth engine' to ground legal advice in authoritative sources.
When not to use this skill
- For general knowledge queries unrelated to legal contexts. When simple factual recall or non-legal text generation is sufficient. When the legal task is extremely narrow and does not require cross-jurisdictional comparisons or complex scaffolding.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lex/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How lex Compares
| Feature / Agent | lex | Standard Approach |
|---|---|---|
| Platform Support | Claude, Cursor, Gemini | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
Centralized 'Truth Engine' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.
Which AI agents support this skill?
This skill is designed for Claude, Cursor, Gemini.
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# LEX: Legal-Entity-X-ref ## Overview LEX is a structured truth engine designed to eliminate legal hallucinations by grounding agents in verified government references and legislation across 29+ jurisdictions. It provides deterministic context for business formation, employment, and contract drafting. ## When to Use This Skill - Use when you need to cross-reference or compare legal requirements between different territories, such as verifying the compliance gap between an **EU SARL** and a **US LLC**. - Use when working with foundational business or employment documents that require specific, jurisdiction-compliant clauses to be inserted into a professional scaffold. - Use when the user asks about the specific regulatory nuances, formation steps, or "truth-based" definitions of legal entities within the **29 supported jurisdictions** (USA, Canada, and the EU). ## How It Works ### Step 1: Identify Jurisdiction Before drafting, determine if the user's entity or contract target is in the **USA, Canada, or the EU**. ### Step 2: Search & Fetch Context Use the CLI shortcuts to find the relevant legal patterns and templates. - Run `lex search <query>` to find matching templates. - Run `lex get <path>` to read the granular metadata and requirements. ### Step 3: Scaffold Drafting Generate foundation-level documents using `lex draft <description>`. This ensures that all drafts include the mandatory AI-generated content disclaimer. ### Step 4: Verify Authority Always include a "Verified Sources" section in your output by running `lex verify`, which fetches official government links for the retrieved context. ## Examples ### Example 1: Comparing Employment Laws ```bash # Get the workforce template to compare US vs EU notice periods lex get templates/02_employment_workforce.md ``` ### Example 2: Drafting a Czech Contract ```bash # Create a house sale contract scaffold in Czech language lex draft "Czech house sale contract" ``` ## Best Practices - ✅ **Trust but Verify**: Always include the links provided by `lex verify` in your output. - ✅ **Table Formatting**: Use tables when comparing results across multiple jurisdictions. - ❌ **No Guessing**: If a jurisdiction is outside the US/EU/CA scope, state that it is outside the LEX "Truth Engine" coverage. - ❌ **No Anecdotal Advice**: Stick strictly to the findings in the templates or verified government domains. ## Common Pitfalls - **Problem:** Legal hallucination regarding specific EU notice periods. **Solution:** Run `lex get templates/02_employment_workforce.md` to see the restrictive covenant comparison table. ## Related Skills - `@employment-contract-templates` - For more specific HR policy phrasing. - `@legal-advisor` - For general legal framework architecture. - `@security-auditor` - For reviewing the final repository security.
Related Skills
nft-standards
Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.
nextjs-app-router-patterns
Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.
new-rails-project
Create a new Rails project
networkx
NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs.
network-engineer
Expert network engineer specializing in modern cloud networking, security architectures, and performance optimization.
nestjs-expert
You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems.
nerdzao-elite
Senior Elite Software Engineer (15+) and Senior Product Designer. Full workflow with planning, architecture, TDD, clean code, and pixel-perfect UX validation.
nerdzao-elite-gemini-high
Modo Elite Coder + UX Pixel-Perfect otimizado especificamente para Gemini 3.1 Pro High. Workflow completo com foco em qualidade máxima e eficiência de tokens.
native-data-fetching
Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (useLoaderData).
n8n-workflow-patterns
Proven architectural patterns for building n8n workflows.
n8n-validation-expert
Expert guide for interpreting and fixing n8n validation errors.
n8n-node-configuration
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type.