Skip to content

Commit a85c464

Browse files
anandgupta42claude
andcommitted
fix: update cost-report skill to use finops tools instead of removed predict/feedback tools
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fd4545f commit a85c464

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • .altimate-code/skills/cost-report

.altimate-code/skills/cost-report/SKILL.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Analyze Snowflake query costs and identify optimization opportuniti
77

88
## Requirements
99
**Agent:** any (read-only analysis)
10-
**Tools used:** sql_execute, sql_analyze, sql_predict_cost, sql_record_feedback
10+
**Tools used:** sql_execute, sql_analyze, finops_analyze_credits, finops_expensive_queries, finops_warehouse_advice
1111

1212
Analyze Snowflake warehouse query costs, identify the most expensive queries, detect anti-patterns, and recommend optimizations.
1313

@@ -47,7 +47,6 @@ Analyze Snowflake warehouse query costs, identify the most expensive queries, de
4747

4848
3. **Analyze the top offenders** - For each of the top 10 most expensive queries:
4949
- Run `sql_analyze` on the query text to detect anti-patterns (SELECT *, missing LIMIT, cartesian products, correlated subqueries, etc.)
50-
- Run `sql_predict_cost` to get the cost tier prediction based on historical feedback data
5150
- Summarize anti-patterns found and their severity
5251

5352
4. **Classify each query into a cost tier**:
@@ -59,8 +58,7 @@ Analyze Snowflake warehouse query costs, identify the most expensive queries, de
5958
| 3 | $1.00 - $100.00 | Expensive | Optimize or review warehouse sizing |
6059
| 4 | > $100.00 | Dangerous | Immediate review required |
6160

62-
5. **Record feedback** - For each query analyzed, call `sql_record_feedback` to store the execution metrics so future predictions improve:
63-
- Pass `bytes_scanned`, `execution_time_ms`, `credits_used`, and `warehouse_size` from the query history results
61+
5. **Warehouse analysis** - Run `finops_warehouse_advice` to check if warehouses used by the top offenders are right-sized.
6462

6563
6. **Output the final report** as a structured markdown document:
6664

@@ -97,7 +95,7 @@ Analyze Snowflake warehouse query costs, identify the most expensive queries, de
9795
2. Add LIMIT clause
9896
3. Consider partitioning strategy
9997
100-
**Cost prediction:** Tier 1 (fingerprint match, high confidence)
98+
**Cost tier:** Tier 1 (based on credits used)
10199
102100
...
103101
@@ -113,4 +111,4 @@ The user invokes this skill with:
113111
- `/cost-report` -- Analyze the last 30 days
114112
- `/cost-report 7` -- Analyze the last 7 days (adjust the DATEADD interval)
115113

116-
Use the tools: `sql_execute`, `sql_analyze`, `sql_predict_cost`, `sql_record_feedback`.
114+
Use the tools: `sql_execute`, `sql_analyze`, `finops_analyze_credits`, `finops_expensive_queries`, `finops_warehouse_advice`.

0 commit comments

Comments
 (0)