AI Agent Skills
Most AI coding agents can write infrastructure code, but they have no idea what it costs or whether it complies with your organization's policies. Infracost AI Agent Skills fix that by connecting your agent to real-time pricing data and your organization's FinOps and tagging policies at prompt time. The result: agents that can audit existing infrastructure for cost and compliance issues, optimize resources to fit a budget, and generate new IaC that is correctly tagged, policy-compliant, and within budget on the first attempt.
For IT and security teams: if you manage Windows endpoints and need network rules, AV/EDR exclusions, or architecture details for review, see the Windows Enterprise IT Guide.
How it works
When you ask your agent a question about your infrastructure, the Infracost skill connects to Infracost Cloud to retrieve real pricing data and your organization's policy configuration. It reads your local IaC files — Terraform, Terragrunt, or CloudFormation — and combines that with live pricing and policy data to answer questions, surface violations, suggest fixes, and generate compliant new resources.
The skill is context-aware. It reads your organization's specific tag requirements, FinOps policies, and cost guardrails from Infracost Cloud — configured once, centrally, and propagated automatically to every AI coding session across your entire engineering organization. When a policy changes, every agent session reflects it instantly, with no action required from individual engineers. When it finds a violation, it can fix it. When it generates new infrastructure, it applies your policies from the start rather than flagging violations after the fact.
Supported IaC languages are Terraform, Terragrunt, and CloudFormation. Supported cloud providers are AWS, GCP, and Azure.
Available skills
The Infracost plugin installs the following skills into your agent:
| Skill | Description |
|---|---|
scan | Analyze an IaC project to estimate cloud costs, identify savings opportunities, and flag FinOps policy and tagging violations. |
iac-generation | Generate new IaC that is cost-optimised and compliant with your organization's FinOps and tagging policies from the first draft. |
price-lookup | Look up cloud resource pricing by generating sample Terraform and running Infracost — no existing IaC required. |
install-lsp | Install or update the Infracost Language Server. |
Before you begin
✅ You have a free Infracost account. Sign up at dashboard.infracost.io — no credit card required.
✅ You have a supported AI coding agent installed (see installation options below).
1. Install the skill
Claude Code
Ensure you have the Claude Code CLI installed. Then from your terminal, run the following two commands to add the Infracost marketplace and install the plugin:
claude plugin marketplace add infracost/agent-skills
claude plugin install infracost@infracost
Then quit and restart Claude Code for the changes to take effect.
On your next IaC task, the skill will prompt you to install any required dependencies (including the Infracost CLI) and authenticate with your Infracost account if needed. Your API key is configured automatically during that flow.
Once installed, skills are available as /infracost:<skill> slash commands, and are also invoked automatically when you ask relevant questions about your infrastructure.
GitHub Copilot
Copilot CLI
- Add the Infracost marketplace and install the plugin:
copilot plugin marketplace add infracost/agent-skillscopilot plugin install infracost@infracost
- In VS Code, open the Command Palette (
⌘⇧Pon macOS,Ctrl+Shift+Pon Windows/Linux). - Run Chat: Install Plugin From Source.
- Enter
https://github.com/infracost/agent-skillsas the repo. - Quit and re-open VS Code for the changes to take effect.
On your next IaC task, the skill will prompt you to install any required dependencies (including the Infracost CLI) and authenticate with your Infracost account if needed. Your API key is configured automatically during that flow.
OpenAI Codex
Type the following in a Codex prompt:
$skill-installer infracost/agent-skills
Codex expects a single skill by default. Because infracost/agent-skills defines multiple skills, Codex may respond saying this isn't a single skill. If that happens, tell it to install all the skills in the repo and it will resolve the rest automatically.
Cursor
- Open Cursor Settings → Rules.
- In the Rules section, click +New button.
- Select Add from GitHub/GitLab.
- Enter
https://github.com/infracost/agent-skills.gitas the repository URL.
Gemini CLI
Ensure you have the Gemini CLI installed. Then from your terminal, run the following to install the skills:
gemini skills install https://github.com/infracost/agent-skills.git
On your next IaC task, the skill will prompt you to install any required dependencies (including the Infracost CLI) and authenticate with your Infracost account if needed. Your API key is configured automatically during that flow.
Once installed, skills are available as /infracost slash commands, and are also invoked automatically when you ask relevant questions about your infrastructure.
GitLab Duo
GitLab Duo loads Infracost as a user-level (global) Agent Skill, so it is available in every project you open with the GitLab Duo CLI.
User-level Agent Skills are an experimental feature read only by the GitLab Duo CLI (version 8.83.0+, GitLab 19.0+). They are not picked up by the GitLab for VS Code / JetBrains extensions or GitLab Duo Chat in the web UI.