Expensive queries, chatty API loops, unbounded storage, oversized resources — savings ranked by effort.
Free & open · no signup · read-only — it ends by asking · nothing leaves your machine
You are working inside this repo. Mission: find where this system spends money it doesn't need to — compute, storage, third-party calls, egress — and rank the savings by effort.
Read-only pass. Your only write is the report file.
Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.
heavy queries or jobs on hot paths or tight schedules; recomputing what could be stored
per-item API calls that batch endpoints could collapse; N calls where 1 would do
repeated identical fetches of slow-changing data from paid sources
logs, blobs, soft-deleted rows, old versions accumulating forever with no lifecycle policy
instance sizes, provisioned capacity, always-on resources for spiky workloads
logging/tracing at a verbosity that costs real money to ingest and store
crons doing overlapping work, or work whose output nobody reads
One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.
Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.
From code and config.
Expensive frequent work — heavy queries or jobs on hot paths or tight schedules.
Estimate monthly impact per finding — order of magnitude is fine.
Create COSTS.md at repo root.
Copy it and paste it into your agent inside the repo you want checked.
Install the goal plugin once — two commands — then just type /goal:cost-audit.
/plugin marketplace add GhostlyGawd/goal-prompts/plugin install goal@goal-promptsOr install only this Goal Prompt as /goal-cost-audit:
curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=24 shLet an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.
https://goal-prompts.vercel.app/raw/24.mdNothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.
# Goal: Cost Audit You are working inside this repo. Mission: find where this system spends money it doesn't need to — compute, storage, third-party calls, egress — and rank the savings by effort. Read-only pass. Your only write is the report file. ## Phase 1 — Identify the cost drivers - From code and config: what does this system pay for? Compute/hosting, database, storage, third-party APIs, email/SMS, telemetry. - Which of those scale with usage, and which are flat? - Where are the metered calls: every paid API and the code that hits it. ## Phase 2 — Audit through 7 lenses 1. **Expensive frequent work** — heavy queries or jobs on hot paths or tight schedules; recomputing what could be stored 2. **Chatty loops** — per-item API calls that batch endpoints could collapse; N calls where 1 would do 3. **Missing caches** — repeated identical fetches of slow-changing data from paid sources 4. **Unbounded growth** — logs, blobs, soft-deleted rows, old versions accumulating forever with no lifecycle policy 5. **Oversize by config** — instance sizes, provisioned capacity, always-on resources for spiky workloads 6. **Telemetry volume** — logging/tracing at a verbosity that costs real money to ingest and store 7. **Redundant schedules** — crons doing overlapping work, or work whose output nobody reads ## Phase 3 — Curate - Estimate monthly impact per finding — order of magnitude is fine; show the arithmetic - Rank by savings ÷ effort; flag anything that trades reliability for pennies ## Phase 4 — Report Create `COSTS.md` at repo root: 1. **Cost driver map** — what's paid for and what it scales with 2. **Findings** — each: issue · location · monthly impact estimate · fix · effort · risk 3. **Savings ladder** — ranked, cumulative estimate 4. **Lifecycle policies to add** — retention/archival rules for the unbounded growth 5. **Verification plan** — how to confirm each saving after the change Start the report with today's date. If `COSTS.md` already exists from a previous run, read it first and lead with what changed since. ## Rules - Show the arithmetic behind every estimate - Never save money by making failures more likely — flag those tradeoffs - No traceable infrastructure or service spend in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding. - If a `reports/` directory exists at the repo root, write the report there instead of the root. - Before asking, present the top findings as a ranked list in plain words - Report only — end by asking which savings to take
reports/ directory exists at the repo root, write the report there instead of the root.Map merged-PR to production; every manual step is a finding. Includes the rollback-readiness verdict.
The 3am table — for each failure scenario: how you'd detect it, how you'd respond, and the gap in between.
Every knob, var, and magic value — where config sprawls, where environments drift, what explodes at boot versus at 3am, and which secrets hide in plain sight.
The positive side of observability — whether metrics, traces, and SLOs let you answer any question about the running system, not just whether it crashed.
Runs inside these playbooks — curated sequences you can launch with one paste: