From infrahub
Audits an Infrahub repository against best practices and rules, producing a structured compliance report covering schemas, objects, checks, generators, transforms, menus, and deployment readiness.
How this skill is triggered — by the user, by Claude, or both
Slash command
/infrahub:infrahub-auditing-repo [focus-area][focus-area]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive audit of an Infrahub repository against
audit-procedure.mdexamples.mdrules/_sections.mdrules/_template.mdrules/artifact-target-inheritance.mdrules/deployment-readiness.mdrules/objects-format.mdrules/practices-schema.mdrules/python-classes.mdrules/registration-completeness.mdrules/schema-display-labels-deprecated.mdrules/schema-file-object-misuse.mdrules/schema-naming.mdrules/schema-relationships.mdrules/structure-infrahub-yml.mdrules/xref-query-names.mdComprehensive audit of an Infrahub repository against
all rules and best practices from the infrahub-skills
plugin. Produces a structured report covering schemas,
objects, checks, generators, transforms, menus,
.infrahub.yml configuration, and deployment readiness.
Project structure:
!find . -maxdepth 2 -type f \( -name "*.yml" -o -name "*.yaml" -o -name "*.py" -o -name "*.gql" -o -name "*.j2" \) 2>/dev/null | head -40
Infrahub config:
!cat .infrahub.yml 2>/dev/null || echo "No .infrahub.yml found"
When invoked, the auditor:
.infrahub.yml, schemas, objects, checks,
generators, transforms, menus).infrahub.yml)The phased procedure that ties these steps together lives in audit-procedure.md — read that file when running an audit. It defines the eight phases (project structure → schema → objects → Python components → cross-references → registration → best practices → deployment) and the per-finding severity levels used in the final report.
| Priority | Category | What It Checks |
|---|---|---|
| CRITICAL | Project Structure | .infrahub.yml exists, paths valid |
| CRITICAL | Schema Validation | Naming, relationships, deprecated fields |
| CRITICAL | Object Validation | YAML structure, value types, refs |
| CRITICAL | Python Components | Class inheritance, required methods |
| HIGH | Cross-References | Query names match, target groups |
| HIGH | Relationships | Bidirectional IDs, cardinality |
| HIGH | Registration | All files registered, no orphans |
| MEDIUM | Best Practices | human_friendly_id, display_label |
| MEDIUM | Deployment | Git status, bootstrap placement |
| LOW | Patterns & Style | Code organization, naming |
Tell Claude: "Audit this Infrahub repo" or "Run the Infrahub repo auditor"
The auditor will scan the current working directory, walk the phases defined in audit-procedure.md, and produce the report described below.
The report is written to AUDIT_REPORT.md in the project root with this structure:
# Infrahub Repository Audit Report
## Summary
- Total findings: N
- Critical: N | High: N | Medium: N | Low: N | Info: N
## Project Structure
...
## Schema Audit
...
## Object Data Audit
...
## Checks Audit
...
## Generators Audit
...
## Transforms Audit
...
## Menus Audit
...
## Cross-Reference Integrity
...
## Deployment Readiness
...
The auditor checks rules from all skills:
.infrahub.yml reference, GraphQLnpx claudepluginhub opsmill/claude-marketplace --plugin infrahubAudits a repository to map its real stack, conventions, assets, tests, docs, risks, and integration points. Persists results in reusable markdown to reduce re-reading and save tokens. Also calculates a harnessability score (0-100) to assess how well the codebase supports autonomous agent work.
Audits a repository for baseline compliance across 9 categories including code quality, security, CI/CD, testing, and documentation. Emits Markdown report and JSON sidecar.
Guides creation of Infrahub check definitions: Python validation classes, GraphQL queries, and YAML-driven tests for proposed change pipelines.