Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

legal-red-team合法的红队

Agent Skill

legal-red-team 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

456

周安装

19

GitHub Stars

103

下载量

152
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:legal-red-team(合法的红队)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/legal-red-team
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill legal-red-team
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill legal-red-team

简介

legal-red-team 用于法律安全相关的信息检索与筛选,适合合规审计与风险排查场景。

  • 支持基于关键词、漏洞类型或法规要求定位候选资料,适用于安全评估与法律审查。
  • 通过 npx skills add 命令从 GitHub 仓库安装,需确认权限与维护状态。
  • 建议在使用前核实是否涉及联网或文件读写,避免意外行为。
  • 可结合原始 README 了解具体调用方式与适用限制。

SKILL.md

⚠️ EXPERIMENTAL — This skill is provided for educational and informational purposes only. It does NOT constitute legal advice. All responsibility for usage rests with the user. Consult qualified legal professionals before acting on any output.

Legal Red Team

Production-ready adversarial verification framework for AI-generated legal content. Covers factual accuracy, citation validation, arithmetic checking, speculation detection, and distribution readiness scoring.


Table of Contents


Verification Categories

Every AI-generated legal document must be checked across 6 categories.

#CategoryWhat to CheckRed Flags
1Factual AccuracyDates, references, numbers, entity names, timelinesWrong effective dates, confused entity names, incorrect amounts
2Legal Authority CitationsPrimary/secondary sources, format, hierarchy, currencyNon-existent articles, wrong section numbers, outdated citations
3Arithmetic ValidationTimelines, percentages, financial calculations, deadlinesDate math errors, percentage miscalculations, compounding mistakes
4Source VerificationVerifiable claims, official sources, cross-referencingUnverifiable assertions stated as fact, single-source claims
5Speculation DetectionOpinion vs fact, uncertainty language, predictive claimsPredictions stated as certainty, guidance treated as binding law
6Disclaimer AdequacyLegal advice disclaimers, jurisdiction, date, professional consultationMissing disclaimers, overly broad claims, no jurisdiction limits

Tools

Legal Fact Checker

Scans legal text for verifiable claims and flags potential hallucination patterns.

# Check a legal document
python scripts/legal_fact_checker.py --input document.txt

# Check with JSON output
python scripts/legal_fact_checker.py --input memo.txt --json

# Check inline text
python scripts/legal_fact_checker.py --text "Under GDPR Article 83(5), fines can reach EUR 20 million..."

# Save verification report
python scripts/legal_fact_checker.py --input document.txt --output report.json

Legal Quality Scorer

Scores legal document quality across all 6 verification categories.

# Score a document
python scripts/legal_quality_scorer.py --input document.txt

# Score with JSON output
python scripts/legal_quality_scorer.py --input document.txt --json

# Score with detailed breakdown
python scripts/legal_quality_scorer.py --input document.txt --verbose

# Save quality assessment
python scripts/legal_quality_scorer.py --input document.txt --output assessment.json

Six-Step Methodology

Step 1: Initial Review

Read the entire document with an adversarial mindset. For each claim, ask:

  • Is this verifiable?
  • Does this sound too specific to be generated without a source?
  • Does this sound too confident for an uncertain area?

Mark every factual assertion, citation, date, number, and predictive statement.

Step 2: Source Verification (ALWAYS Web Search)

For every verifiable claim, attempt to verify against official sources.

Source TypeVerification MethodExamples
EU legislationEUR-Lex official databaseeur-lex.europa.eu
US federal lawcongress.gov, govinfo.govOfficial code and statutes
US regulationseCFR, Federal Registerecfr.gov
UK legislationlegislation.gov.ukOfficial statute database
Court decisionsCourt databases, Westlaw, LexisNexisOfficial reporters
Agency guidanceAgency official websiteDirect download from.gov/.europa.eu
International treatiesUN Treaty Collectiontreaties.un.org

Rule: If a claim cannot be verified from an official source, flag it. Do not assume accuracy.

Step 3: Arithmetic Verification

Check every calculation, date computation, and numerical claim.

Check TypeMethod
Timeline calculationsCount days/months/years between stated dates
Percentage calculationsRecalculate from base figures
Financial computationsVerify arithmetic and compounding
Deadline calculationsConfirm against statutory text
Penalty rangesCross-check against statute

Step 4: Citation Validation

For every legal citation, verify:

ElementCheck
Source existsDoes the cited statute/article/section actually exist?
Content matchesDoes the cited provision say what the document claims?
Citation formatIs the citation in correct format for the jurisdiction?
CurrencyIs this the current, in-force version?
Hierarchy correctIs the source characterized at the right authority level?

Step 5: Speculation Identification

Distinguish fact from opinion, certainty from prediction.

Language PatternClassificationAction
"The law requires..."Factual claimVerify against statutory text
"Courts will likely..."SpeculationFlag; add uncertainty qualifier
"It is recommended..."GuidanceVerify source; clarify if binding
"Best practice suggests..."OpinionLabel as opinion; cite source
"This means that..."InterpretationFlag if stated as fact without authority
"Companies must..."Obligation claimVerify statutory basis

Step 6: Disclaimer Review

Every AI-generated legal document must include:

Required ElementDescription
Not legal adviceClear statement that content is informational only
Jurisdiction limitationsWhich jurisdictions are and are not covered
Date of preparationWhen the content was prepared (law changes)
Professional consultationRecommendation to consult qualified legal counsel
AI-generated disclosureStatement that content was generated or assisted by AI
Accuracy limitationsAcknowledgment that verification is recommended

Severity Taxonomy

SeverityDefinitionExamplesAction
CRITICALFactually wrong in a way that could cause legal harmWrong article number creating false obligation, incorrect penalty amount, non-existent legal requirementMust fix before any distribution
HIGHMaterially misleading or unverifiableGuidance stated as binding law, unverifiable timeline, confident but unsourced claimMust fix or add prominent caveat
MODERATEImprecise or potentially confusingAmbiguous language, minor date discrepancy, incomplete citationShould fix; acceptable with caveat
LOWStyle or formatting issueCitation format inconsistency, missing cross-reference, minor redundancyFix if time permits

Quality Score

ScoreRatingDistribution StatusCriteria
5/5Distribution ReadySafe to distributeZero CRITICAL/HIGH issues; all citations verified; disclaimers complete
4/5Minor RevisionsSafe after small fixesZero CRITICAL; 1-2 HIGH issues with clear fixes; most citations verified
3/5Moderate RevisionsNeeds work before distributionZero CRITICAL; 3+ HIGH issues; some unverified citations
2/5Major RevisionsNot safe to distribute1+ CRITICAL issues; multiple HIGH issues; significant unverified content
1/5Not Distribution ReadyRequires complete reworkMultiple CRITICAL issues; pervasive inaccuracies; unreliable throughout

Known Hallucination Patterns

AI models exhibit 5 recurring patterns when generating legal content.

#PatternDescriptionDetection Technique
1Plausible but wrong article numbersAI generates article/section numbers that sound correct but do not exist (e.g., "Article 42(5)" when only 42(1)-(4) exist)Cross-reference every article number against official statute text
2Confident but incorrect datesImplementation timelines, effective dates, or deadlines stated with false confidence (off by weeks or months)Verify every date against official timeline from the statute or implementing body
3Mixing guidance and legal requirementsTreating non-binding recommendations as binding obligations (e.g., stating ENISA recommendations as NIS2 requirements)Check whether cited source is binding legislation vs guidance; verify authority level
4Outdated legal referencesCiting superseded or repealed provisions without noting they are no longer in forceVerify currency of every cited provision; check for amendments and repeals
5Arithmetic errors in timeline calculationsMiscounting days, months, or years between dates; wrong deadline calculationsIndependently calculate every timeline; do not trust AI date math

See references/hallucination_patterns.md for detailed examples and prevention strategies.


Reference Guides

GuidePathDescription
Verification Methodologyreferences/verification_methodology.mdComplete 6-step methodology with source hierarchy and citation formats
Hallucination Patternsreferences/hallucination_patterns.md5 patterns with examples, detection, and prevention strategies

Workflows

Workflow 1: Full Adversarial Review

  1. Run scripts/legal_fact_checker.py on the document.
  2. Review flagged items and verify each against official sources.
  3. Run scripts/legal_quality_scorer.py for category scores.
  4. For each CRITICAL/HIGH finding, document: the error, the correct information, and the source.
  5. Produce a verification report with findings by severity.
  6. Assign quality score and distribution readiness assessment.
  7. Validation: Every verifiable claim checked, score assigned, recommendations provided.

Workflow 2: Quick Citation Check

  1. Run scripts/legal_fact_checker.py on the document.
  2. Focus on citation extraction results.
  3. Verify each extracted citation against official source.
  4. Flag any citation that cannot be verified.
  5. Validation: All citations verified or flagged.

Workflow 3: Pre-Distribution Gate

  1. Run scripts/legal_quality_scorer.py on the final document.
  2. Review composite score.
  3. If score < 4/5, document must not be distributed.
  4. If score >= 4/5, verify CRITICAL count is zero.
  5. Confirm all disclaimers are present and adequate.
  6. Validation: Quality score >= 4/5, zero CRITICAL issues, disclaimers complete.

Troubleshooting

ProblemLikely CauseResolution
Too many false positivesRegex patterns matching non-legal textNarrow input to legal content only; use context-aware review
Cannot verify citationSource not freely accessibleNote as "unverifiable from public sources"; do not assume correct
AI-generated text has no citationsContent is entirely unsourcedFlag entire document as unverified; score as 2/5 or lower
Hallucination pattern detectedAI confabulation of legal detailsReplace with verified information from official source
Document mixes jurisdictionsNo clear jurisdiction scopeFlag as HIGH; recommend splitting by jurisdiction
Quality score seems too highAutomated scoring has limitsAlways supplement automated scoring with manual review

Success Criteria

CriterionTarget
Citations verified100% of legal citations checked against official sources
Hallucination patterns scannedAll 5 known patterns checked
Arithmetic validatedEvery calculation independently verified
Severity assignedEvery finding classified CRITICAL/HIGH/MODERATE/LOW
Quality score calculatedComposite score with per-category breakdown
Disclaimers verifiedAll 6 required disclaimer elements present
Distribution decisionClear go/no-go recommendation with rationale

Scope & Limitations

In scope: Verifying factual claims in legal text, validating citations, detecting hallucination patterns, scoring document quality, assessing distribution readiness.

Out of scope: Verifying legal conclusions or interpretations, assessing litigation strategy, replacing professional legal review, accessing paid legal databases (Westlaw, LexisNexis).

Disclaimer: This skill provides a structured adversarial verification methodology. It catches common AI errors but cannot guarantee complete accuracy. Professional legal review remains essential for high-stakes documents.


Anti-Patterns

Anti-PatternWhy It FailsBetter Approach
Trusting AI-generated citations without verificationAI models routinely generate plausible but non-existent legal citations; unverified citations in distributed documents create serious credibility and legal riskVerify every citation against official sources; assume wrong until proven right
Relying solely on automated checkingAutomated tools catch patterns but miss contextual errors, mischaracterizations, and subtle hallucinationsUse automated tools for first pass, then conduct manual review of all flagged items and a sample of unflagged items
Skipping the "adversarial mindset"Confirmation bias leads reviewers to accept plausible-sounding content; legal text that "sounds right" may still be wrongActively seek to disprove every claim; assume error until verified; question every specific number, date, and citation
Distributing with score 3/5 or belowMODERATE and HIGH issues in distributed documents undermine credibility and may cause legal harmSet a firm distribution threshold at 4/5; no exceptions without documented risk acceptance by a qualified reviewer

Tool Reference

ToolInputOutputUse Case
legal_fact_checker.pyLegal document textVerification report with flagged claims, citations, dates, hallucination alertsFirst-pass automated scanning of legal content
legal_quality_scorer.pyLegal document textQuality score (1-5) with per-category breakdown and severity-classified findingsPre-distribution quality gate

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.44%
按下载量换算54

Claude

29.23%
按下载量换算44

Cursor

17.42%
按下载量换算26

Gemini CLI

9.26%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills