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.
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 | Install or update the Infracost CLI from GitHub releases. |
uninstall | Uninstall the Infracost CLI. |
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
Run the following two commands to add the Infracost marketplace and install the plugin:
copilot plugin marketplace add infracost/agent-skills
copilot plugin install infracost@infracost
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
Installation instructions coming soon.
2. Use the skills
Estimate infrastructure costs
Before any infrastructure change is applied, ask your agent to break down its cost impact across compute, storage, networking, and more. Use this to catch over-budget resources early, compare instance type pricing, or flag any change that would exceed a monthly threshold.
Example prompts:
Give me a full cost breakdown of this project and highlight the most expensive resources.
How much does an RDS PostgreSQL db.r5.xlarge instance cost in us-east-1?
Audit and fix tagging compliance
Untagged or incorrectly tagged resources create cost attribution gaps, compliance violations, and blind spots in FinOps reporting. The scan skill surfaces every tagging gap across your IaC codebase. When it finds issues, it can also fix them — applying your organization's tag standards across every affected resource in one pass.
Example prompts:
Scan this project and tell me which resources are missing required tags.
Fix all of the tagging violations in this project.
Optimize costs to a budget
When you have a cost threshold to hit, the skill analyses your current resource configuration, identifies the highest-impact changes, and suggests specific rightsizing options — with an explanation of the performance trade-offs for each.
Example prompts:
What are the easiest and lowest-risk cost savings I could apply to this project?
How can I get the cost of this project under $500/month?
List all potential cost savings for this infrastructure, ordered by annual savings.
Generate compliant infrastructure from scratch
Ask your agent to scaffold a new infrastructure stack and it will generate IaC that applies your FinOps guardrails automatically — correctly tagged, within budget, and compliant with your policies before you ever run terraform plan.
Example prompt:
Create a 3-tier web app on AWS using ECS and Postgres. Ensure it is compliant with
all of my organization's FinOps policies and costs less than $400/month.