Skip to main content
agentsSource-backedReview first Safety Privacy

AI Agent Cost Governance Analyst Agent

Community reusable agent prompt for Claude Code and agent spend governance using official costs documentation: budgets, model tier policy, caching awareness, anomaly triage, and team reporting workflows.

by kiannidev·added 2026-06-16·
HarnessClaude Code
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • Cost caps should not push teams toward disabling security controls to save tokens.
  • Investigate MCP or subagent loops before blaming individual users for spikes.
  • Premium model break-glass paths should remain documented for incidents.
  • Governance recommendations require leadership approval before hard enforcement.

Privacy notes

  • Cost reports may expose per-user usage; treat exports like sensitive operational data.
  • Do not paste customer content into prompts to debug cost spikes in shared tickets.
  • Aggregate spend in leadership reviews unless investigating an approved incident.

Prerequisites

  • Access to Claude Code cost or usage reporting for your organization.
  • Baseline spend from a pilot cohort or pre-rollout month.
  • Defined owners for finance review, platform engineering, and team lead escalation.
  • Documented model tiers and when premium models are approved.

Schema details

Install type
copy
Troubleshooting
No
Source repository stats
Scope
Source repo
Full copyable content
## Content

AI Agent Cost Governance Analyst Agent is a community-authored reusable prompt for
Claude Code spend governance. It applies official Claude Code costs documentation—not
a finance or billing support agent.

## Scope Note

This prompt operationalizes documented cost concepts from code.claude.com. Contractual
billing interpretation remains with finance and vendor account teams.

## Agent Prompt

You are an AI agent cost governance analyst for Claude Code deployments. Analyze spend,
define policies, and report anomalies using official costs documentation.

Workflow:

1. **Baseline intake.** Capture monthly spend, active users, and model mix.
2. **Policy draft.** Define default model tiers, premium approval paths, and caching expectations.
3. **Anomaly detection.** Flag spikes from MCP loops, long sessions, or subagent parallelism.
4. **Root cause.** Correlate anomalies with repos, connectors, or workflow changes.
5. **Recommendations.** Propose policy tweaks, not punitive measures, with evidence.
6. **Reporting.** Produce leadership summaries without exposing individual misuse unless approved.
7. **Follow-up.** Track remediation and re-baseline after changes.

Output contract:

- Spend summary with model and team breakdowns.
- Anomaly list with hypothesized causes.
- Policy recommendations and approval owners.
- Next review date and metrics to watch.

## Features

- Maps official costs docs to team governance workflows.
- Separates systemic misconfiguration from individual overuse.
- Incorporates caching and model tier guidance from documentation.
- Produces finance-ready summaries with privacy guardrails.

## Use Cases

- Monthly Claude Code spend review with engineering leads.
- Investigate sudden MCP-related token spikes.
- Define model tier policy before enterprise rollout.
- Post-mortem after autocompact thrashing or runaway subagents.

## Source Notes

Verified against Claude Code costs documentation on **2026-06-16**:

- Official docs describe how Claude Code usage consumes tokens across models, tools,
  and long sessions with guidance on understanding cost drivers.
- Documentation covers model selection implications and practices teams use to manage
  spend while maintaining quality.
- Costs guidance complements analytics and team rollout docs for organizational governance.

## Duplicate Check

Checked content/agents and content/guides for cost governance coverage.
team-cost-governance-for-claude-code-usage is a guides entry. token-cost-budget-optimizer
is a separate agent focused on optimization, not finance governance reporting.
No agents entry applies official costs documentation to analyst-style team governance workflows.

## Editorial Disclosure

Submitted as an independent community agent entry by kiannidev, based on public Claude
Code costs documentation and the public anthropics/claude-code repository.
No paid placement, referral, or affiliate relationship.

## Sources

- Claude Code costs - https://code.claude.com/docs/en/costs
- Claude Code analytics - https://code.claude.com/docs/en/analytics
- Claude Code repository - https://github.com/anthropics/claude-code

About this resource

Content

AI Agent Cost Governance Analyst Agent is a community-authored reusable prompt for Claude Code spend governance. It applies official Claude Code costs documentation—not a finance or billing support agent.

Scope Note

This prompt operationalizes documented cost concepts from code.claude.com. Contractual billing interpretation remains with finance and vendor account teams.

Agent Prompt

You are an AI agent cost governance analyst for Claude Code deployments. Analyze spend, define policies, and report anomalies using official costs documentation.

Workflow:

  1. Baseline intake. Capture monthly spend, active users, and model mix.
  2. Policy draft. Define default model tiers, premium approval paths, and caching expectations.
  3. Anomaly detection. Flag spikes from MCP loops, long sessions, or subagent parallelism.
  4. Root cause. Correlate anomalies with repos, connectors, or workflow changes.
  5. Recommendations. Propose policy tweaks, not punitive measures, with evidence.
  6. Reporting. Produce leadership summaries without exposing individual misuse unless approved.
  7. Follow-up. Track remediation and re-baseline after changes.

Output contract:

  • Spend summary with model and team breakdowns.
  • Anomaly list with hypothesized causes.
  • Policy recommendations and approval owners.
  • Next review date and metrics to watch.

Features

  • Maps official costs docs to team governance workflows.
  • Separates systemic misconfiguration from individual overuse.
  • Incorporates caching and model tier guidance from documentation.
  • Produces finance-ready summaries with privacy guardrails.

Use Cases

  • Monthly Claude Code spend review with engineering leads.
  • Investigate sudden MCP-related token spikes.
  • Define model tier policy before enterprise rollout.
  • Post-mortem after autocompact thrashing or runaway subagents.

Source Notes

Verified against Claude Code costs documentation on 2026-06-16:

  • Official docs describe how Claude Code usage consumes tokens across models, tools, and long sessions with guidance on understanding cost drivers.
  • Documentation covers model selection implications and practices teams use to manage spend while maintaining quality.
  • Costs guidance complements analytics and team rollout docs for organizational governance.

Duplicate Check

Checked content/agents and content/guides for cost governance coverage. team-cost-governance-for-claude-code-usage is a guides entry. token-cost-budget-optimizer is a separate agent focused on optimization, not finance governance reporting. No agents entry applies official costs documentation to analyst-style team governance workflows.

Editorial Disclosure

Submitted as an independent community agent entry by kiannidev, based on public Claude Code costs documentation and the public anthropics/claude-code repository. No paid placement, referral, or affiliate relationship.

Sources

Source citations

Add this badge to your README

Show that AI Agent Cost Governance Analyst Agent is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/agents/ai-agent-cost-governance-analyst-agent.svg)](https://heyclau.de/entry/agents/ai-agent-cost-governance-analyst-agent)

How it compares

AI Agent Cost Governance Analyst Agent side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldAI Agent Cost Governance Analyst Agent

Community reusable agent prompt for Claude Code and agent spend governance using official costs documentation: budgets, model tier policy, caching awareness, anomaly triage, and team reporting workflows.

Open dossier
Prompt Caching Cost Audit Capability Pack Skill

Expert prompt caching cost audit capability pack for measuring Claude Code cache hit rates, identifying cache invalidation triggers, and reducing token spend from CLAUDE.md edits, model switches, and startup load changes.

Open dossier
Claude Code Context Window Audit Capability Pack Skill

Expert Claude Code context window audit capability pack for measuring what loads at session start, what each read and extension adds, when compaction drops path-scoped rules, and how to delegate or compact before quality drops.

Open dossier
Agent Observability SRE Agent

Community reusable agent prompt for Claude Code analytics and agent platform on-call using official analytics documentation: usage signals, session failure triage, MCP latency patterns, and SRE runbooks for agent hosting teams.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Categoryagentsskillsskillsagents
Sourcesource-backedsource-backedsource-backedsource-backed
Authorkiannidevkiannidevkiannidevkiannidev
Added2026-06-162026-06-142026-06-132026-06-16
Platforms
Claude Code
Claude CodeCodexWindsurfGeminiCursorCLI
Claude CodeCodexWindsurfGeminiCursorCLI
Claude Code
Source repo
Safety notesCost caps should not push teams toward disabling security controls to save tokens. Investigate MCP or subagent loops before blaming individual users for spikes. Premium model break-glass paths should remain documented for incidents. Governance recommendations require leadership approval before hard enforcement.Cost reduction must not remove safety-critical instructions from CLAUDE.md or skills without explicit review. Aggressive cache optimization that strips needed context can increase mistake rates and rework cost. Model switches invalidate prompt caches; frequent alias changes can silently increase spend. This skill recommends configuration changes; it must not edit CLAUDE.md, skills, or MCP config without explicit user approval.This skill recommends context-management actions; it must not run `/compact`, `/clear`, or delete local memory files without explicit user approval. `/compact` and automatic compaction summarize conversation history and can drop path-scoped rules until matching files are read again. Moving always-on instructions from path-scoped rules into project-root `CLAUDE.md` changes what survives compaction; show the proposed diff first. Subagent delegation isolates large reads but still consumes tokens in the subagent window; do not spawn many parallel subagents without a cost plan. Prompt-cache invalidation from model switches, large CLAUDE.md edits, or mid-session settings changes can cause expensive uncached turns.Incident commands must not exfiltrate customer prompts into public tickets. Scaling replicas without reviewing tool side effects can amplify destructive MCP calls. Disabling tracing to reduce noise may hide regressions—prefer sampling over full off. Rollback plans should include MCP allowlist and permission settings, not only code.
Privacy notesCost reports may expose per-user usage; treat exports like sensitive operational data. Do not paste customer content into prompts to debug cost spikes in shared tickets. Aggregate spend in leadership reviews unless investigating an approved incident.Cost audits may expose repository names, team usage patterns, and internal project structure from CLAUDE.md and skill inventories. Usage dashboards and `/cost` output can include account identifiers that should not be pasted into public issues. Public audit summaries should describe invalidation categories and recommended actions, not full settings dumps.`/context` breakdowns, `/memory` listings, and session transcripts can expose repository paths, branch names, MCP server names, hook commands, and internal project structure. Compaction summaries may retain task details, credentials mentioned in chat, customer names, or incident context unless redacted before sharing. Auto memory and nested `CLAUDE.md` files may contain team-specific conventions, URLs, or identifiers that should not be pasted into public issues. Public PR or support notes should summarize pressure categories and recommended actions, not full `/context` output or complete transcript dumps.Analytics and logs may contain prompts, diffs, and credentials if misconfigured. Recommend redaction before exporting incident timelines externally. Shared dashboards should aggregate metrics without raw user content fields.
Prerequisites
  • Access to Claude Code cost or usage reporting for your organization.
  • Baseline spend from a pilot cohort or pre-rollout month.
  • Defined owners for finance review, platform engineering, and team lead escalation.
  • Documented model tiers and when premium models are approved.
  • An active or recent Claude Code session with observed cost increase or low cache reuse.
  • Access to cost or usage indicators such as `/cost`, billing dashboards, or session token summaries when available.
  • Redacted view of CLAUDE.md, skills, MCP config, and settings changed recently in the workspace.
  • Knowledge of model alias or version switches during the affected session window.
  • An active or recently compacted Claude Code session where context pressure, cost, or recall quality is a concern.
  • Permission to run `/context`, `/memory`, and optionally `/compact` or `/clear` in the affected session.
  • Redacted access to project and user `CLAUDE.md`, `.claude/rules/`, skill descriptions, MCP server list, and hook configuration when relevant.
  • A concrete symptom such as repeated compaction, rising token cost, missed conventions, or degraded tool selection.
  • Access to Claude Code analytics or org usage exports for affected teams.
  • Logs from agent hosts, MCP gateways, and background workers when self-hosting SDK workloads.
  • Defined SLOs for session completion time and error budgets for agent tasks.
  • Architecture diagram showing model calls, tool execution, and persistence layers.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.