Create patent-style technical diagrams including flowcharts, block diagrams, and system architectures using Graphviz with reference numbering
npx playbooks add skill robthepcguy/claude-patent-creator --skill patent-diagram-generator
> Windows PowerShell: replace a macOS/Linux Python invocation with & "$HOME\patent-creator-venv\Scripts\python.exe" and a CLI invocation with & "$HOME\patent-creator-venv\Scripts\patent-creator.exe". Keep script paths quoted. Python code blocks are Python source, not shell commands.
Create patent-style technical diagrams including flowcharts, block diagrams, and system architectures using Graphviz.
Invoke this skill when users ask to:
This skill requires Graphviz to be installed:
Windows:
choco install graphviz
Linux:
sudo apt install graphviz
Mac:
brew install graphviz
Python Package:
"$HOME/patent-creator-venv/bin/python" -m pip install graphviz # normally already installed
When this skill is invoked:
import os
import sys
sys.path.insert(0, os.environ.get('CLAUDE_PLUGIN_ROOT', '.'))
from mcp_server.diagram_generator import PatentDiagramGenerator
generator = PatentDiagramGenerator()
steps = [
{"id": "start", "label": "Start", "shape": "ellipse", "next": ["step1"]},
{"id": "step1", "label": "Initialize System", "shape": "box", "next": ["decision"]},
{"id": "decision", "label": "Is Valid?", "shape": "diamond", "next": ["step2", "error"]},
{"id": "step2", "label": "Process Data", "shape": "box", "next": ["end"]},
{"id": "error", "label": "Handle Error", "shape": "box", "next": ["end"]},
{"id": "end", "label": "End", "shape": "ellipse", "next": []}
]
diagram_path = generator.create_flowchart(
steps=steps,
filename="method_flowchart",
output_format="svg"
)
blocks = [
{"id": "input", "label": "Input\\nSensor", "type": "input"},
{"id": "cpu", "label": "Central\\nProcessor", "type": "process"},
{"id": "memory", "label": "Memory\\nStorage", "type": "storage"},
{"id": "output", "label": "Output\\nDisplay", "type": "output"}
]
connections = [
["input", "cpu", "raw data"],
["cpu", "memory", "store"],
["memory", "cpu", "retrieve"],
["cpu", "output", "processed data"]
]
diagram_path = generator.create_block_diagram(
blocks=blocks,
connections=connections,
filename="system_diagram",
output_format="svg"
)
dot_code = """
digraph PatentSystem {
rankdir=LR;
node [shape=box, style=rounded];
Input [label="User Input"];
Processor [label="Processing Unit"];
Output [label="Display"];
Input -> Processor [label="data"];
Processor -> Output [label="result"];
}
"""
diagram_path = generator.render_dot_diagram(
dot_code=dot_code,
filename="custom_diagram",
output_format="svg",
engine="dot"
)
# After creating a diagram, add patent-style reference numbers
reference_map = {
"User Input": 10,
"Processing Unit": 20,
"Display": 30
}
report = generator.add_reference_numbers(
svg_path=diagram_path,
reference_map=reference_map,
return_report=True
)
print(report) # Check num_references and unmatched_labels before reporting success.
Get common templates:
templates = generator.get_templates() # MCP tool: get_diagram_templates()
# Available templates:
# - simple_flowchart: Basic process flow
# - system_block: System architecture
# - method_steps: Sequential method
# - component_hierarchy: Hierarchical structure
ellipse: Start/End pointsbox: Process stepsdiamond: Decision pointsparallelogram: Input/Output operationscylinder: Database/Storageinput: Input devices/sensorsoutput: Output devices/displaysprocess: Processing unitsstorage: Memory/storagedecision: Control logicdefault: General componentsdot: Hierarchical (top-down/left-right)neato: Spring model layoutfdp: Force-directed layoutcirco: Circular layouttwopi: Radial layoutsvg: Scalable Vector Graphics (best for editing)png: Raster image (good for viewing)pdf: Portable Document Format (USPTO compatible)Convention:
Example labeling:
"Input Sensor (10)"
" - Detector Element (12)"
" - Signal Processor (14)"
"Central Unit (20)"
" - CPU Core (22)"
" - Cache (24)"
When creating diagrams:
"Creating a flowchart for the authentication method with 5 steps..."
Run Python code to create SVG/PNG/PDF
"Diagram created: <absolute path returned by the generator>"
Use the MCP result's path field or the Python method's returned Path; never construct a path from the plugin folder.
Reference Numbers:
- Input Module (10)
- Processing Unit (20)
- Output Interface (30)
If Graphviz is not installed:
dot -V"$HOME/patent-creator-venv/bin/python" -m pip show graphvizcheck_diagram_tools_status tool, then render a two-node diagram with render_diagramWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.