ivanshamaev/de-agent-skills/aiops-query-cost-analyzer
Claude Code and agent skill by ivanshamaev/de-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
AIOps autonomous query cost analyzer — Trino system.runtime.query_history cost SQL (CPU time/peak memory/bytes scanned), ClickHouse system.query_log top expensive queries, Spark UI cost attribution by user/job/DAG, BigQuery INFORMATION_SCHEMA.JOBS cost analysis, LLM-driven query rewrite recommendations (missing partition filters/broadcast hints/aggregation pushdown), cost anomaly detection (user over daily budget), automated query tagging, chargeback report by team/project
Install
npx vskill@latest install ivanshamaev/de-agent-skills/aiops-query-cost-analyzerSKILL.md
The same SKILL.md was published earlier as ivanshamaev/de-agent-skills/aiops-query-cost-analyzer.
AIOps Query Cost Analyzer
When to Use
- Identifying which queries consume the most resources on Trino/ClickHouse/Spark
- Automatically recommending query optimizations based on execution patterns
- Enforcing per-user or per-team query cost budgets
- Generating cost chargeback reports broken down by team/project/DAG
- Detecting query cost regressions after code deployments
Trino Query Cost Analysis
ClickHouse Query Cost Analysis
LLM-Driven Query Rewrite Agent
{query}
Cost Anomaly Detection
Cost Chargeback Report
Anti-Patterns
- Cost analysis only on failed queries — expensive queries often succeed but consume disproportionate resources; analyze all finished queries, not just errors.
- No query tagging —
SELECT *from user "john" is impossible to attribute; enforceSET SESSION query_tag = 'dag=etl_orders,task=load_orders'in all pipeline queries. - Optimizing the wrong queries — a 10-second query run 10,000× per day costs more than a 10-minute query run once; optimize by total cost, not worst single query.
- LLM rewrites without testing — auto-applying LLM-suggested rewrites without running EXPLAIN first can change semantics; require human review for rewrite approval.
- Chargeback without optimization help — showing teams their costs without providing optimization guidance creates finger-pointing; pair chargeback with self-service optimization tips.
References
- Trino system tables:
trino.io/docs/current/connector/system.html - ClickHouse query_log:
clickhouse.com/docs/en/operations/system-tables/query_log - BigQuery INFORMATION_SCHEMA.JOBS:
cloud.google.com/bigquery/docs/information-schema-jobs - Related skills:
[[de-cost-optimization]],[[trino-iceberg]],[[clickhouse-olap]],[[aiops-infrastructure-anomaly-detection]]
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggroup_skills/infra_dataops_group_skills/aiops_query_cost_analyzer/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ivanshamaev/de-agent-skills/aiops-query-cost-analyzer)