Installation & Setup
Infrahub Skills can be installed into any AI tool that supports skills or custom context files. Installation takes one command for most setups — install into a specific Infrahub repository to work in that project, or install globally to use the skills across all your projects.
Prerequisites
- AI coding assistant — any tool that supports the Agent Skills format or reads custom context files: Claude Code, GitHub Copilot, Cursor, Windsurf, Amp, Cline, Codex, and others
- Infrahub instance — version 1.7 or later (earlier versions may work but are not tested). See the Infrahub installation docs for setup instructions
- infrahubctl — required for loading generated schemas, objects, and running generators. See the infrahubctl docs
- Infrahub MCP server (optional) — required only for the Data Analyzer skill, beneficial but not required for other skills. See the MCP server docs
Installation
- npx (Recommended)
- Claude Code Plugin
- Manual Copy
The npx installer detects which AI tools you have configured and installs the skills in the correct format for each one automatically.
npx skills add opsmill/infrahub-skills
The installer determines whether to install the skills in the current project directory or globally. If installing per-project, run the command from your Infrahub project root.
Install from the Claude Code plugin marketplace for a global installation that works across all Infrahub projects:
/plugin marketplace add opsmill/claude-marketplace
/plugin install infrahub@opsmill
The plugin auto-detects Infrahub projects on session start by looking for .infrahub.yml, infrahub.toml, or schema file markers in the project directory.
For any tool that reads files from the project directory:
git clone https://github.com/opsmill/infrahub-skills.git
cp -r infrahub-skills/skills /path/to/your-project/
rm -rf infrahub-skills
Always include skills/infrahub-common/ — it contains shared references that all skills depend on. Omitting it will cause skills to produce incomplete or incorrect output.
Tool-specific configuration
After installing via npx or manual copy, some tools benefit from a small configuration file to activate the skills more reliably. These tools will use the skills without these files, but adding them improves consistency.
GitHub Copilot
Create .github/instructions/infrahub.instructions.md in your project root:
---
applyTo: "**"
---
Use the skills in the `skills/` directory when working on Infrahub schemas,
objects, checks, generators, transforms, or menus. Each skill's SKILL.md
file describes when and how to use it.
Cursor
Create .cursor/rules/infrahub.mdc in your project root:
---
description: Infrahub development skills for schemas, objects, checks, generators, transforms, and menus
globs: "**/*.{yml,yaml,py,gql,j2}"
alwaysApply: false
---
Use the skills in the `skills/` directory when working on Infrahub resources.
Each skill's SKILL.md file describes when and how to use it.