legal-nlp-guide

legal-nlp-guide is a skill for Claude Code, Codex from wentorai/research-plugins. It costs 19 tokens per session (2,035 once invoked), scanned A, original, MIT.

A guide to using natural language processing, a method for analysing text with software, on legal documents such as contracts and court opinions.

In plain words
What is it for?
Use it to classify legal documents, identify people and organisations, extract contract clauses, find similar cases, and summarize court opinions.
Why use it?
It addresses the length, specialised vocabulary, complex sentences, cross-references, and time-sensitive rules that make legal text difficult to process.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to classify legal documents, identify people and organisations, extract contract clauses, find similar cases, and summarize court opinions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wentorai/research-plugins/legal-nlp-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wentorai/research-plugins --skill legal-nlp-guide
Clone the repo
git clone --depth 1 https://github.com/wentorai/research-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for legal-nlp-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/wentorai/research-plugins/legal-nlp-guide/github.svg)](https://agentmods.dev/skills/wentorai/research-plugins/legal-nlp-guide)
Your own site
<a href="https://agentmods.dev/skills/wentorai/research-plugins/legal-nlp-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/legal-nlp-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for legal-nlp-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/wentorai/research-plugins/legal-nlp-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/legal-nlp-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,035 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.02035
Opus 5.5 $0.00008 $0.00814
Sonnet 5.5 $0.00004 $0.00407
Haiku 4.5 $0.00002 $0.00203

Measured 2mo ago against content hash db636c81c6a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

legal-nlp-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/domains/law/legal-nlp-guide/SKILL.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A skill for applying natural language processing techniques to legal texts. Covers legal document classification, named entity recognition for legal entities, contract clause extraction, case law similarity search, and court opinion summarization using modern NLP tools.

Legal language presents unique NLP challenges:

  • Long documents: Court opinions average 5,000-20,000 tokens; contracts can exceed 50,000
  • Domain-specific vocabulary: Terms of art with precise legal meanings (e.g., "consideration", "estoppel")
  • Complex syntax: Multi-clause sentences with nested qualifications and cross-references
  • Citation networks: Dense cross-referencing between cases, statutes, and regulations
  • Temporal reasoning: Effective dates, amendments, and retroactivity

Document Type Classification

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Legal-BERT: domain-adapted BERT for legal text
model_name = "nlpaueb/legal-bert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(
    model_name, num_labels=5
)

# Legal document categories
labels = ["contract", "court_opinion", "statute", "regulation", "brief"]

def classify_legal_document(text: str, max_length: int = 512) -> dict:
    """
    Classify a legal document into predefined categories.
    For long documents, use the first 512 tokens (typically the
    preamble/introduction which contains strong classification signals).
    """
    inputs = tokenizer(
        text, return_tensors="pt",
        max_length=max_length, truncation=True, padding=True
    )
    with torch.no_grad():
        logits = model(**inputs).logits
    probs = torch.softmax(logits, dim=-1).squeeze()
    predicted = labels[probs.argmax().item()]
    return {
        "predicted_class": predicted,
        "confidence": probs.max().item(),
        "all_scores": {l: p.item() for l, p in zip(labels, probs)},
    }

Read the full file on GitHub · 237 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 237 lines · 19 tokens per session scan A db636c81c6a7

Subscribe to this mod's changes

legal-nlp-guide is a skill published in the GitHub repository wentorai/research-plugins (323 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 2,035 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

legal-nlp-guide compared with skills from other repositories

legal-nlp-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
legal-nlp-guidewentorai/research-pluginsSkill3235mo agoMITA19Claude Code, Codex
prowler-complianceprowler-cloud/prowlerSkill15k3d agoApache-2.0A189Claude Code
policysemantica-agi/semanticaSkill15k2d agoMITA36Claude Code
open-weightsericrisco/rsc-harnessSkill6825d agoMITA146Claude Code, Codex
ai-ethics-reviewmohitagw15856/pm-claude-skillsSkill1.6kyesterdayMITA88Claude Code
813-regulations-iso-42001jabrena/plinthSkill469yesterdayApache-2.0A77Claude Code, Codex
801-regulations-eu-ai-actjabrena/plinthSkill469yesterdayApache-2.0A108Claude Code, Codex