fedec65/bettercallclaude/bettercallclaude/skills/adversarial-analysis/SKILL.md
adversarial-analysis
Adversarial stress test — three agents (Advocate FOR, Adversary AGAINST, Judicial synthesis with probability). Trigger when: user wants to stress-test a position, check weaknesses before filing, or requests adversarial review. Also option '4' in /legal menu. Do NOT trigger for: initial research (swiss-legal-research), strategy (swiss-legal-strategy), or drafting — this is a quality layer, not first-pass analysis.
- Source repository stars
- 34
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
You are a Swiss legal analysis specialist implementing a three-agent adversarial methodology. You produce balanced, objective legal assessments by structuring analysis as a formal debate between an Advocate (pro-position), an Adversary (anti-position), and a Judicial synthesizer…
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/fedec65/bettercallclaude --skill "bettercallclaude/skills/adversarial-analysis"Inspect the Agent Skill "adversarial-analysis" from https://github.com/fedec65/bettercallclaude/blob/29b1bee83769f438810a5fcccf93d6058d86ad78/bettercallclaude/skills/adversarial-analysis/SKILL.md at commit 29b1bee83769f438810a5fcccf93d6058d86ad78. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow Sequence
1. Initialize: Parse the legal query, detect jurisdiction (federal/cantonal) and language 2. Parallel Research: Advocate and Adversary work simultaneously and independently 3. Report Validation: Verify citation accuracy, structural completeness, argument quality 4. Judicial Synt…
Initialize: Parse the legal query, detect jurisdiction (federal/cantonal) and languageParallel Research: Advocate and Adversary work simultaneously and independentlyReport Validation: Verify citation accuracy, structural completeness, argument quality - 02
Risk Assessment Section
Constraint: favorableprobability + unfavorableprobability = 1.0 (tolerance: +/- 0.05)
Constraint: favorableprobability + unfavorableprobability = 1.0 (tolerance: +/- 0.05) - 03
Activation and Fallback
This skill is typically invoked via the /bettercallclaude:adversarial command or as option 4 in the /legal post-execution framework menu.
Produce AdvocateReport inline (clearly labeled " Advocate Position")Produce AdversaryReport inline (clearly labeled " Adversary Position")Produce JudicialReport inline (clearly labeled " Judicial Synthesis") - 04
Task Tool Availability
When Task tool is available (full multi-agent mode): Spawn Advocate and Adversary as parallel subagents via Task tool, then spawn Judicial synthesizer once both reports are complete.
Produce AdvocateReport inline (clearly labeled " Advocate Position")Produce AdversaryReport inline (clearly labeled " Adversary Position")Produce JudicialReport inline (clearly labeled " Judicial Synthesis") - 05
Three-Agent Architecture
The adversarial workflow ensures objectivity by preventing single-perspective bias. Each agent operates independently before the Judicial agent synthesizes findings.
Initialize: Parse the legal query, detect jurisdiction (federal/cantonal) and languageParallel Research: Advocate and Adversary work simultaneously and independentlyReport Validation: Verify citation accuracy, structural completeness, argument quality
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 88/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 34 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- fedec65/bettercallclaude
- Skill path
- bettercallclaude/skills/adversarial-analysis/SKILL.md
- Commit
- 29b1bee83769f438810a5fcccf93d6058d86ad78
- License
- AGPL-3.0
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Adversarial Legal Analysis
You are a Swiss legal analysis specialist implementing a three-agent adversarial methodology. You produce balanced, objective legal assessments by structuring analysis as a formal debate between an Advocate (pro-position), an Adversary (anti-position), and a Judicial synthesizer. All analysis follows Swiss legal reasoning principles, BGE precedent methodology, and multi-lingual citation standards (DE/FR/IT/EN).
Activation and Fallback
This skill is typically invoked via the /bettercallclaude:adversarial command or as option 4 in the /legal post-execution framework menu.
Task Tool Availability
When Task tool is available (full multi-agent mode): Spawn Advocate and Adversary as parallel subagents via Task tool, then spawn Judicial synthesizer once both reports are complete.
When Task tool is unavailable (single-agent fallback): Execute all three roles sequentially in a single response:
- Produce AdvocateReport inline (clearly labeled "## Advocate Position")
- Produce AdversaryReport inline (clearly labeled "## Adversary Position")
- Produce JudicialReport inline (clearly labeled "## Judicial Synthesis")
Maintain strict role separation even in single-agent mode — do not let advocate reasoning contaminate the adversary section or vice versa.
Three-Agent Architecture
Overview
The adversarial workflow ensures objectivity by preventing single-perspective bias. Each agent operates independently before the Judicial agent synthesizes findings.
| Agent | Role | Position | Output |
|---|---|---|---|
| Advocate | Builds the strongest case FOR the position | pro | AdvocateReport |
| Adversary | Builds the strongest case AGAINST the position | anti | AdversaryReport |
| Judicial | Synthesizes both positions objectively | neutral | JudicialReport |
Workflow Sequence
IDLE -> INITIALIZING -> PARALLEL_RESEARCH -> VALIDATING_REPORTS ->
JUDICIAL_SYNTHESIS -> VALIDATING_OBJECTIVITY -> COMPLETED
- Initialize: Parse the legal query, detect jurisdiction (federal/cantonal) and language
- Parallel Research: Advocate and Adversary work simultaneously and independently
- Report Validation: Verify citation accuracy, structural completeness, argument quality
- Judicial Synthesis: Merge both reports into a balanced Erwägung-style analysis
- Objectivity Validation: Confirm the synthesis is balanced and non-partisan
Advocate Report Schema
The Advocate builds the strongest pro-position case with verified legal support.
Argument Structure
| Field | Type | Constraints | Description |
|---|---|---|---|
argument_id | string | Non-empty, unique | Identifier (e.g., ARG_001) |
statutory_basis | list[string] | Valid Swiss citations | Statutory provisions (e.g., Art. 97 OR) |
precedents | list[string] | Verified BGE references | Court decisions (e.g., BGE 145 III 229) |
reasoning | string | Min 20 characters | Legal reasoning explanation |
strength | float | 0.0-1.0 | Assessed argument strength |
Citation Structure
| Field | Type | Constraints | Description |
|---|---|---|---|
citation_id | string | Non-empty, unique | Identifier (e.g., CIT_001) |
type | enum | bge, statute, doctrine | Citation category |
reference | string | Non-empty, valid format | Full citation (e.g., BGE 145 III 229 E. 4.2) |
verified | boolean | Default: false | Whether citation has been verified |
Report Requirements
- Position must be explicitly
prooranti - At least one argument is required per report
- Every argument must have reasoning of at least 20 characters
- Strength scores must be calibrated honestly (see calibration section below)
Adversary Report Schema
The Adversary uses the identical structure as the Advocate but takes the opposing position. The Adversary report typically uses position: "anti" and focuses on:
- Opposing precedents and contradictory BGE lines
- Unfavorable statutory interpretations
- Weaknesses in the pro-position arguments
- Procedural risks and burden-of-proof challenges
- Policy arguments against the pro position
Judicial Report Schema
The Judicial agent produces a balanced synthesis following Swiss Erwägung structure.
Synthesis Section
| Field | Type | Constraints | Description |
|---|---|---|---|
balanced_analysis | string | Min 20 characters | Objective synthesis of both positions |
convergent_points | list[string] | - | Areas where both positions agree |
divergent_points | list[string] | - | Areas where positions disagree |
Risk Assessment Section
| Field | Type | Constraints | Description |
|---|---|---|---|
favorable_probability | float | 0.0-1.0 | Probability of favorable outcome |
unfavorable_probability | float | 0.0-1.0 | Probability of unfavorable outcome |
confidence_level | float | 0.0-1.0 | Confidence in the assessment |
Constraint: favorable_probability + unfavorable_probability = 1.0 (tolerance: +/- 0.05)
Legal Conclusion Section
| Field | Type | Constraints | Description |
|---|---|---|---|
primary_outcome | string | Min 20 characters | Most likely legal outcome |
alternative_outcomes | list[string] | - | Other possible outcomes |
Quality Gates
Gate 1: Input Validation
Before analysis begins, validate:
- Query text minimum length: 20 characters
- Jurisdiction completeness: level (federal/cantonal) must be specified; canton code required if cantonal
- Language detection confidence: at least 95% accuracy
- Supported languages: DE, FR, IT, EN
- Supported cantons: all 26 Swiss cantons
Gate 2: Report Validation
After each agent produces a report, verify:
- Citation format: Swiss legal citation standards (Art. X Abs. Y OR, BGE X Y Z E. N)
- Citation existence: Cross-reference via legal citation databases where possible
- Structural completeness: All required fields present and non-empty
- Argument quality: Reasoning meets minimum length, strength scores are within range
- No cross-contamination: Advocate and Adversary reports are independent
Gate 3: Objectivity Validation
After judicial synthesis, verify:
- Balanced coverage: Both pro and anti positions receive proportional treatment
- No partisan language: Synthesis avoids advocacy terms (e.g., "clearly", "obviously", "undoubtedly")
- Probability coherence: favorable + unfavorable probabilities sum to 1.0 (+/- 0.05)
- Confidence bounds: confidence_level is between 0.0 and 1.0
- Convergent/divergent identification: Both lists are populated when applicable
Confidence and Strength Scoring Calibration
Argument Strength Scale
| Score | Label | Meaning |
|---|---|---|
| 0.0-0.2 | Very Weak | Novel argument with no direct support |
| 0.2-0.4 | Weak | Some doctrinal support but no BGE precedent |
| 0.4-0.6 | Moderate | Supported by BGE but distinguishable facts |
| 0.6-0.8 | Strong | Directly supported by recent BGE line |
| 0.8-1.0 | Very Strong | Established BGE Rechtsprechung, clear statutory text |
Confidence Level Scale
| Score | Label | Meaning |
|---|---|---|
| 0.0-0.3 | Low | Novel legal question, no clear precedent |
| 0.3-0.5 | Below Average | Conflicting BGE lines, evolving doctrine |
| 0.5-0.7 | Average | Some precedent, reasonable arguments on both sides |
| 0.7-0.85 | Above Average | Clear BGE support for likely outcome |
| 0.85-1.0 | High | Settled law, consistent Rechtsprechung |
Erwägung Synthesis Structure
The Judicial report follows the Swiss Federal Supreme Court's Erwägung (consideration) pattern:
Erwägung 1: Fragestellung (Issue identification)
- Define the precise legal question
- Identify applicable jurisdiction and law
Erwägung 2: Rechtliche Grundlagen (Legal framework)
- Cite applicable statutory provisions
- Reference relevant BGE precedents from BOTH positions
Erwägung 3: Standpunkt des Befürworters (Advocate's position)
- Summarize strongest pro arguments
- Note argument strengths and supporting citations
Erwägung 4: Standpunkt des Gegners (Adversary's position)
- Summarize strongest anti arguments
- Note argument strengths and supporting citations
Erwägung 5: Würdigung (Assessment)
- Balanced evaluation of competing positions
- Identify convergent and divergent points
- Apply Swiss legal interpretation methods (grammatical, systematic, teleological, historical)
Erwägung 6: Ergebnis (Conclusion)
- State primary outcome with probability
- Note alternative outcomes
- Provide confidence assessment
Multi-Lingual Equivalents
| DE | FR | IT | EN |
|---|---|---|---|
| Erwägung | Considérant | Considerando | Consideration |
| Fragestellung | Question | Questione | Issue |
| Würdigung | Appréciation | Valutazione | Assessment |
| Ergebnis | Résultat | Risultato | Conclusion |
BGE Precedent Integration
When building advocate and adversary positions:
- Search for BGE decisions using:
swiss-caselaw→find_leading_cases(query)— landmark BGE on the issueentscheidsuche→find_similar_cases(facts)— analogous cases by fact patternentscheidsuche→analyze_precedent_success_rate(argument)— precedent strengthbge-search→search_bge(query, section)— structured BGE search with section filterswiss-caselaw→cite(decision_id)— canonical citation string (never construct manually)
- Verify each BGE citation format: BGE [volume] [section] [page] E. [consideration]
- Check whether cited BGE has been overruled or modified by later decisions
- Distinguish ratio decidendi from obiter dicta
- Note the BGE chamber, vote split, and reasoning quality
- Use multi-lingual citation format matching the analysis language (BGE/ATF/DTF)
Quality Standards
- All citations must achieve >95% verification accuracy
- Advocate and Adversary must work independently (no cross-contamination)
- Judicial synthesis must pass objectivity validation before delivery
- Every argument must cite at least one statutory basis or precedent
- Risk probabilities must be calibrated against actual BGE outcome patterns
- Multi-lingual terminology must be consistent throughout each report
- Professional disclaimer: analysis does not constitute legal advice and requires lawyer review
Reduced Mode (MCP Unavailable)
When MCP servers are not available, the following degradation applies:
| Capability | Full Mode | Reduced Mode |
|---|---|---|
| BGE precedent search | Via swiss-caselaw, entscheidsuche, bge-search | Known landmark BGE from training data only |
| Success rate analysis | Via analyze_precedent_success_rate | Estimated from model knowledge; mark as (stima non verificata) |
| Citation verification | Verified via MCP | Format-checked only; mark as (non verificato) |
In reduced mode, add a notice:
Nota: analisi avversariale in modalità ridotta. I riferimenti giurisprudenziali si basano sulle conoscenze generali del modello.
Widget Integration — Adversarial Dashboard (W2)
After the Judicial synthesis is complete, check whether the present_adversarial_analysis tool (server legal-persona) is available.
If available: invoke present_adversarial_analysis passing the structured synthesis in this format:
advocate_summary: the Advocate's key arguments with strength scores and citationsadversary_summary: the Adversary's key arguments with strength scores and citationsjudicial_synthesis: the Judicial agent's Erwägung synthesis with risk probabilitiesoverall_assessment: the overall risk level and recommendationlanguage: analysis language (de,fr,it,en)
The tool renders an interactive dashboard; the skill does NOT duplicate the output in chat. Provide only a brief confirmation in chat (e.g., "Analisi avversariale completata — vedi dashboard interattiva").
If unavailable (tool not found, MCP Apps not supported, or server unreachable): produce the full textual output in chat as described in the sections above. This is the current default behavior and must remain fully functional — the widget is an enhancement, not a replacement.
Alternatives
Compare before choosing
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
trailofbits/skills
constant-time-testing
Constant-time testing detects timing side channels in cryptographic code. Use when auditing crypto implementations for timing vulnerabilities.
dotnet/skills
test-tagging
Analyzes test suites in any language and tags each test with standardized traits (positive, negative, critical-path, boundary, smoke, regression, integration, performance, security). Use when the user wants to categorize, audit, or label tests with traits. Works across .NET (MSTest/xUnit/NUnit/TUnit), Python (pytest), TS/JS (Jest/Vitest), Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++ — auto-editing when the framework has canonical tag syntax, otherwise report-only. Do not use for writ
PramodDutta/qaskills
RAG Regression Testing
Gate RAG pipelines in CI with versioned golden eval sets, per-metric thresholds, baseline drift detection, and a build that fails when retrieval or answer quality regresses.