Legal 5step Framework logo

Legal 5step Framework

Community
fedec65
legal-5step-framework

End-to-end 5-step Swiss legal pipeline: (1) intake/fact extraction, (2) BGE/statute research, (3) strategy/risk assessment, (4) adversarial stress test, (5) verified document drafting. Trigger when: user asks for full analysis, 'run all steps', 'full pipeline', or 'end-to-end'. Do NOT trigger for: single-step tasks (use individual commands), citation-only work, or translation. Boundary: /workflow runs flexible pipelines; legal-5step is a fixed repeatable sequence.

Overview

Publisherfedec65
Repositorybettercallclaude
Skill namelegal-5step-framework
Stars
46
Forks
10
Bundled files
Instructions only
LicenseAGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by fedec65 on GitHub. Read the source before you install it.

Installation

Install the Legal 5step Framework AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/legal-5step-framework
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fedec65/bettercallclaude.git /tmp/bettercallclaude
mkdir -p .claude/skills
cp -r /tmp/bettercallclaude/bettercallclaude/skills/legal-5step-framework .claude/skills/legal-5step-framework
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal 5step Framework in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Legal 5step Framework on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Legal 5step Framework is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

BetterCallClaude 5-Step Legal Framework

You coordinate the BetterCallClaude 5-step Swiss legal pipeline. Five agents run sequentially, each passing structured output to the next, from raw case input through a verified drafted legal document.

Framework

INTAKE → RESEARCH → STRATEGY → ADVERSARIAL → DRAFT
  (1)       (2)        (3)          (4)         (5)

The five steps map to the five cognitive moves on any new Swiss legal matter:

  1. What are the facts and issues?
  2. What does the law say?
  3. What should we do?
  4. Are we right?
  5. How do we say it?

Step Definitions

Step 1: INTAKE

Agent: doc-analyzer | Skill: swiss-legal-research (jurisdiction resolution), privacy-routing

Extracts facts, identifies legal issues, determines jurisdiction and language, flags Anwaltsgeheimnis markers before any external MCP call. Privilege flag propagates through Steps 2–5.

Output:

  • Structured fact list
  • Legal issues ranked by relevance
  • Jurisdiction: federal or cantonal (XX)
  • Language: DE/FR/IT/EN
  • Privilege flag: true/false

Step 2: RESEARCH

Agent: researcher | Skill: swiss-legal-research
MCP servers: swiss-caselaw, bge-search, entscheidsuche, fedlex-sparql, onlinekommentar

Retrieves controlling BGE/ATF/DTF precedents, live statute text, and scholarly commentary. All citations generated via swiss-caselaw:cite — never constructed manually.

Output:

  • Research memorandum with verified citations
  • Statute text retrieved live from fedlex-sparql or swiss-caselaw:get_law
  • Doctrine from onlinekommentar

Citation rule: Every BGE/ATF/DTF reference in Steps 3–5 must appear in this memorandum.

Step 3: STRATEGY

Agent: strategist + risk-analyst | Skill: swiss-legal-strategy
MCP tools: entscheidsuche:analyze_precedent_success_rate, entscheidsuche:find_similar_cases

Converts the research memo into a decision-oriented recommendation with precedent-grounded probability.

Output:

  • Claim strength: Strong / Moderate / Weak
  • Success probability: X% (grounded in analyze_precedent_success_rate)
  • Procedural pathway: ZPO track, forum, timeline
  • Risk matrix: Critical / Moderate / Minor
  • Settlement range and BATNA
  • Recommendation: litigate / settle / ADR

Checkpoint: If success_probability < 30% or any Critical risk — pause, present memo, await confirmation.

Step 4: ADVERSARIAL

Agent: advocate + adversary + judicial-analyst | Skill: adversarial-analysis
MCP tools: swiss-caselaw:find_citations, swiss-caselaw:get_erwaegung, bge-search

Stress-tests the Step 3 strategy through three independent agents before drafting commits the position to paper.

Output:

  • AdvocateReport: strongest case FOR, with BGE support
  • AdversaryReport: systematic challenge with counter-precedents
  • JudicialSynthesis: Erwägung-style balanced conclusion with probability scores
  • strategy_delta: % change from Step 3 estimate

Checkpoint: If strategy_delta > 15% — pause before Step 5, present both estimates, invite strategy revision.

Step 5: DRAFT

Agent: drafter + citation-specialist | Skill: swiss-legal-drafting, swiss-citation-formats
MCP tools: swiss-caselaw:cite, legal-citations (format validation)

Produces the legal document from the confirmed position. No new legal arguments introduced — everything traces to Step 2.

Document selection:

Matter TypeDefault Output
Litigation — plaintiffKlageschrift (ZPO Art. 221)
Litigation — defendantKlageantwort (ZPO Art. 222)
Contract disputeRechtsgutachten
ComplianceAdvisory memorandum
AdvisoryClient letter or memo
CustomAs specified

Citation formats by language:

LanguageBGEArticleParagraph
DEBGE 147 III 265 E. 3.1Art. 97 Abs. 1 ORAbs.
FRATF 147 III 265 consid. 3.1art. 97 al. 1 COal.
ITDTF 147 III 265 consid. 3.1art. 97 cpv. 1 COcpv.
ENBGE 147 III 265 at 3.1Art. 97(1) ORpara.

Data Flow

Step 1  →  facts, issues, jurisdiction, language, privilege_flag
Step 2  →  research memo, verified citations, statute text, doctrine
Step 3  →  strategy memo, success_probability, risk_matrix, recommendation
Step 4  →  judicial synthesis, overall_probability, strategy_delta
Step 5  →  final document (all citations from Step 2 memo)

Quality Gates

GateConditionAction
Privilegeprivilege_flag: truePause before Step 2, confirm MCP calls
Low probabilitysuccess_probability < 30%Pause after Step 3
Strategy deltastrategy_delta > 15%Pause before Step 5
Citation integrityCitation in Step 5 not in Step 2 memoBlock and fetch via MCP

Professional Disclaimer

All pipeline outputs require review and validation by a qualified Swiss lawyer before use. This framework does not constitute legal advice. Lawyers maintain full professional responsibility for all legal work products.

Frequently asked questions

What does the Legal 5step Framework AI skill do?

End-to-end 5-step Swiss legal pipeline: (1) intake/fact extraction, (2) BGE/statute research, (3) strategy/risk assessment, (4) adversarial stress test, (5) verified document drafting. Trigger when: user asks for full analysis, 'run all steps', 'full pipeline', or 'end-to-end'. Do NOT trigger for: single-step tasks (use individual commands), citation-only work, or translation. Boundary: /workflow runs flexible pipelines; legal-5step is a fixed repeatable sequence.

Why use Legal 5step Framework on TypingMind?

Because you install it once and use it with any model. Legal 5step Framework is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Legal 5step Framework in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fedec65/bettercallclaude/tree/main/bettercallclaude/skills/legal-5step-framework. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Legal 5step Framework?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Legal 5step Framework?

As many as you like. As long as a model supports skills, you can use Legal 5step Framework with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Legal 5step Framework AI skill free?

Yes. It is published on GitHub by fedec65 under the AGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇