Patent-Application Sub-Skill Prerequisites: Required Inputs and Setup Guide
Prerequisites for using the patent-application sub-skill are a completed disclosure output directory from the patent-disclosure skill, containing the written disclosure document, structured schema data, and line-drawings, plus a declared patent type (invention, utility model, or design).
The patent-application sub-skill in the handsomestWei/patent-disclosure-skill repository transforms an existing patent disclosure (交底书) into a complete patent-application package. This package includes claims, description, abstract, and black-and-white drawings—collectively known as the 四件套 (four-piece set). Before this conversion can occur, the sub-skill strictly validates that all prerequisite artefacts are present in the disclosure output folder.
Required Disclosure Output Directory
The foundation prerequisite is a disclosure output directory located under outputs/{案件标识}/. This folder must be generated by the patent-disclosure sub-skill in a prior execution.
In skills/patent-application/tools/check_support.py, the sub-skill validates the presence of this directory before processing begins. If the directory is absent or incomplete, the skill aborts immediately with a prompt to "补交底" (complete the disclosure first).
Mandatory Artefacts in the Disclosure Folder
The patent-application sub-skill expects three specific artefacts within the disclosure output directory:
| Artefact | Description | Failure Mode |
|---|---|---|
| 交底书 (written disclosure) | The narrative invention description produced by the disclosure skill | Skill aborts if missing |
| schema (structured data) | JSON or structured metadata describing the invention's technical fields | Validation error |
| 线稿 (line-drawings) | Hand-drawn invention sketches for figure generation | Figure generation skipped or failed |
According to the skills/patent-application/README.md, missing any of these components triggers an explicit user prompt to provide the incomplete material before the application builder can proceed.
Patent Type Declaration
You must declare the 专利类型 (patent type) when invoking the sub-skill. The accepted values are:
- 发明 (invention patent) — requires full claims, detailed description, and technical drawings
- 实用新型 (utility model) — simplified claims with focus on shape/structure improvements
- 外观 (design patent) — emphasizes visual appearance with specialized figure requirements
This declaration determines which templates emit_application_docx.py selects and how compose_application_figure.py processes the line-drawings into formal patent figures.
How to Verify Prerequisites Are Met
The validation logic in check_support.py performs these checks in sequence:
- Directory existence — confirms
outputs/{case_id}/is accessible - File completeness — locates
disclosure.txt,schema.json, and drawing files - Schema validity — parses structured data for required fields
- Patent type compatibility — validates the declared type against available templates
Invocation Examples (Prerequisites Satisfied)
Once the disclosure output directory is ready, invoke the sub-skill through any supported interface:
# Python wrapper — explicit patent type
from skills.patent_application import run_skill
result = run_skill(
command="专利申请文件,交底在 outputs/Case12345/",
patent_type="发明"
)
# Returns: paths to Markdown, Word, and generated figure files
print(result)
# Skill-file YAML configuration
skill: patent-application
input: "专利申请文件,交底在 outputs/Case12345/"
options:
patent_type: 实用新型
# CLI entry point with design patent type
skill-cli patent-application "专利申请文件,交底在 outputs/Case12345/" --type 外观
All three patterns fail gracefully with an error message if the disclosure artefacts are not found at the specified path.
Output Generated Upon Successful Completion
When prerequisites are satisfied, the sub-skill produces:
- Markdown — structured application text for review
- Word document (.docx) — formal patent application via
emit_application_docx.py - Black-and-white figures — processed invention drawings via
compose_application_figure.py - 问题清单 (issue list) — appended unresolved questions requiring attorney review
Summary
- The
patent-applicationsub-skill requires a disclosure output directory from priorpatent-disclosureexecution - Three artefacts are mandatory: 交底书 (disclosure text), schema (structured data), and 线稿 (line-drawings)
- Patent type must be declared as 发明, 实用新型, or 外观 to select appropriate templates
- Validation occurs in
check_support.py; missing prerequisites trigger "补交底" prompts - Successful execution produces the 四件套 package plus an issue list for legal review
Frequently Asked Questions
What happens if I run patent-application without a disclosure folder?
The sub-skill aborts immediately. The validation logic in check_support.py detects the missing directory and returns a message asking you to "补交底" (complete the disclosure) first. No application documents are generated.
Can I reuse a disclosure folder from an older case?
Yes, if the folder structure matches the expected outputs/{案件标识}/ format and contains all three required artefacts. The sub-skill does not validate case timestamps—only file presence and schema completeness.
Where is the patent type used in the generated output?
The patent type flows through emit_application_docx.py to select document templates and through compose_application_figure.py to determine figure styling. Each type produces structurally different claims and drawing requirements per Chinese patent examination guidelines.
Is the issue list (问题清单) always appended?
Yes. According to skills/patent-application/README.md, this list is automatically appended to every output as a quality-control measure, flagging unresolved technical or legal questions that require human attorney review before formal submission.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →