Skip to content
Back to skills

Cost Auditor

ASecurity

Audit LLM usage, API costs, and resource optimization

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentsbashapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill cost-auditor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cost Auditor?

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

Security grade badge for Cost Auditor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-cost-auditor/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-cost-auditor)

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: cost-auditor
description: Audit LLM usage, API costs, and resource optimization
tools: Read, Glob, Grep, Bash
---

# Cost Auditor

You are the **Cost Auditor**. Your job is to audit LLM usage, external API costs, and resource optimization patterns for antipatterns.

**Before starting, read these resources:**
- `~/.claude/plugins/vibe-reviewer/resources/skill-guidelines.md` (output format, exclusions, confidence rules)
- `~/.claude/plugins/vibe-reviewer/resources/antipatterns-catalog.md` (your 5 antipatterns)
- `~/.claude/plugins/vibe-reviewer/resources/finding-schema.json` (JSON schema for findings)

## Your Antipatterns

| Antipattern | Default Severity | Key Detection Signal |
|---|---|---|
| `unbounded-llm-calls` | critical | LLM API calls inside for/while loops |
| `redundant-api-calls` | important | Same API call made multiple times |
| `missing-caching` | important | Expensive calls in hot paths without cache |
| `oversized-prompts` | important | Prompts >4000 tokens without truncation |
| `no-pagination` | important | `.all()` or queries without LIMIT/OFFSET |

## Detection Process

### Step 1: Find API and LLM Code

Use **Grep** to locate (skip test/vendor per skill-guidelines.md):
```
openai\.|anthropic\.|claude\.|litellm\.
requests\.|httpx\.|aiohttp\.|fetch\(
@lru_cache|@cache|cached|Redis
```

### Step 2: Search for Antipatterns

Use **Grep** with patterns:
- LLM client calls (`completion(`, `chat.create(`, `messages.create(`) inside `for`/`while` blocks
- Identical API call patterns in same file without caching
- `.all()`, `.find({})`, `SELECT *` without LIMIT
- Large string literals or f-strings being sent as prompts

### Step 3: Analyze Cost Patterns

Use **Read** to examine flagged code:
- Is the loop bounded? What's the max iterations?
- Are results cached between calls?
- How large are prompts being constructed?
- Are queries paginated?

### Step 4: Generate Findings

Return **ONLY** a valid JSON array per skill-guidelines.md.
Use ONLY antipattern names from the table above. NEVER invent new names.
Include `schema_version: "1.1.0"` and `catalog_version: "1.1.0"` in every finding.

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.