AI Agent Hub
Back to skills
⚖️

Litigation Document Generator

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow the installation guide at https://skillhub.cn/install/skillhub.md to install @user_b8af0005/litigation-docs-generator.

About this skill

The Problem: Preparing Litigation Filing Documents

Litigation lawyers face a tedious and error-prone process when preparing a complete set of documents for case filing with the court. A single case may require a complaint, preservation application, guarantee letter, power of attorney, and more. The core challenge lies in maintaining absolute consistency of key information (party names, case numbers, amounts) across all documents while adhering to strict, non-negotiable formatting rules from the court (e.g., specific fonts, indentation, alignment). Manually copying data and adjusting formats in Word is inefficient and risky, where a single typo can lead to document rejection.

How It Works: Core Capabilities and Workflow

The litigation-docs-generator skill automates this entire process through a template-driven engine.

Core Capabilities

  • Template-Driven Format Standardization: All document templates are defined in .md files with a YAML frontmatter for formatting rules and Markdown content. The rendering engine render_docx.py processes these templates to produce court-compliant .docx files, ensuring perfect format consistency across the entire document set.
  • Single-Point Data Entry with Strict Consistency: After gathering case information (parties, amounts, cause of action) once in the first step, this core data is reused across all templates. Variables like [plaintiff_name] are consistently substituted in the complaint, preservation application, firm letter, etc., eliminating data mismatch errors.
  • Integrated Legal Research & Smart Linking: The skill can connect to legal databases like Yuandian or PKULaw for regulation and case law research. Upon identifying the cause of action, it intelligently prompts the user to generate a structured complaint and can automatically trigger the element-complaint-filler skill to populate relevant templates.
  • One-Click Retainer Agreement Generation: With basic case information already collected, 80% of the fields in the retainer agreement (client, firm, case details) are automatically populated, requiring only a few additional inputs like the attorney fee.

Key Workflow Steps

  1. Information Collection: Systematically gathers all necessary details about parties, the case, preservation requests, interest calculations, and agency information. Users can optionally upload an existing retainer agreement for automatic data extraction.
  2. Template Loading and Rendering: Loads all .md templates from references/ and executes render_docx.py to generate core documents like the complaint and preservation application one by one.
  3. Interest Calculation: Utilizes generate_interest_calc.py to automatically calculate interest based on an LPR (Loan Prime Rate) database, outputting an Excel sheet with verifiable formulas.
  4. Structured Document Generation: Based on the cause of action (e.g., private lending, compulsory execution), it automatically invokes the element-complaint-filler skill to populate structured complaint templates using the just-generated complaint as the source.
  5. Fixed Document Output: Automatically renders blank templates like the risk notice and lawyer feedback form to ensure the document checklist is complete.

Scope and Important Notes

  • Applicable Scenario: This skill is strictly limited to civil and commercial cases (e.g., contract disputes, torts, debt, corporate disputes). It is triggered by commands like "draft a complaint," "prepare filing materials," or "generate litigation documents."
  • Key Limitations: It is not suitable for criminal or administrative cases. Before generating any documents, a legal database connection check is mandatory; if disconnected, the user must be informed of the risks of a degraded mode.
  • Formatting Compliance: Generated documents adhere to standard court requirements: A4 paper, specific margins, FangSong/SimSun fonts, designated font sizes, and line spacing. The variable substitution rules in templates are strict to prevent misuse.
  • Professional Verification: While the skill aims for accuracy, all generated documents must be reviewed and confirmed by a practicing lawyer for legal basis, amount calculations, and core litigation claims before submission.

Use Cases

  • A lawyer takes on a private lending dispute case and needs to quickly generate a complete set of ten filing documents, including complaint, preservation application, and retainer agreement, ensuring all core information like party names, case numbers, and amounts is strictly consistent to avoid risks from manual data entry errors.
  • A corporate legal officer handling a sales contract dispute for filing needs to generate an interest loss calculation table as the basis for litigation claims, while also being prompted by the cause of action to automatically trigger the generation of a court-required structured complaint, completing the preparation of a standardized document set.
  • A law firm assistant preparing filing materials for a construction contract dispute needs to generate a firm letter (assignment letter) and two versions of the power of attorney (for the handling lawyer and for firm backup), ensuring accurate formatting like the document number, and that all documents comply with the court's formatting standards.
  • When a lawyer has not yet connected to professional legal databases like Yuandian or PKULaw but still needs to prepare filing materials, the skill can run in a degraded mode, generating legal citation references based on model knowledge and automatically appending risk warning notes to all generated documents for later verification by the lawyer.

Best For

  • Practicing lawyers or legal assistants responsible for preparing civil litigation filings, needing to generate a complete set of standardized, consistent litigation documents in one go to reduce time spent on manual copying, pasting, and formatting across multiple documents.
  • Corporate legal officers who need to prepare filing materials for the company's contract disputes and debt collection cases, seeking to automate the generation of complaints, preservation applications, etc., with accurate interest calculations and retainer agreement information reuse.
  • Developers in legal technology teams aiming to integrate document generation capabilities into internal legal systems, seeking customizable templates based on YAML format declarations and Markdown content, along with a rendering engine that can connect to legal databases.
  • Law firm managers handling batch cases who need to standardize document formats and data standards across teams, seeking that all documents generated by the skill follow fixed formatting rules, with key information ensured consistent through variable substitution.