agentleFS
0-shiv0-shiv/secondstep-claude-skills/skills/ga4-audit-claude/CLAUDE.md

secondstep-claude-skills / ga4-audit-claude

CLAUDE.md2 starsChanged 9 months agoMITView on GitHub

This is a Claude Code skill that performs comprehensive audits of Google Analytics 4 properties. It evaluates 10 audit dimensions and produces a GA4 Health Score (0-100) with actionable fix recommendations. All commands are prefixed with /ga4: The Health Score (0-100) uses weighted scoring across 8 dimensions. E-commerce and non-e-commerce properties use different weight distributions. See scripts/health_score.py for the implementation.

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All commands are prefixed with /ga4:

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

GA4 Audit Claude Skill — Project Guide

Overview

This is a Claude Code skill that performs comprehensive audits of Google Analytics 4 properties. It evaluates 10 audit dimensions and produces a GA4 Health Score (0-100) with actionable fix recommendations.

Architecture

ga4-audit-claude/
├── SKILL.md                    # Main skill router — maps /ga4 commands to sub-skills
├── skills/                     # 10 sub-skill definitions (one per audit dimension)
│   ├── ga4-data-streams/       # Stream config, enhanced measurement, filters
│   ├── ga4-events/             # Event coverage, naming, parameter validation
│   ├── ga4-conversions/        # Conversion setup, counting method, Ads import
│   ├── ga4-audiences/          # Audience creation, predictive, Ads export
│   ├── ga4-attribution/        # Model selection, lookback windows
│   ├── ga4-ecommerce/          # Purchase funnel events, revenue tracking
│   ├── ga4-custom-dimensions/  # Dimension registration, quota usage
│   ├── ga4-reporting/          # Reports and explorations
│   ├── ga4-integrations/       # Google product linking (Ads, SC, BQ)
│   └── ga4-report/             # Final report compilation
├── agents/                     # Agent definitions for orchestration
│   ├── audit-orchestrator.md   # Full audit flow coordinator
│   ├── event-validator.md      # Event naming and parameter checks
│   ├── ecommerce-debugger.md   # E-commerce funnel debugging
│   └── report-generator.md     # Report compilation and formatting
├── scripts/                    # Python utilities
│   ├── health_score.py         # Health Score calculator (weighted scoring)
│   ├── event_validator.py      # Event naming convention validator
│   └── report_generator.py     # Audit report generator
├── docs/                       # Reference documentation
│   ├── ga4-event-reference.md  # Complete GA4 event reference
│   ├── audit-methodology.md    # Audit methodology details
│   └── common-issues.md        # Common GA4 misconfigurations
└── templates/                  # Report output templates (future)

Commands

All commands are prefixed with /ga4:

CommandWhat It Does
/ga4 auditFull audit — runs all 10 dimensions in sequence
/ga4 streamsAudit data stream configuration
/ga4 eventsAudit event implementation and naming
/ga4 conversionsAudit conversion event setup
/ga4 audiencesAudit audience configuration
/ga4 attributionAudit attribution model settings
/ga4 ecommerceAudit e-commerce event implementation
/ga4 dimensionsAudit custom dimension registration
/ga4 reportingAudit report and exploration setup
/ga4 integrationsAudit Google product integrations
/ga4 reportGenerate the final scored audit report

Health Score Calculation

The Health Score (0-100) uses weighted scoring across 8 dimensions. E-commerce and non-e-commerce properties use different weight distributions. See scripts/health_score.py for the implementation.

Development Rules

  1. Skill files are markdown — Each sub-skill lives in skills/<name>/SKILL.md. These files define the audit checklist, scoring criteria, and output format for that dimension.
  2. Snake_case for GA4 events — Always reference GA4 events in snake_case (e.g., add_to_cart, not AddToCart).
  3. Audit output format — All audit findings must follow the standard format defined in the main SKILL.md: passed checks, failed checks (with impact/current/recommended/fix), and warnings.
  4. Python scripts — Located in scripts/. Require Python 3.8+. No external dependencies beyond the standard library (json, argparse, sys, typing).
  5. Agent definitions — Located in agents/. Each agent markdown file defines the agent's role, capabilities, and orchestration rules.
  6. Do not modify SKILL.md routing — The main SKILL.md maps commands to sub-skills. Changes to routing should be deliberate and reflected in README.md.
  7. Testing — Run python scripts/health_score.py --scores '{"events": 80, "conversions": 65}' --json to verify the scoring calculator works.

Running Python Scripts

# Health Score Calculator
python scripts/health_score.py --interactive
python scripts/health_score.py --scores '{"events": 80, "conversions": 65, "data_streams": 90}'
python scripts/health_score.py --file audit_results.json --json

# Event Validator
python scripts/event_validator.py

# Report Generator
python scripts/report_generator.py

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.