From cost-analyst
Performs detailed analysis of specific cloud service costs, breaking down by usage types, resources, regions, accounts, and identifying service-specific optimization opportunities like rightsizing, Reserved Instances, or configuration changes
npx claudepluginhub cloudzero/cloudzero-claude-marketplace --plugin cost-analystThis skill uses the workspace's default tool permissions.
This skill provides comprehensive, detailed analysis of a specific cloud service's costs, breaking it down by all relevant dimensions and identifying service-specific optimization opportunities.
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
Analyzes AWS costs, identifies savings, manages budgets, evaluates Savings Plans/Reserved Instances, right-sizes EC2/Lambda/RDS/EBS via Compute Optimizer, queries CUR with Athena, detects anomalies, scopes to billing views, monitors Free Tier.
Share bugs, ideas, or general feedback.
This skill provides comprehensive, detailed analysis of a specific cloud service's costs, breaking it down by all relevant dimensions and identifying service-specific optimization opportunities.
This skill builds on the understand-cloudzero-organization skill.
Before applying this procedure:
Determine which service to analyze:
# If user mentions service name, find exact FQDID
get_available_dimensions(filter="Service")
# Get all dimension values to find exact match
get_dimension_values(dimension="CZ:Service", match="[user's service name]")
Get high-level view of the service:
Total Service Cost:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
cost_type="real_cost"
)
Service Cost Trend:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
granularity="daily",
cost_type="real_cost"
)
Calculate:
Break down service costs by all relevant dimensions:
By Account:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Account"],
limit=20
)
By Region:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Region"],
limit=20
)
By Account and Region:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Account", "CZ:Region"],
limit=50
)
By Usage Type (if available):
# Discover if usage type dimension exists
get_available_dimensions(filter="UsageType")
# If available, group by it
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:UsageType"],
limit=50
)
By Resource (if available):
# Discover if resource dimension exists
get_available_dimensions(filter="Resource")
# If available, get top resources
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Resource"],
limit=50
)
Understand how service is used across environments and teams:
By Environment:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Tag:Environment"],
limit=10
)
By Team (if tagged):
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Tag:Team"],
limit=20
)
By Application (if tagged):
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["CZ:Tag:Application"],
limit=20
)
Use organization-specific dimensions:
# Discover custom dimensions
get_available_dimensions(filter="User:Defined")
# Analyze by custom dimensions
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
group_by=["User:Defined:Team"],
limit=20
)
Identify resources without proper tagging:
# Look for costs that don't have environment tags
get_cost_data(
filters={
"CZ:Service": ["[service_name]"],
"CZ:Tag:Environment": [""] # Empty/untagged
},
group_by=["CZ:Account", "CZ:Region"],
limit=50
)
Understand usage patterns:
Hourly patterns (if looking at short period):
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
granularity="hourly",
date_range="last 7 days"
)
Daily patterns:
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
granularity="daily",
date_range="last 90 days"
)
Identify:
For Compute Services (EC2, ECS, EKS, Lambda):
For Storage Services (S3, EBS, EFS):
For Database Services (RDS, DynamoDB, Redshift):
For Data Transfer:
For Serverless (Lambda, API Gateway):
Compare different cost perspectives:
# Real cost (default)
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
cost_type="real_cost"
)
# On-demand cost (to calculate savings)
get_cost_data(
filters={"CZ:Service": ["[service_name]"]},
cost_type="on_demand_cost"
)
Calculate effective savings rate:
Savings Rate = ((On-Demand Cost - Real Cost) / On-Demand Cost) * 100
Provide comprehensive service analysis:
Total Cost: $X,XXX Time Period: [dates] Daily Average: $XXX Trend: [Growing/Stable/Declining] Growth Rate: X% [MoM/WoW]
Cost Distribution:
By Region:
| Region | Cost | % of Service | Key Resources |
|---|---|---|---|
| us-east-1 | $X,XXX | XX% | [Details] |
| us-west-2 | $X,XXX | XX% | [Details] |
| ... | ... | ... | ... |
Insights:
By Account:
| Account | Cost | % of Service | Trend |
|---|---|---|---|
| Account A | $X,XXX | XX% | +X% |
| Account B | $X,XXX | XX% | -X% |
| ... | ... | ... | ... |
Insights:
By Usage Type / Resource Type:
| Type | Cost | % of Service | Notes |
|---|---|---|---|
| Type A | $X,XXX | XX% | [Details] |
| Type B | $X,XXX | XX% | [Details] |
| ... | ... | ... | ... |
Insights:
By Environment:
By Team/Application:
Tagging Issues:
Time-Based Patterns:
Trend Analysis:
[Customize based on service type]
For Compute (EC2 example):
For Storage (S3 example):
For Databases (RDS example):
Current Savings (if using RIs/SPs):
Additional Savings Potential:
Total Potential Savings: $[Sum]/month (XX% reduction)
Immediate Actions (Quick Wins):
Short-Term Actions (1-2 weeks):
Long-Term Actions (1-3 months):
Monitoring and Governance:
Industry Benchmarks:
Optimization Maturity:
For general cost analysis best practices, see ${CLAUDE_PLUGIN_ROOT}/references/best-practices.md
Key Dimensions:
Key Questions:
Key Dimensions:
Key Questions:
Key Dimensions:
Key Questions:
Key Dimensions:
Key Questions:
Compare service costs to its own historical patterns:
Create composite score based on:
Model potential optimizations:
Compare service usage across:
${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