Overview
This Skill is designed to assist in the complete patent drafting workflow, encompassing seven stages: Project Analysis, Market Analysis, Project Novelty Search, Patent Portfolio Generation and Claim Tree Optimization, Invention Disclosure and Drawing Generation, Claims Drafting, and Full Patent Application Document (Specification + Abstract) Generation.
Core Principles
- Fixed Output Directory: The
patent-compose outputdirectory under the patent project root. Do not write to any other directory by default. - Authenticity Principle: All analysis must be strictly based on the project's real files. Do not fabricate or conjecture non-existent technical solutions.
- Comprehensive Coverage: Do not omit any technical details. Only content that is clearly part of industry-standard implementations may be omitted.
- Standard Terminology: Must adopt standard technical terms from the relevant technical field. Prioritize standardized nouns from national and industry standards, as well as standard technical terms from the International Patent Classification (IPC). For scientific terms with national standards, use the official terminology; where no official term exists, use conventional expressions accepted in the field. Do not invent non-standard vocabulary. Prohibit the use of colloquialisms, internet buzzwords, industry jargon, or non-technical expressions as substitutes for professional terms.
- Clear and Understandable: Describe technical solutions in clear, straightforward language that can be understood by non-technical personnel. Avoid vague praise, marketing slogans, universal templates, empty platitudes, or other clichés that have an "AI-like" feel.
Workflow
Stage 1: Project Analysis
Read ${SKILL_DIR}/prompts/stage1_analyze_project.md
Function: Analyze the project's source code and documentation to extract core technical solutions and potential patentable points.
Output:
materials/disclosure-v1.md- First version of the technical invention disclosure, representing the analysis results.materials/formula_inventory.md- Inventory of formulas used in the project.
Stage 2: Market Analysis → Initial Claim Tree
Read ${SKILL_DIR}/prompts/stage2_analyze_market.md
Function: Based on the project analysis results, combined with product planning, competitive analysis, and future market demand prediction, generate an initial version of the claim tree and a market analysis report.
Output:
materials/market-report.md- Market analysis report (light or deep version).materials/claim-tree-v1.json- Initial version of the claim tree (JSON format).
Stage 3: Project Novelty Search
Read ${SKILL_DIR}/prompts/stage3_prior_search.md
Function: Perform patent database searches based on keywords to assess the novelty and inventive step of the technical solutions.
⚠️ After executing the database search script, wait for user confirmation.
Output:
materials/keyword-cn.json- Chinese search keywords.materials/keyword-en.json- English search keywords.materials/prior-art.md- List of prior art relevant to the project.materials/prior-art-report.md- Novelty search analysis report.
Stage 4: Patent Portfolio Generation and Claim Tree Optimization
Read ${SKILL_DIR}/prompts/stage4_design_portfolio.md
Function: Layout the patent portfolio and optimize it through six rounds of adversarial game play.
Output:
materials/portfolio-initial.json- Initial patent portfolio scheme.materials/portfolio-initial.md- Report on the generation of the initial patent portfolio scheme.materials/portfolio-v2.json- Final patent portfolio scheme.claim-optimization/- Records of six rounds of attack and defense (R1-R6.json) + HTML visualization report.
Stage 5: Draft Final Invention Disclosure and Drawings
Read ${SKILL_DIR}/prompts/stage5_generate_disclosure.md
Function: For each patent, draft a complete technical invention disclosure (incorporating novelty search results) and create Mermaid format drawings.
Output:
patents/disclosure_{Patent Title}.md- Independent invention disclosure for each patent (final version).patents/flowcharts_{Patent Title}.md- Drawings for each patent (Mermaid format).materials/disclosure-v2.md- Consolidated final version of the invention disclosure.
Stage 6: Draft Claims
Read ${SKILL_DIR}/prompts/stage6_compose_claim.md
Function: Automatically generate the claims for each patent and perform quality checks.
Output:
patents/claims_{Patent Title}.md- Independent claims document for each patent.
Stage 7: Draft Complete Patent Application Documents
Read ${SKILL_DIR}/prompts/stage7_compose_application.md
Function: Based on the invention disclosure, claims, and drawings, draft the complete specification and abstract for each patent, perform figure marking registration and consistency checks, and produce the four-part patent application package meeting legal requirements.
Output:
patents/specification_{Patent Title}.md- Independent specification for each patent.patents/abstract_{Patent Title}.md- Independent abstract for each patent.
Output Directory Structure
patent-compose output/
├── materials/ # Materials files
│ ├── disclosure-v1.md # Stage 1: Original technical invention disclosure
│ ├── formula_inventory.md # Stage 1: Formula inventory
│ ├── market-report.md # Stage 2: Market analysis report
│ ├── claim-tree-v1.json # Stage 2: Initial claim tree
│ ├── keyword-cn.json # Stage 3: Chinese search keywords
│ ├── keyword-en.json # Stage 3: English search keywords
│ ├── prior-art.md # Stage 3: List of relevant prior art
│ ├── prior-art-report.md # Stage 3: Novelty analysis report
│ ├── portfolio-initial.json # Stage 4: Initial patent portfolio scheme
│ ├── portfolio-initial.md # Stage 4: Report on initial patent portfolio scheme generation
│ ├── portfolio-v2.json # Stage 4: Optimized patent portfolio
│ └── disclosure-v2.md # Stage 5: Consolidated final invention disclosure
├── claim-optimization/ # Stage 4: Game play records
│ ├── R1.json ~ R6.json # Details of six rounds of attack and defense
│ └── claim-optimization.html # Optimization process visualization report (HTML)
├── patents/ # Individual patent application folders
│ ├── {Patent Title A}/
│ │ ├── disclosure_{Patent Title A}.md # Stage 5: Independent invention disclosure
│ │ ├── flowcharts_{Patent Title A}.md # Stage 5: Mermaid drawings
│ │ ├── claims_{Patent Title A}.md # Stage 6: Claims
│ │ ├── specification_{Patent Title A}.md # Stage 7: Specification
│ │ └── abstract_{Patent Title A}.md # Stage 7: Abstract
│ ├── {Patent Title B}/
│ │ └── ... # (Structure same as above)
├── prior art/ # Raw data from novelty search results
└── project files/ # Stage 1: Project file parsing artifacts
Script Tools
| Script | Function | Purpose |
|---|---|---|
analyze_project.py | Analyze project source code and documentation, extract technical solutions, detect sensitive information | Stage 1 |
prior_search.py | Patent database search and novelty analysis (supports CNKI/FPO/WebSearch) | Stage 3 |
generate_optimization_html.py | Generate optimization report for the six-round adversarial game play (HTML visualization) | Stage 4 |
claim.py | Convert claim tree to claims text, format validation | |
yaml_to_json.py | Convert YAML format to JSON (used for generating JSON files) | |
file_tools.py | File read/write, JSON format validation and automatic repair | General utilities |
config.py | Global configuration (output directory, indentation, etc.) | General configuration |
network_tools.py | Network request tools | General utilities |