Skip to main content

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 organisation's policies. Infracost AI Agent Skills fix that by connecting your agent to real-time pricing data and your organisation's FinOps and tagging policies at prompt time. The result: agents that can audit existing infrastructure for cost and compliance issues, optimise 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 organisation'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 organisation'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 organisation. 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:

SkillDescription
scanAnalyse an IaC project to estimate cloud costs, identify savings opportunities, and flag FinOps policy and tagging violations.
iac-generationGenerate new IaC that is cost-optimised and compliant with your organisation's FinOps and tagging policies from the first draft.
price-lookupLook up cloud resource pricing by generating sample Terraform and running Infracost — no existing IaC required.
installInstall or update the Infracost CLI from GitHub releases.
uninstallUninstall the Infracost CLI.
install-lspInstall 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

Inside Claude Code, run the following two commands to add the Infracost marketplace and install the plugin:

/plugin marketplace add infracost/agent-skills
/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

Installation instructions coming soon.


OpenAI Codex

Installation instructions coming soon.


Cursor

Installation instructions coming soon.


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 organisation'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.

Optimise 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 organisation's FinOps policies and costs less than $400/month.