ga4
Skill159 starsChanged 6 months agoMITView on GitHub
Run production Google Analytics 4 Data API reports with gateway-injected bearer auth, safe request review, traffic source, landing-page, time-series, revenue, session, and key-event reporting.
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Use this skill for Google Analytics 4 reporting through the Google Analytics Data API: sessions, key events, revenue, traffic-source …
- Very specific: line 49
run GA4 runReport requests for a configured property
- Distinctive: line 56
keep auth-mode selection in tenant/runtime config, not in prompt logic
- Very specific: line 61
Start with report-plan for natural-language requests unless the user already supplied a GA4 Data API request JSON.
- Very specific: line 67
Use the helper for offline planning/review and for gateway-proxied execution when http_request is unavailable:
- Distinctive: line 72
Treat all GA4 operations in this skill as read-only.
- Distinctive: line 85
Default delegated-user OAuth handle:
- Very specific: line 118
Do not paste OAuth access tokens, refresh tokens, service-account private keys, or downloaded JSON key files into the prompt.
- Distinctive: line 155
Run a report through the gateway helper path:
- Distinctive: line 162
Use service-account auth by choosing the stored service-account secret names:
- Distinctive: line 185
Run the bundled eval suite:
- Very specific: line 193
Use numeric GA4 property ids.
- Very specific: line 195
Use keyEvents for conversion-style reporting unless the user explicitly requests a custom event metric.
- Distinctive: line 202
Ask for clarification when the request names a quarter without a year.
- Distinctive: line 203
Do not add Admin API writes to this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GA4
Use this skill for Google Analytics 4 reporting through the Google Analytics Data API: sessions, key events, revenue, traffic-source breakdowns, landing-page breakdowns, time-series queries, ad-hoc analyst reads, dashboards, scheduled reporting, ETL, and monitoring.
Scope
- run GA4
runReportrequests for a configured property - translate common English analyst requests into reviewable Data API payloads
- review GA4 request JSON before execution
- build traffic-source, channel-group, landing-page, daily trend, revenue, session, user, and key-event reports
- support delegated-user OAuth and service-account auth through the same gateway bearer handle contract
- keep auth-mode selection in tenant/runtime config, not in prompt logic
- measure skill run cost through normal HybridClaw
UsageTotals
Default Workflow
- Start with
report-planfor natural-language requests unless the user already supplied a GA4 Data API request JSON. - Review generated or user-supplied request JSON with
review-requestbefore a live call. - For live GA4 API calls inside HybridClaw, use
http_requestdirectly when available. Pass the emittedhttpRequestobject from the helper to the tool. - Use the helper for offline planning/review and for gateway-proxied execution
when
http_requestis unavailable:python3 skills/ga4/scripts/ga4.py ... - Treat all GA4 operations in this skill as read-only. Do not attempt Admin API mutations, property access changes, key-event changes, or tag changes.
Auth Contract
The skill supports two auth modes without exposing tokens or private keys to the model:
- delegated-user OAuth through a bearer secret handle
- Google service-account JWT bearer exchange through the gateway
Tenant config decides which mode to use.
Default delegated-user OAuth handle:
hybridclaw auth login google \
--client-id "<google-oauth-client-id>" \
--client-secret "<google-oauth-client-secret>" \
--account you@example.com \
--scopes "https://www.googleapis.com/auth/analytics.readonly"
hybridclaw auth status googleFor delegated OAuth, use the default bearerSecretName:
"GOOGLE_WORKSPACE_CLI_TOKEN" or a google-oauth URL auth route.
For service-account automation, store the service-account client_email and
PEM private_key as encrypted runtime secrets. The gateway reads those named
secrets, signs the JWT assertion server-side, exchanges it for a short-lived
Google access token, and injects that token into the GA4 request.
Set or update those secrets in this order:
- Browser admin: open the active HybridClaw admin URL ending in
/admin/secrets. - Browser
/chator TUI fallback:/secret set GA4_SERVICE_ACCOUNT_EMAIL "<client-email>"and/secret set GA4_SERVICE_ACCOUNT_PRIVATE_KEY "<pem-private-key>". - Local console fallback:
hybridclaw secret set GA4_SERVICE_ACCOUNT_EMAIL "<client-email>"
hybridclaw secret set GA4_SERVICE_ACCOUNT_PRIVATE_KEY '<pem-private-key>'Do not paste OAuth access tokens, refresh tokens, service-account private keys, or downloaded JSON key files into the prompt. Real credentials stay in the HybridClaw secret runtime and are used server-side by the gateway.
Optional stored defaults use the same setup order: browser admin at
/admin/secrets, then /secret set in browser /chat or
TUI, then local console fallback.
hybridclaw secret set GA4_PROPERTY_ID "<numeric-property-id>"
hybridclaw secret set GA4_BEARER_SECRET_NAME "GOOGLE_WORKSPACE_CLI_TOKEN"For unattended service-account jobs, set environment defaults in the tenant runtime:
GA4_SERVICE_ACCOUNT_EMAIL_SECRET=GA4_SERVICE_ACCOUNT_EMAIL
GA4_SERVICE_ACCOUNT_PRIVATE_KEY_SECRET=GA4_SERVICE_ACCOUNT_PRIVATE_KEYCommand Contract
Plan a report from natural language:
python3 skills/ga4/scripts/ga4.py --format json report-plan \
"Show me last week's organic conversions vs the prior week"Build an http_request payload for a planned or hand-written request:
python3 skills/ga4/scripts/ga4.py --format json http-request 123456789 \
--request-json '{"dateRanges":[{"startDate":"7daysAgo","endDate":"yesterday"}],"dimensions":[{"name":"date"}],"metrics":[{"name":"sessions"}],"limit":25}'Run a report through the gateway helper path:
python3 skills/ga4/scripts/ga4.py --format json run-report 123456789 \
--request-json '{"dateRanges":[{"startDate":"7daysAgo","endDate":"yesterday"}],"metrics":[{"name":"sessions"}]}'Use service-account auth by choosing the stored service-account secret names:
python3 skills/ga4/scripts/ga4.py --format json http-request 123456789 \
--google-service-account-email-secret GA4_SERVICE_ACCOUNT_EMAIL \
--google-service-account-private-key-secret GA4_SERVICE_ACCOUNT_PRIVATE_KEY \
--request-json '{"dateRanges":[{"startDate":"7daysAgo","endDate":"yesterday"}],"metrics":[{"name":"sessions"}]}'Review request JSON offline:
python3 skills/ga4/scripts/ga4.py --format json review-request \
'{"dateRanges":[{"startDate":"30daysAgo","endDate":"yesterday"}],"dimensions":[{"name":"landingPagePlusQueryString"}],"metrics":[{"name":"sessions"},{"name":"totalRevenue"}],"limit":25}'Emit the analyst-query prompt-template payload:
python3 skills/ga4/scripts/ga4.py --format json prompt-template \
"Daily sessions and revenue for the last 30 days"Run the bundled eval suite:
python3 skills/ga4/scripts/ga4.py --format json eval-scenariosWorking Rules
- Use numeric GA4 property ids. Accept
properties/<id>input, but normalize it before API calls. - Use
keyEventsfor conversion-style reporting unless the user explicitly requests a custom event metric. - Use
sessionDefaultChannelGroup,sessionSourceMedium,landingPagePlusQueryString, anddatefor the common production breakdowns before reaching for custom dimensions. - Include a row limit. Default to 25 for ad-hoc reports and increase only when the user asks for an export or ETL-sized result.
- Ask for clarification when the request names a quarter without a year.
- Do not add Admin API writes to this skill. A separate admin skill would need explicit approval tiers and boundary tests.
Eval Suite
The bundled scenarios cover 25 representative analyst requests across sessions, key events, revenue, traffic source, landing page, time series, comparisons, ecommerce, geographic, device, and safety/clarification cases.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- abouchard11/midnight-seo-skills★ 1same name
- arcbaslow/google-analytics-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository91 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/llm-wiki/templates/AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 1passwordSkill
- agentic-tpmSkill
- airtableSkill
- alexaSkill
- apple-calendarSkill
- apple-musicSkill
- apple-passwordsSkill
- bahnSkill
- blinkSkill
- bookingSkill
- brand-voiceSkill
- byd-batterySkill
- channel-catchupSkill
- code-reviewSkill
- code-simplificationSkill
- current-timeSkill
- diagramSkill
- discordSkill
- distil-pii-redactorSkill
- docxSkill
- download-platform-invoicesSkill
- excalidrawSkill
- fastbillSkill
- fax-sendSkill
- feature-planningSkill
- firecrawlSkill
- froniusSkill
- gh-issuesSkill
- github-pr-workflowSkill
- gogSkill
- google-adsSkill
- google-workspaceSkill
- gwsSkill
- handoff-linksSkill
- hermes3000-writingSkill
- hetzner-cloudSkill
- hetzner-dnsSkill
- hetzner-storage-boxSkill
- heygenSkill
- homematicSkill
- hubspotSkill
- hueSkill
- human-distillSkill
- hybridclaw-helpSkill
- image-generationSkill
- inbox-cleanupSkill
- iss-positionSkill
- langfuseSkill
- lexware-officeSkill
- llm-wikiSkill
- mailchimpSkill
- manim-videoSkill
- microsoft-365Skill
- miroSkill
- mittwaldSkill
- money-savingSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

