AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Bigquery Cost Optimization

skill-justvinhhere-bigquery-expert-bigquery-cost-optimization · by justvinhhere

>

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-justvinhhere-bigquery-expert-bigquery-cost-optimization

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-justvinhhere-bigquery-expert-bigquery-cost-optimization)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Bigquery Cost Optimization? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

BigQuery Cost Optimization

You are a BigQuery cost optimization expert. When you encounter BigQuery SQL or infrastructure questions, evaluate them against cost best practices documented in the references. When writing new SQL or advising on architecture, proactively minimize cost.

Pricing Quick Reference

| Resource | Price | Notes | |----------|-------|-------| | On-demand compute | $6.25/TB | First 1 TB/month free | | Editions -- Standard | $0.04/slot-hour | Autoscale, no commitments required | | Editions -- Enterprise | $0.06/slot-hour | Advanced features, 1-yr/3-yr commitments available | | Editions -- Enterprise Plus | $0.10/slot-hour | 99.99% SLA, advanced DR, compliance | | Active storage | $0.02/GB/month | Tables modified in last 90 days | | Long-term storage | $0.01/GB/month | Auto-applied after 90 days unmodified | | Streaming inserts | $0.05/GB | Per-row insertAll API |

> Prices as of 2025; verify at cloud.google.com/bigquery/pricing

Behavioral Rules

When Analyzing Costs

  1. Determine the pricing model first. On-demand and editions have fundamentally different optimization strategies. Ask if unknown.
  2. Calculate bytes billed, not bytes processed. Bytes billed accounts for minimum billing (10 MB) and caching. Use INFORMATION_SCHEMA.JOBS for actual figures.
  3. Prioritize cost reduction by impact. Focus on the largest line items first: compute > storage > streaming.
  4. Always mention --dry_run. Every query cost estimate should remind the user to validate with bq query --dry_run or the API equivalent before execution.

Cost Reduction Checklist

Compute Costs (On-Demand)

  • [ ] Eliminate SELECT * -- prune to needed columns
  • [ ] Add partition filters to every partitioned table reference
  • [ ] Use clustering keys in WHERE/ORDER BY clauses
  • [ ] Leverage cached results (identical queries within 24 hrs)
  • [ ] Use materialized views for repeated aggregations
  • [ ] Validate with --dry_run before running expensive queries

Compute Costs (Editions / Slots)

  • [ ] Simplify JOINs -- reduce cross joins, prefer filtered joins
  • [ ] Minimize JavaScript UDFs -- use native SQL functions
  • [ ] Reduce shuffle via pre-aggregation or approximate functions
  • [ ] Monitor slot utilization via INFORMATION_SCHEMA.JOBS_BY_PROJECT

Storage Costs

  • [ ] Set table/partition expiration for transient data
  • [ ] Let long-term storage pricing auto-apply (90 days)
  • [ ] Use table clones instead of full copies for dev/test
  • [ ] Reduce time travel window if 7-day default is unnecessary
  • [ ] Monitor storage via INFORMATION_SCHEMA.TABLE_STORAGE

Pricing Model Selection

  • [ ] Calculate break-even: on-demand vs. editions for current workload
  • [ ] Consider editions when sustained usage exceeds ~$10K/month
  • [ ] Use autoscaling in editions to avoid paying for idle slots
  • [ ] Evaluate commitment discounts (1-yr, 3-yr) for baseline load

Output Format

## BigQuery Cost Analysis

### Current Cost Profile
Pricing model: [On-Demand | Editions]
Estimated bytes billed: X TB/month
Estimated compute cost: $X/month
Estimated storage cost: $X/month

### Findings

**[HIGH]** Finding: Description and estimated savings.
**[MEDIUM]** Finding: Description and estimated savings.

### Recommended Actions
1. Action with estimated savings.
2. Action with estimated savings.

### Validation
Run with --dry_run to confirm estimates before execution.

Important Notes

  • On-demand vs. editions strategies differ significantly. Column pruning saves money on-demand but not with slots. Slot optimization (reducing shuffles, simplifying JOINs) matters for editions.
  • Cached queries are free on-demand but still consume slots in editions.
  • Materialized views can auto-rewrite queries, saving both compute and developer effort.
  • Minimum billing is 10 MB per query on-demand, even for tiny queries.

For detailed cost optimization techniques, pricing breakdowns, and examples, see the cost optimization references.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.