AI NewsDev toolsAnnouncement

A Claude skill reads plant piping diagrams into a graph

Scott Duncan published a free Claude skill that turns piping and instrumentation diagrams into a knowledge graph. The repo took 262 stars in six days.

AI News

Editorial3 min read

LinkedInX
A Claude skill reads plant piping diagrams into a graph

Why it mattersProcess engineers can ask questions about a plant drawing in plain English. The diagram becomes a graph a machine can read, not a picture a person has to decode.

Scott Duncan published a free Claude skill called PID-to-Knowledge-Graph. It reads piping and instrumentation diagrams, or P&IDs, from a PDF. It writes the plant as a machine-readable graph. The repo is MIT licensed. GitHub lists 262 stars and 53 forks six days after the first commit.

What a P&ID is, and what the skill does with it

A P&ID is the master drawing of an industrial plant. It shows every tank, pump, pipe, valve and sensor. Today a process engineer reads one by hand to answer a basic question. The skill reads the same drawing with Claude and writes the result in three files.

The first file is summary.md, a plain-text overview a person or another model can read. The second is graph.json, the full graph of equipment and connections. The third is graph.duckdb, a small database that lets an engineer run SQL on the plant. The README says the DuckDB file supports "recursive upstream and downstream searches".

What the graph records

The README names three groups of facts the skill captures. Process flow covers tanks, pumps, valves and pipe segments with their upstream and downstream links. Measurement covers instruments and the pipe or vessel they read. Control covers full loops from sensor to controller to final element, plus cascades and interlocks. Each item records which sheet of the drawing it came from.

Example queries

The README lists plain questions a user can ask Claude once the graph is built. "What feeds this clarifier?" is one example. "Which transmitters sit downstream of P-101?" is another. "What does FIC-0502 manipulate?" is a third. The DuckDB file turns the same questions into SQL, including recursive upstream and downstream searches across the plant.

How it handles scans

Most plants still have scanned paper drawings. The skill treats a digital PDF and a scan differently. A digital export is rendered "straight from the vector data, so lines stay sharp at any zoom", the README says. A scanned page is enlarged by up to 2.5 times. The contrast is then raised, "so faded lines and small text stand out". Claude does the visual reading. A small Python script builds and checks the graph.

What it will miss

The README is clear about the gaps. Low-resolution scans lose small text. The skill records unreadable items as such, and does not guess them. A line whose flow direction is not drawn is marked flow_direction: inferred in the graph. Control logic that only lives in a narrative or a cause-and-effect chart is not captured. The skill writes a QA report with every run. An engineer can review the uncertain items before the graph is used for plant work.

What you need to run it

The README says a reader needs no programming. Two things are required: Claude Code, and Python 3.10 or newer. The skill is installed by copying the pid-to-kg folder into the .claude/skills/ directory. The author is Scott Duncan. He publishes at scottduncanai.com and on LinkedIn.

What is new here

A Claude skill that reads a domain-specific document into a graph is not a new idea on its own. A free MIT one aimed at process engineers is less common. PID-to-Knowledge-Graph only reads the drawing. It does not edit it. An engineer who wants to try it today pays only their Claude subscription. A licensed engineer still has to approve any change that reaches the field.

Source

SourceGitHub

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project