infrahub-auditing-repo

Audits Infrahub repositories against schema, object, and Python rules to produce a compliance report.

9|2|Updated Aug 27, 2025
One-click install
npx skills add https://github.com/opsmill/infrahub-solution-ai-dc --skill infrahub-auditing-repo-opsmill
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infrahub-auditing-repo
Source: https://github.com/opsmill/infrahub-solution-ai-dc/tree/main/.agents/skills/infrahub-auditing-repo
Command: npx skills add https://github.com/opsmill/infrahub-solution-ai-dc --skill infrahub-auditing-repo-opsmill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Infrahub repositories can silently accumulate broken schema relationships, unregistered Python components, deprecated fields, and mismatched query names that only surface as runtime failures during sync or pipeline execution. This Skill runs a nine-phase audit that catches these issues before deployment and reports them with severity levels and concrete fixes. ## Core Features & Use Cases - Nine-phase audit procedure: Validates project structure, schemas, object data, Python checks/generators/transforms, cross-references, registration completeness, best practices, deployment readiness, and YAGNI cost-to-fix findings. - Structured severity-ranked report: Writes findings to AUDIT_REPORT.md organized by CRITICAL, HIGH, MEDIUM, LOW, and INFO severity, each with file location and suggested fix. - Deprecated field migration: Detects deprecated display_labels usage and generates the exact display_label Jinja2 replacement string. - Use Case: Before deploying an Infrahub repository or after a major refactor, run the audit to catch a generator missing allow_upsert=True, a relationship identifier mismatch, or an orphan check file that would otherwise fail silently in production. ## Quick Start Ask the assistant to audit this Infrahub repo and it will walk the nine phases and write the findings to AUDIT_REPORT.md.

Frequently Asked Questions about infrahub-auditing-repo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit an Infrahub repository for best practices?▼

Invoke the auditor by asking to audit the Infrahub repo. It walks nine phases covering project structure, schemas, objects, Python components, cross-references, registration, best practices, deployment readiness, and YAGNI findings, then writes a severity-ranked report to AUDIT_REPORT.md.

What does the Infrahub repo audit check in schema files?▼

It validates naming conventions for namespaces, nodes, attributes, and relationships, verifies relationship peers use full kinds and matching bidirectional identifiers, checks hierarchy and uniqueness constraints, and flags deprecated display_labels fields with exact display_label migration strings.

Can the audit detect unregistered checks or generators in .infrahub.yml?▼

Yes. The registration completeness phase finds orphan Python files containing InfrahubCheck, InfrahubGenerator, or InfrahubTransform subclasses that are not registered in .infrahub.yml, plus unreferenced .gql queries and Jinja2 templates.

When should I not use the Infrahub repo auditor?▼

Do not use it for creating schemas, writing checks or generators, querying live Infrahub data, or populating objects. It is a read-only compliance reviewer, not an authoring or data manipulation tool.

Why does my Infrahub generator fail on re-run and can the audit catch it?▼

Generators that call save() without allow_upsert=True succeed on first run but fail on subsequent runs with duplicate-key errors. The Python components phase flags missing allow_upsert=True as a CRITICAL finding before deployment.