marketerswiki
HomeCourses
Resources
marketerswiki

The open playbook for performance marketers who build with AI.

Resources

  • Playbooks
  • Claude Code Guide
  • Vibecoding

Legal

  • About
  • Privacy Policy
  • Terms of Service

© 2026 marketers wiki. All rights reserved.

Built withClaude Code
Back to GTM Automation

How These Skills Work Together

A practical guide to using the GTM automation skills: how they connect, tips for getting the best results, and how to keep skills up to date.

The Core Concept: Files Are the Bridge

Skills do not share memory. Each skill starts with a blank slate. What connects them is the files they produce and consume.

Skill 1 writes a file
Skill 2 reads that file

This is intentional. It means you can run skills independently, re-run a single step without redoing everything, and inspect exactly what each skill decided before moving to the next.

The chain looks like this:

gtm-analytics-audit
  writes  → audit-report.json

gtm-dom-standardization
  reads   → audit-report.json (for element inventory)
  writes  → modified source files

gtm-strategy
  reads   → audit-report.json (for discovered elements)
  writes  → gtm-tracking-plan.json

gtm-setup
  writes  → gtm-credentials.json
             gtm-token.json
             gtm-config.json

gtm-implementation
  reads   → gtm-tracking-plan.json (what to track)
             gtm-config.json (which container to configure)
  writes  → modified source files (dataLayer events)
             GTM container version (via API)

gtm-testing
  reads   → modified source files (to know what selectors to test)
  writes  → scripts/test-tracking.js

gtm-reporting
  reads   → audit-report.json
             gtm-tracking-plan.json
             GTM container (via API)
  writes  → docs/event-schema.md
             docs/implementation-summary.md
             docs/reporting-capabilities.md
             docs/audience-definitions.md
             docs/executive-summary.md

Running Skills in Sequence

The recommended order:

1. /gtm-analytics-audit
2. /gtm-dom-standardization
3. /gtm-strategy
4. /gtm-setup          (only needed once per project)
5. /gtm-implementation
6. /gtm-testing
7. /gtm-reporting

You do not have to run all 7. Common partial workflows:

Just want to know what you can track:

/gtm-analytics-audit
/gtm-strategy

Already have GTM set up, just need to implement:

/gtm-implementation
/gtm-testing

Need to document an existing implementation:

/gtm-reporting

Tips and Tricks

Always start with the audit

Run gtm-analytics-audit first, every time. It scans your site and finds every button, form, and link - including ones you forgot about. Everything that comes after depends on what the audit finds.

Do not move the files Claude creates

Claude saves its work as files in your project folder. Leave them where they are. Each skill looks for those files automatically. If you move them, just tell Claude where they went when you run the next step.

Check the tracking plan before you go further

After running gtm-strategy, take a look at the tracking plan it creates before moving on. It is much easier to remove something from a list than to undo it after it has been built.

gtm-setup only needs to run once

Once you have connected to GTM, you do not need to do it again for that project. Only re-run gtm-setup if you switch to a different GTM container.

Your login expires, but it renews itself

GTM access tokens expire after an hour, but Claude renews them automatically in the background. You only need to log in again if you manually delete the token file or revoke access from Google.

Let the automated tests run first

When you run gtm-testing, Claude runs automated checks first without you having to click anything. This catches most issues on its own. Only go to manual checking in GTM Preview after the automated tests pass.

WARN in test results is not a problem

A WARN just means that element was not visible on the page being tested - maybe it only shows up on a different page or after a specific action. Test that page separately and it will pass.

Run the audit again after cleanup

After gtm-dom-standardization tidies up your site, run the audit one more time. The score will jump significantly and you will be able to see that the cleanup worked before moving to the next step.

You can run skills on a subdirectory

If you only want to track one section of your site, tell Claude when you invoke the skill:

Run gtm-analytics-audit on the components/checkout/ directory only

Incremental implementation

gtm-implementation supports incremental updates. If you only want to implement P0 events first:

Run gtm-implementation for P0 events only from the tracking plan

Then run it again for P1 events after you have validated P0.

Pass the tracking plan between sessions

If you start a new Claude Code session after running gtm-strategy, the new session has no memory of the previous one. But gtm-tracking-plan.json does. When you invoke gtm-implementation in a new session, Claude reads the file and picks up exactly where the strategy session left off.

Upgrading Skills

How installing skills works

Think of it like downloading a plugin. When you run the install command, it grabs the latest version of the skills and saves them to your computer. That is it - no ongoing connection, no background syncing. The files live on your machine and stay there until you update them manually.

Do skills update automatically?

No. If the skills get improved after you installed them, you will not see those improvements unless you re-run the install command. It is the same as any app on your phone - updates do not happen unless you go looking for them.

How users upgrade

To get the latest version of the skills:

# Re-run the install command - it overwrites existing files with latest
npx skills add aimonk2025/google-tag-manager-automation

This pulls fresh from GitHub and overwrites the local skill files. Any local edits users made to the skill files will be overwritten.

For specific skills only:

npx skills add aimonk2025/google-tag-manager-automation --skill gtm-testing gtm-implementation

How you (the author) push updates

1. Edit the skill files locally
2. Push to main on GitHub (direct push works for you due to admin bypass)
3. Users re-run npx skills add to get the update

There is no versioning mechanism in the skills CLI. Users always get whatever is on main at the time they install. If you want to maintain stable versions, use GitHub releases and point users to a specific tag:

# Install from a specific tag (if you set one up)
npx skills add aimonk2025/google-tag-manager-automation#v1.0.0

Recommended workflow for updates

When you improve a skill:

1. Test the change locally by copying the updated SKILL.md to ~/.claude/skills/gtm-{skill}/SKILL.md
2. Verify Claude behaves as expected in a real project
3. Push to GitHub
4. Announce the update so users know to re-run the install command

Common Issues

Skill does not trigger automatically

Try invoking directly with /skill-name to confirm it is installed.

audit-report.json not found when running gtm-strategy

Run gtm-analytics-audit first, or tell Claude the path: "Use the audit report at ./reports/audit-report.json".

gtm-implementation fails on GTM API calls

Run gtm-setup first and verify the connection test passes. Check that gtm-config.json has the correct account and container IDs.

Playwright tests fail with "element not found"

Use the discovery script in gtm-testing to inspect what is actually rendered on the page. The ID in your source code may not match what the framework renders in the DOM.

Tokens expired

Delete gtm-token.json and re-run gtm-setup from Phase 5 (OAuth Authorization). Your credentials file is still valid.

Ready to automate your GTM setup?

Get the PluginBack to Overview