Generate patent-style technical diagrams (flowcharts, block diagrams, system architectures) with automatic reference numbering.
Generates patent-style technical diagrams (flowcharts, block diagrams) with automatic reference numbering for USPTO submissions. Use when you need to visualize system architectures, method claims, or technical processes for patent applications.
/plugin marketplace add RobThePCGuy/Claude-Patent-Creator/plugin install robthepcguy-claude-patent-creator-standalone@RobThePCGuy/Claude-Patent-CreatorThis skill inherits all available tools. When active, it can use any tool Claude has access to.
diagram_skill.pyGenerate professional patent-style technical diagrams using Graphviz.
Capabilities:
Output: SVG (Scalable Vector Graphics) for USPTO submissions
create_flowchartInputs:
steps (List[str], required): Ordered list of step descriptionsOutputs:
{
"success": bool,
"svg_path": str, # Absolute path to SVG
"filename": str,
"message": str
}
Example:
steps = [
"Receive input data from sensor",
"Validate data format",
"Process data using algorithm",
"Generate output signal",
"Transmit result to display"
]
result = create_flowchart(steps)
create_block_diagramInputs:
blocks (List[dict], required): Component definitions
id (str, required): Unique identifierlabel (str, required): Display text (use \n for multiline)type (str, optional): Block type ("input", "output", "process", "storage", "decision", "default")connections (List[dict], required): Connection definitions
from_id (str, required): Source block IDto_id (str, required): Target block IDlabel (str, optional): Connection labelExample:
blocks = [
{"id": "sensor", "label": "Input\nSensor", "type": "input"},
{"id": "cpu", "label": "Processing\nUnit", "type": "process"},
{"id": "memory", "label": "Memory\nStorage", "type": "storage"},
{"id": "display", "label": "Output\nDisplay", "type": "output"}
]
connections = [
{"from_id": "sensor", "to_id": "cpu", "label": "raw data"},
{"from_id": "cpu", "to_id": "memory", "label": "store"},
{"from_id": "memory", "to_id": "cpu", "label": "retrieve"},
{"from_id": "cpu", "to_id": "display", "label": "results"}
]
result = create_block_diagram(blocks, connections)
render_diagramRender arbitrary Graphviz DOT code.
Inputs:
dot (str, required): Graphviz DOT codeExample:
dot_code = """
digraph CustomDiagram {
rankdir=TB;
node [shape=box, style=filled, fillcolor=lightblue];
A [label="Component A"];
B [label="Component B"];
C [label="Component C"];
A -> B [label="signal"];
B -> C [label="processed"];
C -> A [label="feedback"];
}
"""
result = render_diagram(dot_code)
add_diagram_referencesAdd patent-style reference numbers to existing SVG.
Inputs:
svg_path (str, required): Path to input SVGreference_map (dict, required): Element text -> reference number
Outputs:
{
"success": bool,
"svg_path": str, # NEW annotated SVG path
"original_path": str, # Original SVG preserved
"filename": str, # Ends with "_annotated.svg"
"references_added": int,
"message": str
}
Example:
reference_map = {
"Input Sensor": 10,
"Processing Unit": 20,
"Memory Storage": 30,
"Output Display": 40
}
result = add_diagram_references(
svg_path="C:/path/to/block_diagram.svg",
reference_map=reference_map
)
# Creates: "block_diagram_annotated.svg"
get_diagram_templatesRetrieve pre-built templates.
Outputs:
{
"success": bool,
"templates": {
"template_name": {
"name": str,
"description": str,
"dot_code": str
}
},
"template_names": List[str]
}
Available Templates:
simple_flowchart: Basic method flowsystem_block: System architecturemethod_steps: Patent method claims (101, 102, ...)component_hierarchy: Hierarchical treeExample:
result = get_diagram_templates()
template = result["templates"]["system_block"]
diagram = render_diagram(template["dot_code"])
Required: Graphviz as Python package AND system executable.
Check Installation:
check_graphviz_installed()
# Returns: {"ready": bool, "python_package": bool, "system_command": bool, "version": str, "message": str}
Install if Missing:
pip install graphvizwinget install graphvizbrew install graphvizsudo apt install graphvizOutput Directory: PROJECT_ROOT/diagrams/ (auto-created)
Filename Generation:
flowchart_YYYYMMDD_HHMMSS.svgblock_diagram_YYYYMMDD_HHMMSS.svgdiagram_YYYYMMDD_HHMMSS.svg{original_name}_annotated.svgFormat: All paths are absolute (e.g., C:/Users/<YOUR_USER>/Desktop/TEST1/diagrams/flowchart.svg)
| Type | Shape | Color | Typical Use |
|---|---|---|---|
input | invhouse | lightblue | Input devices, sensors |
output | house | lightgreen | Output devices, displays |
process | box | lightyellow | Processing units, algorithms |
storage | cylinder | lightgray | Memory, databases |
decision | diamond | lightcoral | Decision points, logic |
default | box | white | Generic components |
simple_flowchart or method_steps templatesystem_block template or custom create_block_diagramcomponent_hierarchy templaterender_diagram with full DOT controladd_diagram_references for patent-style numbering