Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/ga4-export-guardian

@0d57af8
Run it yourself

Investigate GA4 BigQuery export gaps, daily/intraday overlap and query scan risk from table-inventory and dry-run receipts. Use when exported days appear missing or a GA4 query may scan too much. Trigger with "missing GA4 BigQuery tables", "GA4 export delayed" or "check this GA4 query's scan budget".

  • 7 files
  • 40.6 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/ga4-export-guardian

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescollection-guide.md

≈933 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Bounded export evidence collection

The optional scripts/collect.py uses existing approved Application Default Credentials. It performs table metadata reads and, only when SQL is explicitly supplied in the plan, a dry run. It does not execute a query for results, call job.result(), create links, grant IAM or modify tables. The dependency is google-cloud-bigquery, obtained through the approved local environment. Without --live, it holds before importing the SDK or discovering credentials.

Provide this plan on stdin, replacing the fixture target with an authorized one:

{
  "project_id": "fixture-project",
  "property_id": "123456789",
  "dataset_id": "analytics_123456789",
  "property_time_zone": "UTC",
  "requested_window": {"start_date": "2026-10-01", "end_date": "2026-10-02"},
  "export_started_on": "2026-10-01",
  "daily_settlement_days": null
}
python3 "${CLAUDE_SKILL_DIR}/scripts/collect.py" --live < export-plan.json > export-receipt.json
python3 "${CLAUDE_SKILL_DIR}/scripts/inspect-export.py" export-receipt.json > export-investigation.json

Resolve installed helper paths first. The output contains business metadata and, when requested, SQL; redirect only to approved local paths. The script writes only stdout. Read failure/collection states before interpreting the analysis.

Listing is limited to 1,000 table entries in pages of at most 100. Only native export tables within the requested date window receive detailed metadata reads. The collector records that scope; snapshot_complete does not claim a snapshot of every table in the project. An additional entry is used solely to detect listing truncation. Metadata/permission/pagination/deadline gaps set completeness false and preserve available observations without inventing zero rows.

The collection deadline is 60 seconds, with per-request timeouts no greater than 20 seconds and automatic retries disabled. A listing page is not started when less than its fixed 20-second timeout remains. Credential setup precedes this deadline. The output limit is 2 MiB. Cloud changes during collection remain a source of uncertainty even after a listing completes.

To request a dry run, add exact sql text (at most 64 KiB) and a positive integer maximum_bytes_billed. Metadata-only collection requests the BigQuery read-only OAuth scope. Dry runs request the BigQuery scope and need existing jobs.create authority plus relevant dataset access; no permissions are granted automatically. Dataset location, permissions or unsupported SQL can cause a held dry run. Keep that result held and resolve the missing evidence rather than running the query.

The SDK request explicitly sets dry_run=True, Standard SQL, no query cache and the supplied byte cap, with request/job retries disabled. The SQL hash binds the exact UTF-8 text. The receipt labels its normalization: configuration comes from QueryJob.to_api_repr(), while statistics/status come from public SDK properties because that serializer omits server result statistics. Estimate accuracy remains unknown when the SDK does not expose it. Do not invent precision.

A dry-run collection failure remains held-collection in the diagnostic output. A successful dry run still does not approve real execution or a monetary budget: processed bytes do not establish billed bytes, minimum billing or rounding.

Development checks use synthetic transports and actual SDK model objects. They do not contact a cloud project, discover ADC or demonstrate live permissions.

Primary sources: BigQuery dry runs, BigQuery Job resource.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
What it can do
Reads files Runs commands
version
2.0.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "ga4",
  "bigquery",
  "export",
  "data-quality",
  "cost"
]
All 2 allowed tools
ReadBash(python3:*)
Other metadata
compatibility
Python 3.10+ and IANA timezone data; optional collection requires google-cloud-bigquery and existing approved ADC.
argument-hint
[export-receipt.json]

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/ga4-export-guardian