/network-ops:network-diagramfrom network-ops
Generates editable draw.io network diagrams from saved network-snapshot data (CDP, LLDP, interface addresses, VLANs, trunks, port-channels) and/or a spreadsheet of links.
Ships in network-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You run a bundled script, then explain its report. The script never touches a device: it reads
the snapshot repo network-snapshot keeps (the one the user chose on first use), and any
spreadsheet of links the user gives. It writes one draw.io file with three pages, an SVG preview of the Physical
page, a Markdown and a JSON report, and a links CSV into <repo>/diagrams, and commits them there.
Files in this skill's folder:
scripts/diagram.py: the engine (run, tag).scripts/preview.py: draws the Physical (L1) page as one SVG for the chat.scripts/drawio.py: draws the pages. Parsers and link finding live in the plugin's shared
library (lib/topology, lib/devicetags), shared with the other network-ops skills.inventory.yaml yourself. The tag command shows a role change; it is written
only with --write, after the user approved that exact change.python <skill folder>/scripts/diagram.py run [--network NAME | --repo PATH] [--links links.csv ...]
[--site SITE] [--no-subnet] [--out DIR] [--no-export] [--no-commit] [--title TEXT] [--open]
Snapshot repo: with no --network or --repo, the one network-snapshot uses (same settings).
The run prints Snapshot repo: <path> (network: <name>) on stderr and repo in the report;
tell the user where the diagram went. If it exits with "error": "no_snapshot_repo", none is
set up yet: follow network-snapshot's first-time setup (ask the user where to keep it, then
snapshot.py --set-repo PATH), and run this again.
--links: a CSV of links, repeatable. Columns device, port, port, device (header row
optional); with a header, the columns description, vlan, speed and site are read too.
Common header names (hostname, local interface, remote hostname, remote port, neighbor, a-end,
z-end) are matched; the report's spreadsheets shows the mapping used. A sheet whose four link
columns can't be mapped exits 2 with "error": "bad_spreadsheet" and writes nothing.
With no snapshot repo set up, a spreadsheet alone is enough (--out then picks the folder).
Any other sheet (other columns, .xlsx, a pasted table, or a bad_spreadsheet error): write
a new CSV with the header device_a,port_a,port_b,device_b (plus description, vlan,
speed, site when the sheet has them), show the user which of their columns went where,
then pass the new file to --links. Never edit the user's original file.
--no-subnet: neighbor and spreadsheet links only. Shows what CDP/LLDP alone miss.
PDF and .drawio.svg copies are made when draw.io Desktop is installed; otherwise the report
says so. The .drawio file needs nothing installed: app.diagrams.net, File > Open from > Device.
--open: once every file is written, shows the diagram: in draw.io Desktop when installed,
else in the default browser at app.diagrams.net with the diagram packed into the link (after
#, so it never reaches draw.io's server). A diagram too big for a link isn't opened; the
report says to use File > Open from > Device or install draw.io Desktop. Never pass it on your
own: after an interactive run, ask "Open it in draw.io?" and run the same command plus --open
only if the user says yes. A run without --open never opens anything.
The script prints a JSON report (also <out>/report.json): links_by_kind, spreadsheets, subnet_links,
port_channels, roles, roles_to_confirm, roles_missing, unlinked_devices,
unknown_neighbors, spanning_tree (roots, blocked_ports, not_read), routing
(adjacencies, not_up, unplaced), coverage_gaps, files, exports, opened (how: desktop, browser
or null, and why), git. files.preview is the Physical (L1) preview SVG.
Link kinds (CONTEXT.md): a neighbor link is one a device reported by CDP or LLDP (solid blue). A subnet link is two interfaces sharing a /30 or /31 that no neighbor protocol saw (red dashed), a tunnel the same over tunnel interfaces (purple dashed). Spreadsheet links are green. Firewalls and tunnels usually show up only as subnet links: say so, it's expected.
files.preview and pass the SVG text,
unchanged, to the client's inline visual tool (for example Claude desktop's visual or widget
tool). Without one, show the mermaid block from report.md, or give the SVG's path. Say in
one line: "The Physical (L1) page; the .drawio file has all three pages." Never redraw it yourself.
Verified in Claude desktop on 2026-12-01: the preview draws inline in the chat.subnet_links): which devices only appear through
shared addresses, and that turning on LLDP where the device supports it would confirm them.spanning_tree.roots) and
any blocked ports, which on a redundant design are expected, not a fault. Routing: every
adjacency in routing.not_up first, with its state; then the count of adjacencies up. Say it
is network state at snapshot time, never the design intent.spanning_tree.not_read or a protocol configured with no neighbor output is a gap:
never fill it in from the neighbors.--write:
python <skill folder>/scripts/diagram.py tag --device NAME --role ROLE [--network NAME | --repo PATH] [--write]
Roles are shared with every network-ops skill: a device is described once (docs/adr/0002).--open, ask "Open it in draw.io?" (interactive runs only). With it,
say how it opened (opened.how); for browser, that the diagram stays in their browser and
edits there aren't saved to the file. If how is null, give opened.why.Run it right after the scheduled network-snapshot, so the diagram in git is always as current as
the last snapshot. A scheduled run never prompts, so it names the same network (or folder) as the
snapshot job: --network NAME or --repo PATH, never the default, which can change. The user
adds it to their own scheduler; show them the line, never install it:
15 6 * * * python3 <skill folder>/scripts/diagram.py run --network NAMEschtasks /Create /SC DAILY /ST 06:15 /TN network-diagram /TR "py <skill folder>\scripts\diagram.py run --network NAME"A scheduled run never changes the inventory: guessed roles are only listed in the report. It
never uses --open either: nobody is there to look, and it would start an app or browser on the
machine every day. Leave it out of the scheduled line.
Neighbor links read Cisco CDP and LLDP (IOS, IOS-XE, NX-OS) and Arista-style LLDP. Addresses come
from Cisco configs and FortiOS. VLANs, trunks, port-channels and spanning tree: Cisco IOS/IOS-XE.
OSPF and BGP: Cisco IOS/IOS-XE and FortiOS; EIGRP: Cisco IOS/IOS-XE. Lab-tested: spanning tree,
OSPF and eBGP on Cisco IOS (IOL), OSPF on FortiGate-VM. EIGRP and FortiOS BGP peers are read from
the vendors' documented output but untested. Other
platforms' devices are still drawn, with their missing pieces listed as coverage gaps. To add
one, add its parser to lib/topology/parsers.py and a test with real (redacted) output.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gtalkstech/netops-skills --plugin network-ops4 skills in this plugin
/network-health-checkRead-only, multi-vendor network health check for the whole network, one site or one device. Checks hardware, redundancy, routing, links, errors, spanning tree, CPU, logs and time, and writes a report with findings worst first and their evidence. Use for "health check", "is the network ok", "anything wrong at hq", or "is <device> healthy"./network-pushUse when an approved change plan is ready to go onto network devices: pushing config to a switch, router or firewall, applying a change, or saving config after a post-check. Puts every switch command in the approval prompt itself, pushes one device at a time with the change account (descriptions can batch), stops on errors and records what was sent./network-snapshotTakes a read-only snapshot of every network device over SSH (configs, routing in every VRF, neighbors, ARP and MAC tables), commits the stable part to git, builds a host table of where each IP and MAC sits, and explains what changed. Multi-vendor (Cisco, FortiGate and others). Use when the user asks to snapshot, back up or document the network, asks what changed on the network, wants a before/after around a change, or asks where a host is connected.Other plugins' skills for the same job