Skip to content
Back to skills

Flyio Cost Tuning

ASecurity

Analyze Fly.io Machine, volume, network, IP, and Managed Postgres cost drivers without freezing volatile prices. Use when reducing spend or forecasting capacity. Trigger with: "audit Fly bill", "right-size Fly Machines", "reduce Fly idle cost".

  • 2,719 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 21, 2026
ai-agentsapidatabaseperformancedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 21, 2026

npx -y skills add jeremylongshore/claude-code-plugins-plus --skill flyio-cost-tuning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flyio Cost Tuning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flyio Cost Tuning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeremylongshore-flyio-cost-tuning-f7158a5c/badge)](https://www.skillsdirectory.com/skills/jeremylongshore-flyio-cost-tuning-f7158a5c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flyio-cost-tuning
description: >-
  Analyze Fly.io Machine, volume, network, IP, and Managed Postgres cost drivers without freezing volatile prices. Use when reducing spend or forecasting capacity. Trigger with: "audit Fly bill", "right-size Fly Machines", "reduce Fly idle cost".
allowed-tools: Read, Grep, Write, Edit
version: 2.0.0
argument-hint: '[organization-app-and-billing-window]'
model: inherit
effort: high
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
  - saas
  - flyio
  - cost-management
  - right-sizing
  - autostop
compatibility: 'Requires current billing exports or invoices, app and database inventory, utilization evidence, service objectives, and an approved optimization window.'
---

# Fly.io Cost and Capacity Review

## Overview

Optimize from measured usage and the current pricing page, not copied monthly constants. Separate running and stopped Machine charges, persistent volume and snapshot charges, network and IP costs, and Managed Postgres resources that live outside application deletion.

## Prerequisites

- Billing window, currency, organization, apps, and cost owner
- Machine state and resource history plus traffic, latency, and availability objectives
- Inventory of volumes, snapshots, IPs, transfer, builders, and Managed Postgres clusters

## Instructions

### Step 1: Reconcile the bill to resources

Map each charge class to current Machines, volumes, snapshots, addresses, transfer, builders, and databases. Include unattached and stopped-resource dependencies.

### Step 2: Measure utilization and state

Compare CPU, memory, concurrency, request, latency, restart, and running-time signals with the selected VM size and Machine count.

### Step 3: Evaluate autostop safely

For eligible service apps, model `auto_stop_machines` as `stop` or `suspend` with `auto_start_machines` and a deliberate minimum-running setting. Include cold-start and state-safety costs.

### Step 4: Right-size and place

Change one dimension at a time: VM preset, additional memory, count, region placement, or database plan. Preserve capacity and recovery headroom.

### Step 5: Remove orphaned cost with approval

Identify unattached volumes, obsolete snapshots beyond policy, unused addresses, old builders, and databases no longer referenced. Deletion requires owner confirmation and recovery evidence.

### Step 6: Verify savings and service health

Compare the next billing interval and performance signals with the baseline; reverse changes that violate latency, availability, or recovery objectives.

## Authentication

Prefer read-only organization tokens for inventory and billing analysis. Cost review does not authorize deleting Machines, volumes, addresses, snapshots, or Managed Postgres clusters; obtain resource-owner approval and preserve recovery evidence first.

## Tool Discipline

Use Read and Grep to inspect application configuration, deployment evidence, provider documentation, fixtures, logs, schemas, and existing tests before proposing a change. Use Write or Edit only for an approved plan, configuration, implementation, test, or redacted receipt. Do not create, deploy, scale, restart, stop, suspend, destroy, rotate, revoke, expose, or migrate live Fly.io resources without explicit operator approval.

## Output

- Cost allocation by resource class and owner
- Ranked optimization plan with forecast, risk, and rollback
- Post-change cost and service-objective comparison

Return the target organization, app, environment, region set, Machine or database identifiers, source-contract fingerprint, evidence, unresolved risks, rollback state, and final decision without exposing tokens, secrets, connection strings, or customer data.

## Examples

An internal HTTP app has predictable idle nights. The operator confirms it has no unsafe local state, models suspend and autostart with one minimum Machine during business hours, preserves volume charges in the forecast, and validates cold-start latency before rollout.

## Error Handling

| Failure | Response |
| --- | --- |
| Bill and inventory do not reconcile | Check deleted apps, stopped Machines, orphaned volumes, addresses, builders, transfer, and Managed Postgres outside app scope. |
| Autostop harms availability | Raise minimum capacity or revert the setting; do not optimize through an unmeasured outage. |
| Pricing changed | Re-fetch the official pricing page and recompute; never preserve a stale copied rate. |

## Resources

- [First-party source notes](references/official-docs.md)
- [Machines API setup](https://fly.io/docs/machines/api/working-with-machines-api/)
- [Automation and tokens](https://fly.io/docs/flyctl/integrating/)
- [App configuration](https://fly.io/docs/reference/configuration/)
- [Resource pricing](https://fly.io/docs/about/pricing/)
- [Autostop and autostart](https://fly.io/docs/reference/fly-proxy-autostop-autostart/)
- [Managed Postgres](https://fly.io/docs/mpg/)

Files in this skill

  • SKILL.md4.8 KB
  • references/official-docs.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.