ga4-context

ga4-context is a command for Claude Code from ivanovzlatan2/data-arsenal-v1. It costs 12 tokens per session (2,161 once invoked), scanned A, original, MIT.

A command for building or updating background information about a business and its website so Google Analytics 4 (GA4) results can be interpreted in context.

In plain words
What is it for?
Use it to collect website details, save structured and readable context, and maintain project files used by GA4 audits and briefings.
Why use it?
Analytics numbers are easier to understand when the analyst knows what the business does and what its website is meant to achieve.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the data-arsenal plugin — 5 commands shipped together

Good fit Use it to collect website details, save structured and readable context, and maintain project files used by GA4 audits and briefings.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ivanovzlatan2/data-arsenal-v1/ga4-context
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ivanovzlatan2/data-arsenal-v1

Made for: Claude Code.

Or install data-arsenal, the plugin that ships this one along with the rest of its 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ga4-context

README.md
[![agentmods](https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-context/github.svg)](https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-context)
Your own site
<a href="https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-context"><img src="https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-context/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ga4-context

Your own site · 80×15
<a href="https://agentmods.dev/commands/ivanovzlatan2/data-arsenal-v1/ga4-context"><img src="https://agentmods.dev/badge/commands/ivanovzlatan2/data-arsenal-v1/ga4-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,161 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.02161
Opus 5 $0.00006 $0.01081
Sonnet 5 $0.00002 $0.00432
Haiku 4.5 $0.00001 $0.00216

Measured 10d ago against content hash cd7b7ba0b5a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ga4-context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/ga4-context.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ga4-context - Website-First Context Builder

Creates a project with business context by auto-extracting information from the client's website first, then validating and filling gaps with minimal interaction.

Usage

/ga4-context [client_name] [url]

Project Structure

Projects are stored at ~/.config/data-arsenal/projects/<slug>/. Each project contains:

  • config.json — Structured business context (machine-readable)
  • context.md — Narrative context with enrichment (human-readable)
  • data-quality.json — Last audit results (written by /ga4-audit)
  • briefing-log.json — History of past briefings (written by /ga4-brief)
  • reports/ — Generated PDFs

Steps

Step 0: Language check

Read ~/.config/data-arsenal/config.json. Check the language key.

  • If language is set → use that language for all commentary and questions. Data labels and GA4 metric names stay in English.
  • If language is NOT set (first run) → output as plain text (NOT AskUserQuestion): "What language should I use? (English / Bulgarian / other)" Wait for the user to type their response naturally (e.g., "bg", "Bulgarian", "english"). Interpret the response and save to ~/.config/data-arsenal/config.json so it's never asked again.

All subsequent output uses the chosen language.

Step 1: Initial info

If client_name and url were provided as arguments, use them. Otherwise output as plain text (NOT AskUserQuestion):

"Please provide:

  1. Client/project name
  2. Website URL"

Wait for the user to type both in one message. Parse the response naturally.

Slugify the project name (lowercase, hyphens, no special chars).

mkdir -p ~/.config/data-arsenal/projects/<slug>/reports

If ~/.config/data-arsenal/projects/<slug>/config.json already exists, ask: "Project exists. Update existing context or start fresh?"

Step 2: AUTO-EXTRACT from website

Before asking any business questions, WebFetch the homepage URL. Extract everything possible:

Do NOT report on tracking tags (GTM, GA4, Meta Pixel, Facebook Pixel, LinkedIn, TikTok, etc.) or consent banners (CookieBot, OneTrust, etc.). WebFetch returns raw HTML which misses dynamically-loaded tags, producing false negatives that mislead users. Skip any tracking/consent analysis entirely.

Read the full file on GitHub · 191 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 191 lines · 12 tokens per session scan A cd7b7ba0b5a2

Subscribe to this mod's changes

ga4-context is a command published in the GitHub repository ivanovzlatan2/data-arsenal-v1 (5 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 2,161 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.