ai Stack Spend Audit 1

    2

    Audit AI/LLM spend across OpenAI, Anthropic, AWS Bedrock, Azure. Find waste, project runway, FinOps report. Free scripts.

    Free

    6 usesSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    ai-stack-spend-audit

    Example session with this skill installed

    Analyze my OpenAI usage.csv and project how much I can save by switching the support bot to gpt-4o-mini. I have $50k left in the bank.

    • Read your context and instructions
    • Compiled the ai-stack-spend-audit

    Current support bot spend: $4,200/mo. Switching to gpt-4o-mini saves $3,800/mo (90% cut). Total runway increases from 17.6 to 22.4 months. View full optimization plan in report.md.

    17.6 to 22.4 months. View full optimization plan in report.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    AI Stack Spend Audit

    Stop overpaying for AI. This skill audits your actual LLM usage across every provider, finds the waste, and projects your runway at current burn rate.

    What it does

    • Pulls usage data from OpenAI, Anthropic, Google AI Studio, AWS Bedrock, Azure OpenAI, and self-hosted (Ollama, vLLM, TGI)
    • Computes true cost per feature, per user, per request — not just per token
    • Detects waste: oversized models for the task, idle always-on endpoints, redundant calls (same prompt twice), broken streaming
    • Projects runway at current burn rate and trend
    • Generates a budget plan with concrete reduction actions
    • Outputs a one-page exec report plus a detailed CSV for finance

    When to use it

    • Your OpenAI bill jumped 3x and you don't know why
    • You have multiple LLM providers and no unified view
    • Engineering says "we need to cut AI spend" and you need a real plan
    • You're pitching to investors and need a credible burn-rate story
    • You want to know if self-hosting (Llama 3.1 70B) would actually save money
    • You're a fractional CTO auditing a portfolio company's stack

    Why it's better than ad-hoc prompting

    Most "audit my LLM spend" prompts give you generic advice. This skill is different:

    • Reads your actual logs — usage_log.jsonl, CloudWatch exports, provider dashboards
    • Statistical rigor — uses Tukey fences for outlier detection, not vibes
    • Cross-provider normalization — converts everything to $/Mtok with provider-specific pricing
    • Actionable — every finding has a save_per_month estimate and a how_to_fix link
    • Forecasting — projects 30/60/90 day spend with confidence bands

    Architecture

    ┌─────────────────────────────────────────────────────────┐
    │                Agent (Claude/Cursor)                    │
    │  - Asks for cost data sources                            │
    │  - Calls analyzer script                                │
    └───────────────┬─────────────────────────────────────────┘
                    │
                    ▼
    ┌─────────────────────────────────────────────────────────┐
    │           skills/ai-stack-spend-audit/                  │
    │  scripts/                                               │
    │    ├── ingest.py        # Multi-source data loader       │
    │    ├── analyze.py       # Cost & waste computation       │
    │    ├── project.py       # Runway + forecasting           │
    │    ├── report.py        # Markdown + CSV output          │
    │    └── optimize.py      # Concrete cut recommendations   │
    │  references/                                            │
    │    ├── provider-pricing-2026.md  # $/Mtok tables        │
    │    ├── self-host-tco-calculator.md                       │
    │    └── finops-playbook.md                               │
    └─────────────────────────────────────────────────────────┘
    

    Quick start

    # 1. Install
    pip install pandas matplotlib
    
    # 2. Ingest from any provider
    python scripts/ingest.py --source openai --api-key $OPENAI_ADMIN_KEY --out usage.csv
    python scripts/ingest.py --source anthropic --api-key $ANTHROPIC_ADMIN_KEY --out usage.csv
    python scripts/ingest.py --source aws-bedrock --s3-bucket my-llm-logs --out usage.csv
    python scripts/ingest.py --source local --log-file ./vllm.log --out usage.csv
    
    # 3. Analyze
    python scripts/analyze.py usage.csv
    
    # 4. Project runway
    python scripts/project.py usage.csv --current-cash 500000 --out report.md
    
    # 5. Get the cut plan
    python scripts/optimize.py usage.csv --target-cut 30
    

    Sample output (excerpt)

    ## AI Stack Spend Audit — June 2026
    
    Total spend MTD:        $14,231.55
    Projected month-end:    $28,400
    vs. last month:         +47%  ⚠️
    Cost per active user:   $0.47/day
    Cost per 1k requests:   $3.12
    
    ### Top 5 waste sources
    1. ❌ Customer-support-bot using gpt-4o for FAQ: $4,200/mo
       → Switch to gpt-4o-mini, save $3,800/mo (90% reduction)
    2. ❌ Embeddings regenerated on every request: $2,100/mo
       → Add Redis cache (1h TTL), save $1,900/mo
    3. ❌ Context window always max (128k) for 200-token prompts: $1,800/mo
       → Truncate to 4k, save $1,500/mo
    4. ⚠️ Anthropic Claude 3 Opus for "summarize this email": $1,200/mo
       → Switch to Claude 3.5 Haiku, save $1,100/mo
    5. ⚠️ Self-hosted Llama 3.1 70B on A100x4 running 3% utilized: $3,400/mo
       → Scale to 1 GPU or shut down, save $2,500/mo
    
    Runway at $500k cash, current burn: 17.6 months
    After recommended cuts: 31.4 months (+14 months)
    

    Supported data sources

    SourceMethodAuth
    OpenAIAdmin API /v1/usageAdmin key
    AnthropicAdmin API /v1/organizations/usageAdmin key
    Google AI StudioCloud LoggingService account
    AWS BedrockCloudWatch LogsIAM
    Azure OpenAICost Management APIAAD
    OllamaLog file parsingNone
    vLLMLog file parsingNone
    Custom (JSONL)Direct fileNone

    The waste patterns it catches

    1. Oversized models — using Opus/GPT-4 for trivial tasks
    2. Uncached embeddings — same text re-embedded thousands of times
    3. Streaming abandonment — clients disconnect mid-stream, you still pay for generated tokens
    4. Context stuffing — sending 100k tokens for a 200-token answer
    5. Idle endpoints — always-on GPU instances at <10% utilization
    6. Redundant calls — same prompt sent multiple times (no idempotency)
    7. Function-call loops — agents calling tools recursively without exit conditions
    8. Test/prod mixing — dev traffic on production keys
    9. Expensive fallbacks — retrying on an expensive model when a cheap one would do
    10. Time waste — long-running requests for cheap work (over-provisioned)

    Pricing

    Single-purchase, lifetime access. $12.00.

    Includes:

    • 5 Python scripts (ingest, analyze, project, report, optimize)
    • Provider pricing reference (updated quarterly)
    • Self-host TCO calculator
    • FinOps playbook (12 optimization patterns)
    • Sample data for testing
    • Future updates for the same major version

    Example usage

    "Here's our OpenAI Admin key. We have $50k in the bank. What are we wasting and when do we run out?"

    The skill will:

    1. Pull last 90 days of usage from OpenAI
    2. Categorize by feature (requires tagging, falls back to model)
    3. Compute per-feature cost
    4. Identify top 5 waste sources
    5. Project runway at current burn
    6. Output report.md + spend-detail.csv

    Compliance

    Generates evidence suitable for:

    • SOC2 cost-monitoring controls
    • FinOps Foundation certification
    • Board-level budget reviews
    • Customer audits (pass-through billing)

    Compatibility

    Works with any agent that supports the SKILL.md standard and can execute Python: Claude Code, OpenClaw, Codex CLI, Cursor, Gemini CLI, Cline, Windsurf, Aider. Tested on Linux, macOS, Windows.

    Tags

    finops, cost-optimization, llm, openai, anthropic, aws, budget, agent-ops, observability, runway

    • Requires Admin API keys for automated ingestion.
    • Pricing tables require periodic manual updates.
    • Accuracy depends on quality of log metadata.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    6 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 4 months ago

    • Free with an Agensi account

    Requires

    OpenAI

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access

    Allowed Hosts

    api.openai.com
    Listed4 months ago

    What's inside

    Frequently Asked Questions

    The skill analyzes raw usage logs and API data to identify specific inefficiencies like 'context stuffing' or using overpowered models for simple tasks. It provides a concrete 'cut plan' with estimated monthly savings for each finding.

    This skill is designed for agents that can execute local Python scripts, such as Claude Code, Cursor, Windsurf, Aider, and Cline. It includes a standard SKILL.md for easy integration into your existing AI workflow.

    The audit scripts run locally on your machine or within your agent's environment; your sensitive API keys and usage logs are never sent to an external server or shared with the skill creator.

    Yes, your purchase includes lifetime access and quarterly updates to the provider pricing tables ($/Mtok) and self-host TCO calculators to ensure your reports remain accurate as model prices drop.

    Absolutely. It supports log file parsing for Ollama and vLLM and includes a 'Self-Host TCO Calculator' to help you determine if switching from managed APIs to private GPUs would actually save you money.

    You get five core Python scripts (ingest, analyze, project, report, and optimize), a comprehensive FinOps playbook with 12 optimization patterns, and updated pricing reference tables for all major providers.

    New in Agents & Orchestration

    Free