legal-skills: Instructions file for Codex

AGENTS.md

legal-skills AGENTS.md is an instructions file for Codex, OpenCode from pa1nrui1/legal-skills. It costs 635 tokens per session, scanned A, original, MIT.

Repository instructions for a Chinese legal-skills project. They define how to classify and verify legal reports, documents, and Word files before delivery.

In plain words
What is it for?
They help prepare, label, review, and export legal deliverables according to their audience and required verification steps.
Why use it?
They reduce the risk of treating an unverified legal draft as a formal document for a client or court.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is pa1nrui1/legal-skills's own configuration. It tells Codex and OpenCode how to work on legal-skills itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything legal-skills configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pa1nrui1/legal-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pa1nrui1/legal-skills/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/pa1nrui1/legal-skills

Made for: Codex, OpenCode.

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-skills AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pa1nrui1/legal-skills/agents-md/github.svg)](https://agentmods.dev/instructions/pa1nrui1/legal-skills/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pa1nrui1/legal-skills/agents-md"><img src="https://agentmods.dev/badge/instructions/pa1nrui1/legal-skills/agents-md/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-skills AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pa1nrui1/legal-skills/agents-md"><img src="https://agentmods.dev/badge/instructions/pa1nrui1/legal-skills/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 635 This file is loaded in full into every session.
When invoked 635 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00635 $0.00635
Opus 5 $0.00318 $0.00318
Sonnet 5 $0.00127 $0.00127
Haiku 4.5 $0.00064 $0.00064

Measured 13d ago against content hash 7b7841e1a8ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

legal-skills AGENTS.md 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 13d 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.

AGENTS.md · 25 lines

How it starts

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

Repository Instructions

When a legal task involves a document, report, memo, case compilation, pleading, evidence list, legal opinion, client-facing material, court-facing material, or any .docx output, classify the deliverable before writing substantive content:

  1. 工作草稿: internal draft only; may be Markdown; must be named with 草稿 or 未出稿审查 if not reviewed.
  2. 律师内部报告: internal strategy analysis; may include risk assessment and litigation suggestions; must still include source boundary, reading review, and legal verification when it cites materials, cases, or law.
  3. 提交法院/客户的正式材料: court-facing or client-facing; must follow the applicable legal Skill template, stay clean and professional, and include required source boundary records.
  4. Word正式交付物: any formal .docx; must pass the full legal export chain before being called final or formal.

For every legal .docx or formal legal deliverable, stop and verify these gate items before export:

  • Current matter matches 【自定义工作目录】/_系统记录/当前事项.md; if it does not, switch/build the matter first or ask before continuing.
  • The correct legal Skill has been selected, including whether the output is a 法官版、律师版、诉讼文书、证据目录、法律意见 or other type.
  • Before writing substantive content, the corresponding legal template/reference file has been identified and recorded, with its key format requirements stated. After generation, run a reverse structure check against that template. For 证据目录, the controlling template is 诉讼文书起草/templates/证据目录格式.md; it must use grouped textual paragraphs with 第一组证据 and 证明目的, and must not be output as a table unless the user expressly overrides this template.
  • All cited case/material files have a 读取复查摘要.
  • All cited statutes, regulations, judicial interpretations, or current legal rules have a 法规校验摘要.
  • A 来源边界记录 exists and states verified, unverified, and output boundaries.
  • Any user choice that changes scope, version, strategy, amount, claim, authorization, or whether to include/exclude negative cases is recorded in 用户确认记录.
  • Formal Word output has draft.html, preflight-meta.json, draft_checked.html, 出稿前审查报告.md, and the report status is PASS or FIXED_PASS.
  • Formal Word output is generated only through 法律文书模板与导出 (html_to_docx.py) and passes health_check.py.

Read the full file on GitHub · 25 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. 13d ago First seen · 25 lines · 635 tokens per session scan A 7b7841e1a8ed

Subscribe to this mod's changes

legal-skills AGENTS.md is an instructions file published in the GitHub repository pa1nrui1/legal-skills (85 stars, last pushed 2mo ago), licensed MIT. It adds 635 tokens to every session, about $0.0032 per session on Opus 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-08-30.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens