Synthèse automatique
Ce skill pilote le cycle complet de développement Google Tag Manager : authentification OAuth2, export de la configuration d'un workspace en fichiers JSON locaux, modification par l'agent, puis réimport pour synchroniser les changements dans le conteneur.
Points forts
- Boucle export / édition locale / import qui permet de modifier des tags, déclencheurs et variables en masse sans passer par l'interface GTM
- L'import résout automatiquement les références par nom vers les ID numériques et réécrit les fingerprint officiels dans les JSON locaux
- Fournit des checkpoints d'audit et des exemples de configuration pour conteneurs web et server-side dans le dossier resources/
- Ensemble autonome avec scripts Python, module client API et template .env pour les identifiants
Limites
- Nécessite des identifiants OAuth2 GTM valides (client ID, secret, refresh token) obtenus au préalable via le script d'auth
- Le skill opère sur un workspace GTM ciblé par URL, sans gestion multi-comptes ou multi-conteneurs simultanée documentée
- Le contenu de SKILL.md est partiel : le détail du workflow d'audit et la gestion des erreurs d'import restent peu explicités
À utiliser pour auditer ou remanier en série les tags, déclencheurs et variables d'un conteneur GTM à partir de fichiers JSON versionnables.
À éviter pour une modification ponctuelle d'un seul tag, plus rapide directement dans l'interface GTM, ou si vous ne disposez pas d'accès API au conteneur.
Analyse de sécurité
PrudenceThe skill is transparent about what it does: OAuth-authenticated reads and writes against the Google Tag Manager API using bundled Python scripts invoked through run_command. There is no destructive, obfuscated, or clearly exfiltrating behavior in the instructions, and it includes an explicit guardrail against modifying or importing without user instruction. However, it does run third-party code with live API credentials and can mutate production container configurations, so it belongs in 'caution' rather than 'safe' pending inspection of the bundled scripts.
- •Skill instructs the agent to execute bundled Python scripts (auth.py, export.py, import.py) via run_command, which executes third-party code with network access to the Google Tag Manager API.
- •Requires long-lived OAuth credentials (GTM_CLIENT_ID, GTM_CLIENT_SECRET, GTM_REFRESH_TOKEN) stored in a .env file; the agent is directed to read/load project environment configuration, so credential handling should be reviewed.
- •The import workflow mutates live GTM containers (creating/updating tags, triggers, variables), which is a production-impacting write operation and warrants explicit user confirmation.
- •Scripts, helpers, and JSON resources are bundled but not shown in the SKILL.md; actual behavior of gtm_client.py / authentication.py cannot be verified from this file alone.
- •No evidence of obfuscation, base64 payloads, curl|sh installs, destructive filesystem commands, or exfiltration to non-GTM endpoints.
Exemples
Export my GTM workspace at https://tagmanager.google.com/#/container/accounts/123/containers/456/workspaces/7, add a GA4 page_view tag that fires on all pages only after consent, wire the needed variables and triggers, then import it back.Export the GTM container from this workspace URL and audit the tags, triggers and variables against resources/documents/audit_checkpoints.md, then list the issues by severity.In the exported GTM JSON under tmp/, the 'purchase' trigger fires on the wrong event name — correct the condition, keep the existing fingerprint, and re-import so the change is synced.name: gtm-copilot description: A comprehensive skill for developing, managing, importing, and exporting Google Tag Manager configurations - GTM Copilot license: MIT compatibility: "python >= 3.x" metadata: version: 0.2.0 author: SEM Technology homepage: https://github.com/sem-technology/gtm-copilot disable-model-invocation: false allowed-tools:
- run_command
- list_dir
- view_file
- grep_search
- codebase_search
GTM Copilot Skill
This skill supports the entire Google Tag Manager (GTM) development workflow. All necessary tools and documentation are bundled within this skill directory.
Directory Structure (Bundled Resources)
This skill is configured as a self-contained package. Agents must always use relative paths within this skill directory.
SKILL.md: Skill definition (this file).env.example: Template for environment variable settingsLICENSE.txt: License informationscripts/: Folder containing all program codebin/: Executable scripts (auth.py, export.py, import.py)gtm_client.py: Core implementation of the GTM API clientauthentication.py: Authentication modulehelpers/: Utilities and client logic
resources/: Folder for supplemental documents and sample datadocuments/: Documents for GTM Copilotaudit_checkpoints.md: Detailed audit criteria for GTM configurations
server_container/: Configuration for Server-side GTMtags.jsontriggers.jsonvariables.jsonbuilt_in_variables.json
web_container/: Configuration for Web GTMtags.jsontriggers.jsonvariables.jsonbuilt_in_variables.json
Configuration
Environment variables are loaded from the .env file located in the project root.
GTM_CLIENT_ID: OAuth 2.0 Client ID for GTM API access.GTM_CLIENT_SECRET: OAuth 2.0 Client Secret for GTM API access.GTM_REFRESH_TOKEN: OAuth 2.0 Refresh Token for automatic token renewal.GTM_EXPORT_ROOT_PATH: Environment variable to specify the root directory for GTM files.- Placeholder: Supports
[[GTM_ID]]for dynamic path resolution based on the container ID. - Resolution Priority: CLI Argument > Env Var > Default (
tmp/[[GTM_ID]]).
- Placeholder: Supports
Command Details
1. auth (Authentication Setup)
Performs OAuth2 authentication to access the GTM API.
- Execution:
python ./scripts/bin/auth.py - Role: Input Client ID/Secret and generate a refresh token.
2. export (State Extraction)
Exports existing GTM configurations as local JSON files.
- Execution:
python ./scripts/bin/export.py --url <GTM_WORKSPACE_URL> - Output: The path defined by
--outputorGTM_EXPORT_ROOT_PATH(defaults to./tmp/GTM-XXXXXX/). - Role: Save the current state of tags, triggers, and variables as a snapshot for editing.
3. import (Change Synchronization)
Updates the GTM container based on local JSON files.
- Execution:
python ./scripts/bin/import.py --url <GTM_WORKSPACE_URL> - Input: The path defined by
--directoryorGTM_EXPORT_ROOT_PATH(defaults to./tmp/GTM-XXXXXX/). - Role:
- Create new components
- Update existing components (only if changes detected)
- Automatically resolve ID references (from name-based to numeric IDs)
Workflow
Development Workflow
- Export: Run
scripts/bin/export.pyto get the latest GTM state. - Implementation (AI Work): Modify the JSON files under
tmp/.- Add new tags
- Change trigger conditions
- Fix variable definitions
- Import: Run
scripts/bin/import.pyto synchronize changes.- After sync, official IDs and
fingerprintvalues are written back to local JSONs.
- After sync, official IDs and
Audit Workflow
- Export: Run
scripts/bin/export.pyto get the latest GTM state. - Audit:
- The agent uses the
view_filetool to readresources/documents/audit_checkpoints.mdto understand the audit criteria. - The agent then analyzes the exported JSON files in
tmp/based on those criteria.
- The agent uses the
- Report: The agent provides a summary of findings (issues, risks, and recommendations) to the user.
Crucial: The agent must not modify any tags, triggers, or variables, nor perform any import operations, unless specifically instructed to do so by the user.
Notes on JSON File Generation & Editing
- Name-based References (Recommended):
- When specifying firing triggers for tags, you can use the "Trigger Name" instead of a numeric ID. This is especially useful for tags referencing newly created triggers that don't have IDs yet.
- Use the
{{Variable Name}}format to reference variables.
- Dependency Resolution:
- If a new tag references a new trigger, the import script automatically detects the dependency and creates the trigger first.
- Change Detection:
- The script compares content hashes and skips API calls if there are no actual changes.
- Implementation References:
- Use the JSON files in the
resources/server_container/orresources/web_container/directories as references for correct schemas and parameter structures. - Important: Available tags, triggers, and variables differ significantly between Server and Web containers. Ensure you reference the correct directory for your specific container type when implementing new components.
- Use the JSON files in the
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/download' --output '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md.part' && mv '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md.part' '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Environnement déclaré par l’auteur : python >= 3.x
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md' && test -s '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/gtm-copilot' && cp -R '.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj' '.claude/skills/gtm-copilot'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj'openskills read 'gtm-copilot-develop-manage-gtm-configurations-mspm3ckj'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/gtm-copilot-develop-manage-gtm-configurations-mspm3ckj/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.