> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costhawk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Example Prompts

> Real-world examples of using CostHawk with Claude

## Usage Tracking

<AccordionGroup>
  <Accordion title="Daily usage check">
    **Prompt:** "What's my AI API usage today?"

    **What it does:** Returns total costs, API calls, and token usage for today, broken down by provider and model.
  </Accordion>

  <Accordion title="Weekly comparison">
    **Prompt:** "Compare my usage this week vs last week"

    **What it does:** Shows usage summaries for both periods so you can spot trends.
  </Accordion>

  <Accordion title="Provider breakdown">
    **Prompt:** "Which provider am I spending the most on?"

    **What it does:** Returns costs grouped by provider (OpenAI, Anthropic, etc.)
  </Accordion>

  <Accordion title="Project costs">
    **Prompt:** "Show me costs broken down by project tag"

    **What it does:** Groups usage by the `project` metadata tag to see per-project spending.
  </Accordion>
</AccordionGroup>

## Savings Analysis

<AccordionGroup>
  <Accordion title="Subscription ROI">
    **Prompt:** "Am I saving money with Claude Max?"

    **What it does:** Compares your usage against retail pricing to show if your flat-rate subscription is worth it.
  </Accordion>

  <Accordion title="Monthly savings report">
    **Prompt:** "Show my savings vs retail this month"

    **What it does:** Shows total retail cost, subscription cost, and net savings for the current month.
  </Accordion>

  <Accordion title="Model-level breakdown">
    **Prompt:** "Which models am I using the most under my subscription?"

    **What it does:** Shows per-model usage and what that would cost at retail rates.
  </Accordion>
</AccordionGroup>

## Monitoring & Alerts

<AccordionGroup>
  <Accordion title="Anomaly detection">
    **Prompt:** "Are there any cost anomalies I should know about?"

    **What it does:** Analyzes recent usage patterns and flags any unusual spikes or changes.
  </Accordion>

  <Accordion title="Check alerts">
    **Prompt:** "Do I have any unread alerts?"

    **What it does:** Lists recent alerts including budget warnings and cost spike notifications.
  </Accordion>

  <Accordion title="Set up Slack notifications">
    **Prompt:** "Create a Slack webhook for budget alerts at [https://hooks.slack.com/services/](https://hooks.slack.com/services/)..."

    **What it does:** Creates a new webhook that sends notifications to your Slack channel.
  </Accordion>
</AccordionGroup>

## Pricing Lookups

<AccordionGroup>
  <Accordion title="Model pricing">
    **Prompt:** "What's the current pricing for GPT-4o?"

    **What it does:** Returns input/output pricing per million tokens and context window size.
  </Accordion>

  <Accordion title="Compare providers">
    **Prompt:** "Compare Anthropic and OpenAI pricing"

    **What it does:** Shows pricing for all models from both providers for comparison.
  </Accordion>
</AccordionGroup>

## Claude Code & Codex Sync

<AccordionGroup>
  <Accordion title="Sync Claude Code usage">
    **Prompt:** "Sync my Claude Code usage"

    **What it does:** Parses local `~/.claude/projects` files and uploads usage metadata (tokens, models, timestamps) to your CostHawk dashboard.
  </Accordion>

  <Accordion title="Preview before syncing">
    **Prompt:** "Preview my Claude Code sync with dryRun enabled"

    **What it does:** Shows exactly what data would be sent without making any network requests. Great for transparency.
  </Accordion>

  <Accordion title="Sync Codex CLI usage">
    **Prompt:** "List my Codex sessions first, then sync Codex usage for the last 30 days"

    **What it does:** Verifies local discovery with `costhawk_list_codex_sessions`, then uploads metadata with `costhawk_sync_codex_usage maxAgeHours=720`.
  </Accordion>

  <Accordion title="Combined sync">
    **Prompt:** "Sync all my local AI usage data"

    **What it does:** Syncs both Claude Code and Codex CLI usage in one operation.
  </Accordion>
</AccordionGroup>

## Privacy & Transparency

<AccordionGroup>
  <Accordion title="See what files are accessed">
    Run in terminal:

    ```bash theme={null}
    npm exec --yes costhawk@latest -- --what-we-read
    ```

    **What it does:** Lists all file paths the MCP server would access, without making network requests.
  </Accordion>

  <Accordion title="Verify MCP env and auto-sync flags">
    Run in terminal:

    ```bash theme={null}
    npm exec --yes costhawk@latest -- --self-test
    ```

    **What it does:** Confirms `hasApiKey`, `autoSyncEnabled`, `codexAutoSyncEnabled`, and local directory detection (`local.codexDir`, `local.claudeCodeDir`).
  </Accordion>

  <Accordion title="Preview any sync payload">
    **Prompt:** "Show me what would be sent if I sync my usage, but don't actually send it"

    **What it does:** Uses `dryRun: true` to return the full payload that would be uploaded, so you can verify nothing sensitive is included.
  </Accordion>
</AccordionGroup>

## Combining Tools

You can ask complex questions that use multiple tools:

> "I'm spending more than usual this week. Can you check for anomalies and show me which project is driving the increase?"

Claude will:

1. Run anomaly detection
2. Get usage by project tag
3. Analyze and explain the results

> "Sync my Claude Code usage, then show me my total spending this month including the new data"

Claude will:

1. Sync local Claude Code data
2. Fetch updated usage summary
3. Present a comprehensive monthly report

***

<Tip>
  The MCP server returns data in markdown format by default, making it easy for Claude to present nicely formatted tables and summaries.
</Tip>

<Info>
  **Privacy note:** All sync operations only send usage metadata (tokens, models, timestamps). Your code, prompts, and file paths are never transmitted.
</Info>
