From cost-analyst
Evaluates cloud resource tagging quality and coverage to identify untagged or poorly tagged resources, calculate tag coverage percentages, and improve cost allocation accuracy for showback and chargeback
npx claudepluginhub cloudzero/cloudzero-claude-marketplace --plugin cost-analystThis skill uses the workspace's default tool permissions.
This skill evaluates the quality and completeness of cloud resource tagging to improve cost allocation, enable accurate showback/chargeback, and ensure governance compliance.
Identifies and ranks the biggest contributors to cloud spending across services, accounts, teams, regions, or custom dimensions to help prioritize cost optimization efforts and understand spending distribution
Implements Terraform labels modules for consistent cloud resource naming, tagging, cost center attribution, and compliance enforcement across environments.
Share bugs, ideas, or general feedback.
This skill evaluates the quality and completeness of cloud resource tagging to improve cost allocation, enable accurate showback/chargeback, and ensure governance compliance.
This skill builds on the understand-cloudzero-organization skill.
Before applying this procedure:
Identify what tags exist in the organization:
get_available_dimensions(filter="Tag")
This returns all tags in use. Common tags include:
For each critical tag, calculate coverage:
# Get total costs
get_cost_data(cost_type="real_cost")
# Get costs WITH the tag (any value)
get_cost_data(
group_by=["CZ:Tag:Environment"],
cost_type="real_cost"
)
# Get costs WITHOUT the tag (calculate as difference)
Coverage Formula:
Tag Coverage % = (Cost of Tagged Resources / Total Cost) * 100
Untagged Cost = Total Cost - Cost of Tagged Resources
Untagged % = (Untagged Cost / Total Cost) * 100
For each important tag (Environment, Team, Application, etc.):
Tag Distribution:
get_cost_data(
group_by=["CZ:Tag:Environment"],
limit=50
)
Identify untagged costs by dimension:
# Untagged by Account
get_cost_data(
group_by=["CZ:Account"],
# Note: Can't directly filter for "no tag", so compare to total by account
)
# Untagged by Service
get_cost_data(
group_by=["CZ:Service"],
)
# Then identify which services have low tag coverage
Analyze coverage across multiple tags simultaneously:
get_cost_data(
group_by=["CZ:Tag:Environment", "CZ:Tag:Team"],
limit=100
)
Identify resources that have:
Identify which accounts have tagging issues:
# For each account, analyze tag coverage
get_cost_data(
group_by=["CZ:Account", "CZ:Tag:Environment"],
limit=100
)
Calculate coverage % per account and rank accounts by:
Identify which services are commonly untagged:
get_cost_data(
group_by=["CZ:Service", "CZ:Tag:Environment"],
limit=100
)
Some services may be harder to tag (e.g., data transfer, some AWS service fees). Identify:
Analyze if tagging is improving or degrading:
# Current month
get_cost_data(
group_by=["CZ:Tag:Environment"],
date_range="this month"
)
# Previous month
get_cost_data(
group_by=["CZ:Tag:Environment"],
date_range="last month"
)
# Three months ago
get_cost_data(
group_by=["CZ:Tag:Environment"],
date_range="3 months ago"
)
Calculate coverage % for each period and identify trend.
Beyond just having tags, analyze tag value quality:
Identify problematic patterns:
get_dimension_values(dimension="CZ:Tag:Environment")
Review all values and flag:
Prioritize tagging efforts by identifying expensive untagged resources:
# Get top services, then check which have poor tag coverage
get_cost_data(
group_by=["CZ:Service"],
limit=20
)
# For each high-cost service, analyze tag coverage
get_cost_data(
filters={"CZ:Service": ["AmazonEC2"]},
group_by=["CZ:Tag:Environment", "CZ:Account"],
limit=50
)
Focus on:
Provide comprehensive tagging analysis:
Critical Tags:
| Tag | Coverage % | Tagged Cost | Untagged Cost | Status |
|---|---|---|---|---|
| Environment | XX% | $X,XXX | $X,XXX | ⚠️/✅ |
| Team | XX% | $X,XXX | $X,XXX | ⚠️/✅ |
| Application | XX% | $X,XXX | $X,XXX | ⚠️/✅ |
| CostCenter | XX% | $X,XXX | $X,XXX | ⚠️/✅ |
| Owner | XX% | $X,XXX | $X,XXX | ⚠️/✅ |
Overall Tag Health:
Total Untagged: $X,XXX (XX% of total cloud spend)
By Service:
| Service | Total Cost | Untagged Cost | Untagged % | Priority |
|---|---|---|---|---|
| Service A | $X,XXX | $X,XXX | XX% | High |
| Service B | $X,XXX | $X,XXX | XX% | Medium |
| ... | ... | ... | ... | ... |
By Account:
| Account | Total Cost | Untagged Cost | Untagged % | Status |
|---|---|---|---|---|
| Account A | $X,XXX | $X,XXX | XX% | ❌ |
| Account B | $X,XXX | $X,XXX | XX% | ⚠️ |
| ... | ... | ... | ... | ... |
By Region:
| Region | Untagged Cost | % of Total Untagged |
|---|---|---|
| Region A | $X,XXX | XX% |
| Region B | $X,XXX | XX% |
| ... | ... | ... |
For each critical tag, show value distribution:
Environment Tag Distribution:
Team Tag Distribution:
Resources with Complete Tagging:
| Environment | Team | Application | Cost | Status |
|---|---|---|---|---|
| production | Team A | App X | $X,XXX | ✅ Fully Tagged |
| staging | Team B | App Y | $X,XXX | ✅ Fully Tagged |
Resources with Partial Tagging:
| Environment | Team | Application | Cost | Missing Tags |
|---|---|---|---|---|
| production | (untagged) | App X | $X,XXX | Team |
| (untagged) | Team A | App Y | $X,XXX | Environment |
Resources with No Tags:
| Account | Service | Cost |
|---|---|---|
| Account A | EC2 | $X,XXX |
| Account B | RDS | $X,XXX |
Inconsistent Values:
Invalid/Unclear Values:
Formatting Issues:
Historical Coverage:
| Month | Environment Tag | Team Tag | Overall |
|---|---|---|---|
| 3 months ago | XX% | XX% | XX% |
| 2 months ago | XX% | XX% | XX% |
| Last month | XX% | XX% | XX% |
| This month | XX% | XX% | XX% |
Trend Analysis:
Current State:
Business Impact:
If tagging improved to 95%:
Immediate Actions (High Priority):
Tag top 10 untagged resources - Would cover $X,XXX (XX% of untagged)
Fix Account [X] tagging - Worst offender with XX% untagged
Standardize Environment tag values - Consolidate X variations
Short-Term Actions (1-2 weeks):
Long-Term Actions (1-3 months):
For each account with poor tagging:
Account: [Account Name/ID]
Preventive Measures:
AWS Organizations Tag Policies
Automated Tagging
CI/CD Integration
Detective Measures:
Daily tagging reports
CloudZero alerts
For general cost analysis best practices, see ${CLAUDE_PLUGIN_ROOT}/references/best-practices.md
Some resources (data transfer, NAT gateways) serve multiple purposes.
Solution:
Marketplace or third-party charges may not support tags.
Solution:
Old resources created before tagging policies.
Solution:
Many variations of same concept.
Solution:
Create composite score:
Maturity Score = (
(Coverage % × 0.4) +
(Value Quality % × 0.3) +
(Multi-tag Coverage % × 0.2) +
(Enforcement Implementation % × 0.1)
)
Give more weight to expensive resources:
Weighted Coverage = Σ(Cost × Coverage) / Total Cost
Some tags depend on others:
Calculate how much cost cannot be attributed:
Attribution Gap = (Untagged Cost + Partial Tag Cost) / Total Cost
${CLAUDE_PLUGIN_ROOT}/references/best-practices.md - Universal cost analysis best practices${CLAUDE_PLUGIN_ROOT}/references/cloudzero-tools-reference.md - Complete tool documentation${CLAUDE_PLUGIN_ROOT}/references/error-handling.md - Troubleshooting and common errors${CLAUDE_PLUGIN_ROOT}/references/dimensions-reference.md - Dimension types and FQDIDs${CLAUDE_PLUGIN_ROOT}/references/cost-types-reference.md - When to use each cost type