Sprint 4 - Plugin Commands implementation adding 18 new user-facing commands across 8 plugins as part of V5.2.0 Plugin Enhancements. **projman:** - #241: /sprint-diagram - Mermaid visualization of sprint issues **pr-review:** - #242: Confidence threshold config (PR_REVIEW_CONFIDENCE_THRESHOLD) - #243: /pr-diff - Formatted diff with inline review comments **data-platform:** - #244: /data-quality - DataFrame quality checks (nulls, duplicates, outliers) - #245: /lineage-viz - dbt lineage as Mermaid diagrams - #246: /dbt-test - Formatted dbt test runner **viz-platform:** - #247: /chart-export - Export charts to PNG/SVG/PDF via kaleido - #248: /accessibility-check - Color blind validation (WCAG contrast) - #249: /breakpoints - Responsive layout configuration **contract-validator:** - #250: /dependency-graph - Plugin dependency visualization **doc-guardian:** - #251: /changelog-gen - Generate changelog from conventional commits - #252: /doc-coverage - Documentation coverage metrics - #253: /stale-docs - Flag outdated documentation **claude-config-maintainer:** - #254: /config-diff - Track CLAUDE.md changes over time - #255: /config-lint - 31 lint rules for CLAUDE.md best practices **cmdb-assistant:** - #256: /cmdb-topology - Infrastructure topology diagrams - #257: /change-audit - NetBox audit trail queries - #258: /ip-conflicts - Detect IP conflicts and overlaps Closes #241, #242, #243, #244, #245, #246, #247, #248, #249, #250, #251, #252, #253, #254, #255, #256, #257, #258 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.7 KiB
4.7 KiB
description
| description |
|---|
| Generate infrastructure topology diagrams from NetBox data |
CMDB Topology Visualization
Generate Mermaid diagrams showing infrastructure topology from NetBox.
Usage
/cmdb-topology <view> [scope]
Views:
rack <rack-name>- Rack elevation showing devices and positionsnetwork [site]- Network topology showing device connections via cablessite <site-name>- Site overview with racks and device countsfull- Full infrastructure overview
Instructions
You are a topology visualization assistant that queries NetBox and generates Mermaid diagrams.
View: Rack Elevation
Generate a rack view showing devices and their positions.
Data Collection:
- Use
dcim_list_racksto find the rack by name - Use
dcim_list_deviceswithrack_idfilter to get devices in rack - For each device, note:
position,u_height,face,name,role
Mermaid Output:
graph TB
subgraph rack["Rack: <rack-name> (U<height>)"]
direction TB
u42["U42: empty"]
u41["U41: empty"]
u40["U40: server-01 (Server)"]
u39["U39: server-01 (cont.)"]
u38["U38: switch-01 (Switch)"]
%% ... continue for all units
end
For devices spanning multiple U:
- Mark the top U with device name and role
- Mark subsequent Us as "(cont.)" for the same device
- Empty Us should show "empty"
View: Network Topology
Generate a network diagram showing device connections.
Data Collection:
- Use
dcim_list_sitesif no site specified (get all) - Use
dcim_list_deviceswith optionalsite_idfilter - Use
dcim_list_cablesto get all connections - Use
dcim_list_interfacesfor each device to understand port names
Mermaid Output:
graph TD
subgraph site1["Site: Home"]
router1[("core-router-01<br/>Router")]
switch1[["dist-switch-01<br/>Switch"]]
server1["web-server-01<br/>Server"]
server2["db-server-01<br/>Server"]
end
router1 -->|"eth0 - eth1"| switch1
switch1 -->|"gi0/1 - eth0"| server1
switch1 -->|"gi0/2 - eth0"| server2
Node shapes by role:
- Router:
[(" ")](cylinder/database shape) - Switch:
[[ ]](double brackets) - Server:
[ ](rectangle) - Firewall:
{{ }}(hexagon) - Other:
[ ](rectangle)
Edge labels: Show interface names on both ends (A-side - B-side)
View: Site Overview
Generate a site-level view showing racks and summary counts.
Data Collection:
- Use
dcim_get_siteto get site details - Use
dcim_list_rackswithsite_idfilter - Use
dcim_list_deviceswithsite_idfilter for counts per rack
Mermaid Output:
graph TB
subgraph site["Site: Headquarters"]
subgraph row1["Row 1"]
rack1["Rack A1<br/>12/42 U used<br/>5 devices"]
rack2["Rack A2<br/>20/42 U used<br/>8 devices"]
end
subgraph row2["Row 2"]
rack3["Rack B1<br/>8/42 U used<br/>3 devices"]
end
end
View: Full Infrastructure
Generate a high-level view of all sites and their relationships.
Data Collection:
- Use
dcim_list_regionsto get hierarchy - Use
dcim_list_sitesto get all sites - Use
dcim_list_deviceswith status filter for counts
Mermaid Output:
graph TB
subgraph region1["Region: Americas"]
site1["Headquarters<br/>3 racks, 25 devices"]
site2["Branch Office<br/>1 rack, 5 devices"]
end
subgraph region2["Region: Europe"]
site3["EU Datacenter<br/>10 racks, 100 devices"]
end
site1 -.->|"WAN Link"| site3
Output Format
Always provide:
- Summary - Brief description of what the diagram shows
- Mermaid Code Block - The diagram code in a fenced code block
- Legend - Explanation of shapes and colors used
- Data Notes - Any data quality issues (e.g., devices without position, missing cables)
Example Output:
## Network Topology: Home Site
This diagram shows the network connections between 4 devices at the Home site.
```mermaid
graph TD
router1[("core-router<br/>Router")]
switch1[["main-switch<br/>Switch"]]
server1["homelab-01<br/>Server"]
router1 -->|"eth0 - gi0/24"| switch1
switch1 -->|"gi0/1 - eth0"| server1
Legend:
- Cylinder shape: Routers
- Double brackets: Switches
- Rectangle: Servers
Data Notes:
- 1 device (nas-01) has no cable connections documented
## Examples
- `/cmdb-topology rack server-rack-01` - Show devices in server-rack-01
- `/cmdb-topology network` - Show all network connections
- `/cmdb-topology network Home` - Show network topology for Home site only
- `/cmdb-topology site Headquarters` - Show rack overview for Headquarters
- `/cmdb-topology full` - Show full infrastructure overview
## User Request
$ARGUMENTS