Overview
Expert guidance for interactive data analysis
against a live Infrahub instance. This skill uses
the Infrahub MCP server to query, correlate,
and reason over infrastructure data on demand —
answering operational questions that span multiple
node types and relationships.
Use this skill for any question of the form
"what does Infrahub currently know about X,
and how does it relate to Y?"
Typical question patterns:
- Compliance — "Are all devices following
the naming convention?"
- Service impact — "Which services are hosted
on devices in this rack?"
- Maintenance windows — "Which devices are
currently in a maintenance window, and what
depends on them?"
- Drift detection — "Which realized devices
differ from their topology design?"
- Capacity — "Which racks are over 80% full?"
- Change impact — "What BGP sessions, services,
and IPs depend on this prefix?"
- Inventory gaps — "Which devices have no
platform or OS version recorded?"
For automated, pipeline-enforced checks that
block proposed changes, see
../infrahub-check-creator/SKILL.md.
For repeatable scheduled reports exported as
artifacts, see ../infrahub-transform-creator/SKILL.md.
When to Use
- Answering operational questions interactively
via natural language
- Cross-referencing two or more node types to find
relationships or gaps
- Investigating the blast radius of a change before
executing it
- Auditing data quality across the inventory
- Producing one-time or on-demand reports for
stakeholders
- Exploring schema structure and data before writing
a generator or check
How It Works
The Infrahub MCP server exposes tools that let
Claude query Infrahub data directly.
The typical workflow:
- Query — use MCP tools to fetch current state
from Infrahub
- Correlate — join, diff, or filter the data
against a policy or second dataset
- Reason — identify gaps, anomalies, or
relationships
- Report — surface findings with context and
remediation hints
Rule Categories
| Priority |
Category |
Prefix |
Description |
| CRITICAL |
MCP Tools |
mcp- |
Available Infrahub MCP tools, invocation patterns, response structure |
| CRITICAL |
Query Patterns |
query- |
GraphQL structures for fetching, filtering, and traversing relationships |
| HIGH |
Correlation |
correlation- |
Joining, diffing, and reasoning over data from multiple queries |
| HIGH |
Reporting Output |
reporting- |
Presenting findings: summaries, tables, per-object detail, remediation hints |
| MEDIUM |
Approach Selection |
approach- |
When to use MCP analysis vs InfrahubCheck vs Transform |
MCP Server Basics
When the Infrahub MCP server is connected, Claude
can call tools such as:
mcp__infrahub__infrahub_query — Execute a
GraphQL query (primary tool)
mcp__infrahub__infrahub_list_schema — List
available node kinds
mcp__infrahub__infrahub_get — Retrieve a
specific object by ID or filters
mcp__infrahub__infrahub_create — Create an
object (remediation, on a branch)
mcp__infrahub__infrahub_update — Update an
object (remediation, on a branch)
# Example: find all devices in an active
# maintenance window
query MaintenanceDevices {
MaintenanceWindow(status__value: "active") {
edges {
node {
name { value }
start_time { value }
end_time { value }
devices {
edges {
node {
name { value }
role { value }
site {
node { name { value } }
}
}
}
}
}
}
}
}
Typical Analysis Workflow
1. Understand the question
→ "Which services depend on devices currently
in a maintenance window?"
2. Identify the node types involved
→ MaintenanceWindow, DcimDevice, Service
(or equivalent in your schema)
3. Query current state
→ mcp__infrahub__infrahub_query — one query
per node type, or combined
4. Correlate the data
→ Join across node types, filter, count, diff
5. Report findings
→ Summarize with counts, list affected objects,
suggest next steps
Supporting References
1---2name: infrahub-analyst3description: Analyze and correlate Infrahub data using the MCP server. Use when querying live infrastructure data to answer operational questions, detect drift, correlate node types, investigate service impact, check maintenance windows, or produce ad-hoc reports — without writing pipeline code.4---56## Overview78Expert guidance for interactive data analysis9against a live Infrahub instance. This skill uses10the **Infrahub MCP server** to query, correlate,11and reason over infrastructure data on demand —12answering operational questions that span multiple13node types and relationships.1415Use this skill for any question of the form16*"what does Infrahub currently know about X,17and how does it relate to Y?"*1819Typical question patterns:2021- **Compliance** — "Are all devices following22 the naming convention?"23- **Service impact** — "Which services are hosted24 on devices in this rack?"25- **Maintenance windows** — "Which devices are26 currently in a maintenance window, and what27 depends on them?"28- **Drift detection** — "Which realized devices29 differ from their topology design?"30- **Capacity** — "Which racks are over 80% full?"31- **Change impact** — "What BGP sessions, services,32 and IPs depend on this prefix?"33- **Inventory gaps** — "Which devices have no34 platform or OS version recorded?"3536For **automated, pipeline-enforced** checks that37block proposed changes, see38`../infrahub-check-creator/SKILL.md`.39For **repeatable scheduled reports** exported as40artifacts, see `../infrahub-transform-creator/SKILL.md`.4142## When to Use4344- Answering operational questions interactively45 via natural language46- Cross-referencing two or more node types to find47 relationships or gaps48- Investigating the blast radius of a change before49 executing it50- Auditing data quality across the inventory51- Producing one-time or on-demand reports for52 stakeholders53- Exploring schema structure and data before writing54 a generator or check5556## How It Works5758The Infrahub MCP server exposes tools that let59Claude query Infrahub data directly.60The typical workflow:61621. **Query** — use MCP tools to fetch current state63 from Infrahub642. **Correlate** — join, diff, or filter the data65 against a policy or second dataset663. **Reason** — identify gaps, anomalies, or67 relationships684. **Report** — surface findings with context and69 remediation hints7071## Rule Categories7273| Priority | Category | Prefix | Description |74| -------- | -------- | ------ | ----------- |75| CRITICAL | MCP Tools | `mcp-` | Available Infrahub MCP tools, invocation patterns, response structure |76| CRITICAL | Query Patterns | `query-` | GraphQL structures for fetching, filtering, and traversing relationships |77| HIGH | Correlation | `correlation-` | Joining, diffing, and reasoning over data from multiple queries |78| HIGH | Reporting Output | `reporting-` | Presenting findings: summaries, tables, per-object detail, remediation hints |79| MEDIUM | Approach Selection | `approach-` | When to use MCP analysis vs InfrahubCheck vs Transform |8081## MCP Server Basics8283When the Infrahub MCP server is connected, Claude84can call tools such as:8586- **`mcp__infrahub__infrahub_query`** — Execute a87 GraphQL query (primary tool)88- **`mcp__infrahub__infrahub_list_schema`** — List89 available node kinds90- **`mcp__infrahub__infrahub_get`** — Retrieve a91 specific object by ID or filters92- **`mcp__infrahub__infrahub_create`** — Create an93 object (remediation, on a branch)94- **`mcp__infrahub__infrahub_update`** — Update an95 object (remediation, on a branch)9697```graphql98# Example: find all devices in an active99# maintenance window100query MaintenanceDevices {101 MaintenanceWindow(status__value: "active") {102 edges {103 node {104 name { value }105 start_time { value }106 end_time { value }107 devices {108 edges {109 node {110 name { value }111 role { value }112 site {113 node { name { value } }114 }115 }116 }117 }118 }119 }120 }121}122```123124## Typical Analysis Workflow125126```text1271. Understand the question128 → "Which services depend on devices currently129 in a maintenance window?"1301312. Identify the node types involved132 → MaintenanceWindow, DcimDevice, Service133 (or equivalent in your schema)1341353. Query current state136 → mcp__infrahub__infrahub_query — one query137 per node type, or combined1381394. Correlate the data140 → Join across node types, filter, count, diff1411425. Report findings143 → Summarize with counts, list affected objects,144 suggest next steps145```146147## Supporting References148149- **[examples.md](./examples.md)** — Analysis150 patterns (naming, VLAN, BGP, maintenance,151 service impact)152- **[../infrahub-common/graphql-queries.md](../infrahub-common/graphql-queries.md)**153 — GraphQL query writing reference154- **[../infrahub-common/infrahub-yml-reference.md](../infrahub-common/infrahub-yml-reference.md)**155 — .infrahub.yml project configuration156- **[../infrahub-check-creator/SKILL.md](../infrahub-check-creator/SKILL.md)**157 — Automated pipeline checks (for enforcement)158- **[../infrahub-transform-creator/SKILL.md](../infrahub-transform-creator/SKILL.md)**159 — Transforms for scheduled report artifacts160- **[rules/](./rules/)** — Individual rules organized161 by category prefix