Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By ScottDuncanAIv0.1.0MIT
Turns P&ID and PFD drawings, digital or scanned PDFs, into a knowledge graph of flow connectivity, instrument locations and control loops. Outputs JSON, DuckDB and an LLM-ready summary. Python 3.12 is best; OCR and auto-orientation are skipped on 3.13 and later.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
p&id, pid-to-kg, process-engineering, knowledge-graph, dexpi, isa-5-1, pdf-extraction, chemical-engineering ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By Scott Duncan. Reach me on LinkedIn or at scottduncanai.com.
Turn P&ID drawings into a process knowledge graph that an LLM can reason over.
pid-to-kg is a Claude skill that reads piping and instrumentation diagrams (P&IDs) and PFDs from PDF and builds a knowledge graph of the process. The PDFs can be digital (exported from CAD) or scanned. The graph captures:
The output is meant to be one layer of a chemical-manufacturing context layer. An LLM application can query it to answer questions such as "what feeds this clarifier?", "which transmitters sit downstream of P-101?" or "what does FIC-0502 manipulate?" from the drawings themselves.
No programming is needed. You need Claude Code (the desktop app or the terminal version) and Python 3.10 or newer. Python 3.12 is the best choice: on 3.13 and later the skill still works, but without the text-recognition (OCR) cross-check and automatic page orientation.
1. Download the skill. On this page, click the green Code button, then Download ZIP. Unzip the file.
2. Install it. In the unzipped folder, open skills and copy the pid-to-kg folder into your personal Claude skills folder:
| System | Skills folder |
|---|---|
| Windows | C:\Users\<your user name>\.claude\skills\ |
| macOS | /Users/<your user name>/.claude/skills/ |
If the skills folder doesn't exist yet, create it. The .claude folder is hidden by default: in Windows File Explorer use View → Show → Hidden items, and in macOS Finder press Cmd + Shift + . to show it.
3. Add your P&IDs. Make a new folder for the project and put your P&ID PDF in it. Open that folder in Claude Code: in the desktop app, start a new Code session and choose the folder.
No P&IDs at hand? My public chemical manufacturing datasets repo lists public P&ID sets from real permitted facilities, with the page numbers where the drawings are. Both digital and scanned sets are included.
4. Ask Claude to convert them. For example:
Convert
haile.pdfinto a knowledge graph. The P&IDs are on pages 47–60.
The skill loads by itself; there is no need to name it. The first time, Claude installs the Python packages it needs, and it asks your permission before running commands. It then reads every sheet in detail, so a large drawing set takes a while. Claude may ask a question along the way, such as which revision to use when a PDF holds two versions of the same drawing. When it is done, it reports what it found and what remains uncertain.
5. Check the graph by asking questions. The best test is to ask about things you can verify on the drawings:
Name all the equipment upstream of the clarifier.
What sensor measures the flow into TK-101, and where exactly is it?
What does FIC-0502 control, and what valve does it move?
The results are saved in work/<plant name>/kg/ inside your project folder. summary.md is a readable overview of the whole plant, and qa_report.md lists anything Claude could not confirm.
Claude reads the drawings; Python scripts do everything else. Recognising symbols and tracing lines needs visual judgement, so that part is Claude's. Preparing pages, building the graph and checking it are routine, so tested scripts do them the same way every time.
A script first looks at every page and works out what kind of drawing it is. Digital and scanned P&IDs need different handling:
7-day copy clicks
Plugins from other owners that cover similar ground
Generated from the plugin's indexed repository (scottduncanai/pid-to-knowledge-graph) — no native marketplace selected
npx claudepluginhub p/scottduncanai-pid-to-kgBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.