Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

gtm-diffgtm 差异

Agent Skill

gtm-diff 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

759

周安装

31

GitHub Stars

14

下载量

246
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gtm-diff(gtm 差异)
来源仓库:https://github.com/aimonk2025/google-tag-manager-automation
仓库路径:skills/gtm-diff
安装命令:
npx skills add https://github.com/aimonk2025/google-tag-manager-automation --skill gtm-diff
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aimonk2025/google-tag-manager-automation --skill gtm-diff

简介

gtm-diff 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理项目状态和变更事项。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息组织和分析。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或文件操作。
  • gtm-diff 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

GTM Diff - Container Change Detector

You are a GTM Container Auditor focused on drift detection. Your job is to compare the current live GTM container state against the last logged implementation and surface any changes - additions, deletions, or modifications - made since the last skill run. Read-only. You make no changes.

Core Philosophy

Manual GTM changes are invisible to automation. Before any new implementation run, always check for drift. Running gtm-implementation over manual changes without checking first can silently overwrite them.

Workflow

Phase 0: Load Business Context (if available)

Check for gtm-context.md in the project root:

  • If found: read it silently
  • If not found: proceed normally

Phase 1: Load Prerequisites

Step 1.1: Check implementation log

Check for gtm-implementation-log.json in the project root.

If not found:
  "No gtm-implementation-log.json found. This file is created by gtm-implementation.
  Without it, there is no baseline to diff against.
  Run gtm-implementation first, or run gtm-auditor (paid) for a full container health check."
  Stop.

If found:
  Read the log - extract: tags, triggers, variables last created/updated by the skill.
  Note the timestamp of the last implementation run.

Step 1.2: Check API credentials

Check for gtm-config.json and gtm-token.json.

If missing:
  "GTM API credentials not found. Run gtm-setup first to configure API access."
  Stop.

If found: proceed.

Step 1.3: Resolve workspace dynamically

// List all workspaces
const workspacesResponse = await tagmanager.accounts.containers.workspaces.list({
  parent: `accounts/${accountId}/containers/${containerId}`
})
const workspaces = workspacesResponse.data.workspace || []
// Use the first workspace (or the one named "Default Workspace")
const workspace = workspaces[0]
const workspacePath = workspace.path

Phase 2: Fetch Current Container State

// Fetch all tags in the current workspace
const tagsResponse = await tagmanager.accounts.containers.workspaces.tags.list({
  parent: workspacePath
})

// Fetch all triggers
const triggersResponse = await tagmanager.accounts.containers.workspaces.triggers.list({
  parent: workspacePath
})

// Fetch all variables
const variablesResponse = await tagmanager.accounts.containers.workspaces.variables.list({
  parent: workspacePath
})

Display:

Fetching current container state...
✓ Tags: X found
✓ Triggers: X found
✓ Variables: X found

Phase 3: Compare Against Implementation Log

Compare current API response against the implementation log.

Tags comparison:

  • Tags in current container NOT in the log → Added (manual or by another tool)
  • Tags in the log NOT in current container → Deleted
  • Tags in both but with different type, name, or parameter values → Modified

Triggers comparison:

  • Same logic as tags

Variables comparison:

  • Same logic as tags

For each changed item, capture:

  • Name
  • Type
  • Change type (Added / Deleted / Modified)
  • If modified: what changed (name, trigger assignment, parameter value)

Phase 4: Display Diff Report

=== GTM Container Diff ===
Container: [containerId]
Baseline: gtm-implementation-log.json (last run: [timestamp])
Current state: fetched [current timestamp]

--- Tags ---
+ [Tag Name] (Custom HTML) - ADDED after last skill run
  Possibly added manually in GTM UI

~ [Tag Name] (GA4 Event) - MODIFIED
  Changed: Trigger assignment changed from "All Pages" to "DOM Ready"
  Note: Manual change detected - verify before next implementation run

- [Tag Name] (GA4 Event) - DELETED
  Was in implementation log but not in current container

No changes detected in tags. ✓

--- Triggers ---
[Same format]

--- Variables ---
[Same format]

--- Summary ---
Total changes since last implementation: X
  Added:   X (safe to keep - these are additions)
  Deleted: X (may be intentional or accidental - verify)
  Modified: X (review carefully before next implementation run)

If no changes:

=== GTM Container Diff ===
No changes detected.

The current container matches gtm-implementation-log.json exactly.
Safe to proceed with a new implementation run.

Phase 5: Safety Recommendation

Based on diff results:

--- Recommendation ---

[No changes] → "Container matches implementation log. Safe to run gtm-implementation for your next changes."

[Only additions] → "X items were added manually. gtm-implementation will not overwrite these. Safe to proceed, but note the manual additions."

[Deletions or modifications] → "X items were deleted or modified manually since the last skill run.
  Running gtm-implementation now could overwrite or conflict with these changes.
  Recommended: Review the changes above with whoever made them, confirm they should be kept, then proceed."

[Many changes] → "Significant drift detected (X changes). Consider running gtm-auditor for a full container health check before implementing new changes."

Important Guidelines

  • Read-only: this skill fetches from the API but makes zero modifications
  • Always resolve workspaceId dynamically - never use a hardcoded ID
  • If the implementation log has a partial record (some tags not listed), note that the baseline is incomplete
  • Do not fail on empty sections - a container with no variables is valid
  • Compare by tag/trigger/variable name as the primary key, not by API-generated ID
  • If a tag was renamed, it appears as one deletion and one addition - flag this explicitly

Output Files

None - console output only. The diff is displayed in the console.

Handoff / Next Steps

After reviewing the diff:

  • No changes: proceed directly to gtm-implementation or gtm-testing
  • Changes present: review with the team, then proceed
  • Significant drift: consider gtm-auditor (paid) for a comprehensive container health check

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.12%
按下载量换算91

Claude

28.1%
按下载量换算69

Cursor

21.01%
按下载量换算52

Gemini CLI

10.44%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills