Contract Legal Assistant: Contract Reviewing and Word Exporting within Agent

Preface

When teams interface with purchasing, outsourcing, or cooperative framework agreements, contracts are often revised through several rounds of chat before being handed over to legal for a full-text review. While general-purpose large language models can draft clauses, they struggle to stably align with your specific templates, review checklists, and legal excerpts. Furthermore, their output often remains in Markdown and cannot be directly converted into a Word report with an issue list. Below is an introduction to the SkillHub community skill “Contract Legal Assistant” (Coordinate: @user_c2b4521d/yidian-fayue), which integrates review rules, a local knowledge base, and python-docx export into a workflow that can be triggered within Agents like Cursor.

What is this

“Contract Legal Assistant” is a skill package on SkillHub categorized as professional and sourced from the community. The current version is v1.0.0, published by user_c2b4521d. The skill.json inside the package identifies the author as “Yidian Fayue Official Account” (壹典法阅公众号), with the skill display name “Contract Review and Drafting”, version field 1.0, and an update date of 2026-03-23.

The skill describes its behavior via a standard SKILL.md file: it prioritizes reading contract templates, legal texts, and rules/review_rules.json from the skill directory, using built-in fallbacks when local files are absent. Upon completion of the review, it can export 合同审查报告.docx (Contract Review Report.docx) and 合同修订版.docx (Revised Contract.docx). The page tag requires_api_key=false indicates it does not rely on additional API keys.

SkillHub Statistics (at time of crawl): Rating 100000, Downloads 3557, Installations 163.

Core Features

The following capabilities are derived from the SKILL.md and skill.json within the package and can be verified against the script implementation.

  1. Local Resources First
    Template directory knowledge/contracts/, legal regulations directory knowledge/laws/, and rules directory rules/. Description texts are included within these directories, prompting users to place reference contracts and laws into the corresponding folders.

  2. Full-Dimension Review (Skill Declaration)
    Upon triggering, it performs checks for typos, punctuation, professional terminology, and legal risks. review_rules.json contains configurations for common typo replacements, punctuation anomaly patterns, and a list of legal_risks items.

  3. Draft → Review → Revise → Export
    Supports generating contract text based on local templates, followed by review and Word export. The export directory is 导出文件/ (Exported Files) within the skill package.

  4. Traceability and Implementation
    The skill instructions require logging operations. The implementation is pure Python, with python-docx as the only dependency (see dependencies in skill.json).

  5. Trigger Commands (Agent Dialogue)

    • Review: 审查合同 (Review Contract), 合同审查 (Contract Review)
    • Drafting: 起草合同 (Draft Contract), 生成合同 (Generate Contract)
    • Export: 导出合同审查修订版 (Export Reviewed & Revised Contract), 创建Word版合同 (Create Word Version Contract)
    • View Resources: 查看本地合同模板 (View Local Contract Templates), 查看本地法规库 (View Local Legal Database)

Installation and Enablement

Method 1: Let the Agent install via SkillHub documentation

The prompt provided on the official page is: read the installation instructions first, then install the coordinate @user_c2b4521d/yidian-fayue.

Please install `@user_c2b4521d/yidian-fayue` according to https://skillhub.cn/install/skillhub.md.

Method 2: SkillHub CLI

If skillhub is already available on your machine, you must use the --dir flag during installation to point to the current Agent’s skills directory. Otherwise, it defaults to ./skills/ which may not be recognized.

Check CLI:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub documentation (example for CLI only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

Install the skill (replace <skills directory> with your environment’s path):

skillhub install @user_c2b4521d/yidian-fayue --dir <skills directory>

Common Agent skills paths (excerpt from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or reload the Agent to ensure the skill is indexed.

Python Dependencies

The skill declares a dependency on python-docx. In environments where you need to run the included scripts/contract_review.py directly, please install it first:

pip install python-docx

Typical Usage

Once the skill is enabled, use the trigger phrases listed in SKILL.md within your conversation. The Agent will invoke local rules and script logic according to the skill instructions.

Review and Export

  1. Paste the full text of the contract for review, or specify the contract name and key clauses.
  2. Send: 合同审查 (Contract Review) or 审查合同 (Review Contract).
  3. According to the skill instructions, the results should include an issue list, revision suggestions, and legal basis, generating 合同审查报告.docx and 合同修订版.docx in the 导出文件/ directory.

Draft based on Template

  1. If custom templates are needed, place the text into knowledge/contracts/ first (filename corresponds to contract type; the script example uses {合同类型}.txt).
  2. Send: 起草合同 (Draft Contract) or 生成合同 (Generate Contract), and specify the contract type (e.g., “Sales Contract”).
  3. The skill will proceed with the review and export workflow based on the template.

View Local Knowledge Base

Send 查看本地合同模板 (View Local Contract Templates) or 查看本地法规库 (View Local Legal Database) to confirm if the Agent can read files from knowledge/contracts/ and knowledge/laws/.

Applicable Scenarios & Notes

Who is it for

  • Product, operations, or legal collaboration roles who need to repeatedly modify contracts within an IDE and desire standard Word report outputs.
  • Teams willing to maintain local templates and legal excerpts, and wish to have editable review rules (rules/review_rules.json).

Limitations and Notes

  • The skill’s output cannot replace the opinion of a practicing lawyer; high-risk clauses still require manual final review.
  • When local resources are absent, it uses built-in fallback templates and legal summaries from the script. The depth of review depends on the content you place in knowledge/ and rules/.
  • Script comments within the package mention a “WordBaby” invocation entry, primarily targeting execution environments supporting Python plugins. In pure conversational Agents, the actual effect depends on whether the Agent follows SKILL.md to invoke scripts and read/write the export directory.
  • Statistics and versions are subject to the SkillHub page. To upgrade, use skillhub to update the same coordinate (follow the documentation of the Agent you are using).

Conclusion

“Contract Legal Assistant” consolidates configurable review rules, local templates/legal regulations, and Word export into a single SkillHub skill package. It is suitable as a preliminary contract review and drafting assistant within an Agent workflow. Official Skill page and API entry:

  • https://www.skillhub.cn/skills/user_c2b4521d/yidian-fayue
  • https://api.skillhub.cn/user_c2b4521d/yidian-fayue

Installation instructions: https://skillhub.cn/install/skillhub.md

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye