Agent skill

bigquery-local

BigQuery local additions - cost-aware query patterns and project conventions. Supplements general BigQuery knowledge with guardrails. Use when: - Running bq commands - Writing GoogleSQL queries - Designing partitioned/clustered tables

Stars 9
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/i9wa4/dotfiles/tree/main/nix/home-manager/agents/skills/bigquery-local

SKILL.md

BigQuery Local Skill

Project-specific BigQuery conventions. Standard GoogleSQL syntax, bq CLI usage, JOIN patterns, window functions, BQML, and external tables are assumed knowledge.

1. Cost Guardrails

  • YOU MUST: Use --dry_run before large queries
  • YOU MUST: Avoid SELECT *; specify columns explicitly
  • YOU MUST: Always filter on partition columns
  • IMPORTANT: Partition pruning fails when functions wrap the partition column
    • Bad: WHERE DATE(created_at) = '2024-01-01'
    • Good: WHERE created_at >= '2024-01-01' AND created_at < '2024-01-02'
  • IMPORTANT: Use APPROX_COUNT_DISTINCT over COUNT(DISTINCT) when exact counts are not required

2. Table Design Conventions

  • Combine partitioning (date) + clustering (up to 4 high-cardinality columns)
  • Set require_partition_filter = TRUE on large tables
  • Put smaller table on right side of JOIN (broadcast optimization)

3. Pricing Reference

  • On-demand: $5/TB scanned
  • Storage: Active $0.02/GB, Long-term $0.01/GB

4. Slot Usage Check

sql
SELECT
  job_id,
  total_bytes_processed,
  total_slot_ms,
  TIMESTAMP_DIFF(end_time, start_time, SECOND) AS duration_sec
FROM `region-us`.INFORMATION_SCHEMA.JOBS
WHERE creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY)
ORDER BY total_slot_ms DESC
LIMIT 10;

5. Reference Links

Expand your agent's capabilities with these related and highly-rated skills.

i9wa4/dotfiles

subagent-review

Argument-driven code/design review wrapper. Invokes reviewer sub-skills for each specified engine+tier label. Defaults to 'cc cx' (10 reviewers) if no arguments given. Argument format: space-separated labels from {cc, cc-deep, cx, cx-deep} Examples: 'cc cx' (default), 'cc-deep cx-deep', 'cc', 'cx-deep' Use when: - Running code reviews on PRs, commits, or branches - Running design reviews on issues or documents - Need multi-perspective review (security, architecture, code, QA, historian)

9 0
Explore
i9wa4/dotfiles

brainstorming

Ambiguity-reduction workflow for requests that are not yet plan-ready or implementation-ready. Use when there are multiple plausible approaches, the task is user-facing or design-shaping, requirements are fuzzy, or Codex needs to compare 2-3 options with trade-offs before choosing a direction.

9 0
Explore
i9wa4/dotfiles

databricks-local

Databricks local additions - Queries API, VARIANT/JSON, Dashboard API, dbt integration, Jupyter kernel Supplements the official `databricks` skill with project-specific patterns. Use when: - Working with Databricks Queries API (saved queries) - Handling VARIANT type or JSON operations - Working with Lakeview Dashboard API - Integrating dbt with Databricks JSON/VARIANT columns - Running Jupyter notebooks with Databricks kernel

9 0
Explore
i9wa4/dotfiles

codex-prompting-local

Portable Codex prompt, review-contract, and resume-handoff guidance adapted from codex-plugin-cc for this repo's Nix-managed Codex CLI and Claude Code setup. Use when: - Composing prompts for Codex or GPT-5.4-based subagents - Designing structured review or adversarial-review prompt contracts - Writing resumable task prompts or result handoffs - Re-expressing useful old slash-command workflows on the skills side instead of reviving slash commands

9 0
Explore
i9wa4/dotfiles

nix

Nix commands and package management guide. Use when: - Using nurl for hash acquisition

9 0
Explore
i9wa4/dotfiles

tmux

tmux pane operations guide for debugging and monitoring separate panes Use when: - Sending commands to another tmux pane - Capturing output from another tmux pane - Monitoring long-running commands in separate panes - Debugging devcontainer build/up operations - Working with multiple panes in parallel

9 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results