Skip to content
Back to skills

Traffic Law Doc

ASecurity

parse traffic accident legal documents and generate exam answers. use when user needs to extract text from word documents in e jiaotong directory, parse traffic safety exam papers, or generate structured legal knowledge base. supports batch processing of legal documents, exam paper analysis, and answer generation based on traffic laws.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 25, 2026
toolsaws

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 25, 2026

npx -y skills add CSlawyer1985/legal-skillhub --skill traffic-law-doc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Traffic Law Doc?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Traffic Law Doc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cslawyer1985-traffic-law-doc/badge)](https://www.skillsdirectory.com/skills/cslawyer1985-traffic-law-doc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: traffic-law-docs
description: parse traffic accident legal documents and generate exam answers. use when user needs to extract text from word documents in e jiaotong directory, parse traffic safety exam papers, or generate structured legal knowledge base. supports batch processing of legal documents, exam paper analysis, and answer generation based on traffic laws.
---

# traffic law documents parser

parse traffic accident legal documents and generate exam answers based on chinese traffic safety laws.

## overview

this skill provides tools for:
1. batch parsing legal documents - extract text from doc and docx files
2. building legal knowledge base - generate structured json from parsed documents
3. exam paper processing - parse exam papers and generate complete answers
4. legal citation - reference specific articles from traffic laws

## when to use

use this skill when:
- user asks to parse documents in e jiaotong directory
- user needs to extract text from word documents
- user wants to generate exam answers for traffic safety exams
- user needs to query specific traffic law articles
- user asks about traffic accident legal provisions

## supported document types

| document type | extension | parser |
|--------------|-----------|--------|
| word document old | doc | word com |
| word document new | docx | word com |
| legal regulations | doc docx | word com |
| exam papers | docx | word com |

## core workflow

### 1. parse legal documents

initialize word com to parse documents and extract text content.

### 2. batch process directory

process all doc and docx files in the legal documents directory.

### 3. generate exam answers

parse exam paper content, identify question types, and generate answers based on traffic laws.

## output format

### legal knowledge base json

```json
{
  "filename": {
    "filename": "original filename",
    "path": "full path",
    "content": "document content",
    "articles": {
      "article1": "content"
    }
  }
}
```

### exam answer document

markdown format with question number, correct answer, legal basis, and explanation.

## key legal references

### primary laws
- chinese traffic safety law
- chinese traffic safety law implementation regulations
- chinese civil code tort liability

### judicial interpretations
- supreme court interpretation on traffic accident compensation
- supreme court interpretation on personal injury compensation

### regulations
- traffic accident handling procedures
- compulsory traffic accident liability insurance regulations

### standards
- human body injury disability grading
- labor capacity assessment standards

## common tasks

### task parse all legal documents

1. check if e jiaotong laws directory exists
2. get all doc and docx files
3. parse each document
4. build json structure
5. save to traffic laws parsed json

### task generate exam answers

1. parse exam paper
2. identify question types
3. generate answers with legal references
4. create markdown answer document

### task query specific article

1. load parsed json
2. search for article number
3. return article content

## important notes

- save output as utf-8 for chinese characters
- requires microsoft word installed
- release com objects after use
- some old doc files may fail to parse

## example usage

user asks to parse legal documents
action batch parse all files and generate json

user asks to fill exam answers
action parse exam and generate answers

user asks about law article 76
action query json and return article content

## file locations

- source documents e jiaotong laws
- parsed output traffic laws parsed json
- exam answers exam answers md

Files in this skill

  • SKILL.md3.6 KB
  • _meta.json134 B
  • references/legal_articles.md9 KB
  • scripts/generate_exam_answers.py9.6 KB
  • scripts/parse_legal_docs.py5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…