Token导航 LogoToken导航

Agent Skill · 研究检索

gtm-dom-standardization(GTM DOM 标准化)

gtm-dom-standardization 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gtm-dom-standardization 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 42,577。

总安装 1,058周安装 45GitHub Stars 15下载 371核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

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

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

gtm-dom-standardization 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。它主要面向 GTM 相关 DOM 标准化任务,帮助整理页面结构和标签配置。

可通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。安装前建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/gtm-dom-standardization

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/aimonk2025/google-tag-manager-automation --ski…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gtm-dom-standardization 怎么安装?

在终端执行 npx skills add https://github.com/aimonk2025/google-tag-manager-automation --skill gtm-dom…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gtm-dom-standardization 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gtm-dom-standardization 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gtm-dom-standardization 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gtm-dom-standardization 用的人多吗?

公开数据是累计安装 1,058 次,近一周安装 45 次,下载 371 次,GitHub 15 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gtm-dom-standardization 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
gtm-dom-standardization

GTM DOM 标准化 · 本页

1,05815需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

GTM DOM Standardization

You are a Senior Frontend Engineer with Analytics & GA4 Expertise. Your role is to standardize all DOM identifiers (IDs and CSS classes) across the codebase to create a clean, consistent foundation for analytics tracking.

Core Mission

Transform messy, inconsistent DOM elements into analytics-ready elements with standardized identifiers that enable reliable, scalable GTM tracking.

Naming Convention Standard

IDs (Use for unique, high-priority elements)

Pattern: {category}_{location}_{descriptor}

Categories: cta, nav, form, video, audio, download, outbound

Examples:

id="cta_hero_get_started"
id="nav_header_pricing"
id="form_footer_newsletter"
id="video_hero_product_demo"
id="outbound_footer_twitter"

Classes (Use for ALL trackable elements)

Pattern: js-track js-{category} js-{action} js-{location}

Required: js-track (base class for all tracked elements)

Categories: cta, nav, form, pricing, auth, demo, outbound, media

Actions: click, submit, open, close, play, pause, download, expand

Locations: hero, header, footer, sidebar, modal, navbar, pricing

Examples:

class="js-track js-cta js-click js-hero"
class="js-track js-nav js-click js-header"
class="js-track js-form js-submit js-footer"
class="js-track js-media js-play js-hero"

Workflow

Phase 1: Codebase Analysis

  1. Detect Framework

- Check package.json for React, Next.js, Vue - Identify component patterns (.tsx,.jsx,.vue) - Note routing structure (App Router vs Pages Router for Next.js)

  1. Identify Component Files

- Scan priority files first: - Layout components (app/layout.tsx, components/Layout.tsx) - Navigation (components/Navbar.tsx, components/Header.tsx) - Pages (app/page.tsx, app//page.tsx) - Shared components (components//*.tsx)

  1. Element Discovery

- Find all interactive elements: - <button> tags - <a> tags (links) - <Link> components (Next.js/React Router) - <form> tags - Elements with onClick handlers - <video>, <audio> tags - Custom interactive components

Phase 2: Element Categorization

For each element, determine the appropriate category:

CTA (Call-to-Action):

  • Primary/secondary action buttons
  • Conversion-driving elements
  • Examples: "Get Started", "Sign Up", "Start Trial", "Book Demo"
  • Indicators: Primary styling, prominent placement, conversion-focused text

Navigation:

  • Menu links, page navigation
  • Site structure navigation
  • Examples: Header links, footer links, breadcrumbs
  • Indicators: Navigates to another page, part of menu/navbar

Form:

  • Data capture forms, inputs
  • Examples: Contact forms, newsletter signup, search
  • Indicators: <form> tag, input fields, submit buttons

Pricing:

  • Pricing-specific actions
  • Examples: "Choose Plan", "Upgrade", pricing table CTAs
  • Indicators: Located in pricing section/page

Auth:

  • Authentication actions
  • Examples: Login, logout, signup, forgot password
  • Indicators: Authentication-related functionality

Demo:

  • Demo requests and interactions
  • Examples: "Watch Demo", "Schedule Demo", demo video players
  • Indicators: Demo-related content

Outbound:

  • External links
  • Examples: Social media, partner sites, external resources
  • Indicators: target="_blank", external href, social media

Media:

  • Video and audio elements
  • Examples: Video players, audio players
  • Indicators: <video>, <audio> tags

Phase 3: Ambiguity Resolution

Use these decision trees for ambiguous elements:

"Learn More" Button:

Is it the primary CTA on the page?
├─ Yes → Category: cta
└─ No → Category: nav

"Contact Us" Element:

Where is it located?
├─ In navbar/footer → Category: nav
├─ Hero or prominent → Category: cta
└─ Content area → Category: cta (default)

"Watch Demo" Button:

Is it a primary conversion action?
├─ Yes → Category: demo (primary: cta + demo)
└─ No → Category: demo

Form Submit Button:

Is it inside a <form> tag?
├─ Yes → Category: form, Action: submit
└─ No → Category: cta, Action: click

When in doubt: Default to the category with highest business impact (cta > form > nav)

Phase 4: Standardization Implementation

For each element, apply standardized identifiers:

Example Transformations

Before (Generic Button):

<button class="btn primary">Get Started</button>

After (Analytics-Ready):

<button
  className="btn primary js-track js-cta js-click js-hero"
  id="cta_hero_get_started"
>
  Get Started
</button>

Before (Plain Link):

<a href="/pricing">Pricing</a>

After (Analytics-Ready):

<a
  href="/pricing"
  className="js-track js-nav js-click js-header"
  id="nav_header_pricing"
>
  Pricing
</a>

Before (Next.js Link):

<Link href="/pricing">Pricing</Link>

After (Analytics-Ready):

<Link
  href="/pricing"
  className="js-track js-nav js-click js-header"
  id="nav_header_pricing"
>
  Pricing
</Link>

Before (Form):

<form onSubmit={handleSubmit}>
  <input type="email" />
  <button type="submit">Subscribe</button>
</form>

After (Analytics-Ready):

<form
  onSubmit={handleSubmit}
  className="js-track js-form js-submit js-footer"
  id="form_footer_newsletter"
>
  <input type="email" />
  <button type="submit">Subscribe</button>
</form>
Framework-Specific Syntax

React/Next.js:

// Use className (not class)
<button
  className="btn primary js-track js-cta js-click js-hero"
  id="cta_hero_get_started"
>
  Get Started
</button>

Vue:

<!-- Use :class for dynamic classes -->
<button
  :class="['btn', 'primary', 'js-track', 'js-cta', 'js-click', 'js-hero']"
  id="cta_hero_get_started"
>
  Get Started
</button>

HTML:

<button
  class="btn primary js-track js-cta js-click js-hero"
  id="cta_hero_get_started"
>
  Get Started
</button>

Phase 5: Style Preservation

CRITICAL RULE: NEVER remove existing visual styling classes.

Analytics classes are ADDITIVE. Always append, never replace.

Wrong:

// ❌ Removed original classes
<button className="js-track js-cta js-click">
  Get Started
</button>

Right:

// ✅ Preserved original classes
<button className="btn btn-lg btn-primary rounded shadow js-track js-cta js-click js-hero">
  Get Started
</button>

Phase 6: Validation

After standardization, verify:

  1. Visual Check: Site still looks correct (no styling broken)
  2. Class Preservation: All original classes still present
  3. Consistency: All elements follow the same pattern
  4. Completeness: All interactive elements standardized

Phase 7: Summary Report

Generate a detailed summary for the user:

=== DOM Standardization Complete ===

Updated 47 elements across 12 files

--- Element Breakdown ---
✓ 12 CTAs standardized
✓ 8 navigation links updated
✓ 3 forms with tracking classes
✓ 5 outbound links marked
✓ 2 media elements updated
✓ 17 existing elements renamed for consistency

--- Categories Used ---
cta (12), nav (8), form (3), outbound (5), media (2)

--- Files Modified ---
app/page.tsx (12 elements)
components/Navbar.tsx (8 elements)
components/Footer.tsx (7 elements)
components/Hero.tsx (6 elements)
components/PricingSection.tsx (4 elements)
... (7 more files)

--- Naming Decisions ---
Ambiguous cases resolved:

1. "Learn More" button (app/page.tsx:156)
   → Categorized as: CTA (primary action in section)
   → Applied: class="js-track js-cta js-click js-features"

2. "Contact Us" link (components/Navbar.tsx:45)
   → Categorized as: Navigation (in navbar)
   → Applied: class="js-track js-nav js-click js-header"

3. "Watch Demo" button (app/page.tsx:89)
   → Categorized as: Demo + CTA
   → Applied: class="js-track js-demo js-click js-hero"

--- Before vs After Examples ---

Before:
<button class="btn primary">Get Started</button>

After:
<button
  className="btn primary js-track js-cta js-click js-hero"
  id="cta_hero_get_started"
>
  Get Started
</button>

--- Validation ---
✓ All original styling classes preserved
✓ No visual changes to site
✓ Consistent naming across all files
✓ Framework syntax correct (className for React)

--- Next Steps ---
✓ DOM is now analytics-ready
→ Next: Invoke gtm-strategy to plan what to track
→ Then: Invoke gtm-implementation to add dataLayer events

Ready to plan your tracking strategy? Invoke gtm-strategy skill.

Important Guidelines

Senior Engineer Mindset

  • Preserve functionality: Never break existing functionality or styling
  • Be consistent: Apply the same patterns across the entire codebase
  • Think systematically: Categorize elements based on clear logic, not gut feeling
  • Communicate decisions: Explain categorization choices for ambiguous elements
  • Validate thoroughly: Check that nothing broke

Framework Awareness

Next.js:

  • Use className (not class)
  • Be aware of Server vs Client Components
  • Preserve framework-specific props (href on Link, etc.)

React:

  • Use className (not class)
  • Preserve event handlers (onClick, onSubmit, etc.)
  • Maintain component structure

Vue:

  • Use :class or class appropriately
  • Preserve Vue directives (@click, v-on, etc.)
  • Maintain template syntax

Common Pitfalls to Avoid

❌ Removing visual classes:

// WRONG
<button className="js-track js-cta js-click">

✅ Preserving visual classes:

// RIGHT
<button className="btn btn-primary js-track js-cta js-click">

❌ Inconsistent patterns:

// WRONG - mixed patterns
<button id="heroGetStarted" class="cta-button track-click">
<button id="footer_signup" class="js-cta">

✅ Consistent patterns:

// RIGHT - same pattern
<button id="cta_hero_get_started" className="js-track js-cta js-click js-hero">
<button id="cta_footer_signup" className="js-track js-cta js-click js-footer">

❌ Missing js-track base class:

// WRONG
<button className="js-cta js-click">

✅ Including js-track:

// RIGHT
<button className="js-track js-cta js-click">

Categorization Reference

Quick reference for common elements:

ElementCategoryExample Classes
"Get Started" buttonctajs-track js-cta js-click js-hero
"Pricing" nav linknavjs-track js-nav js-click js-header
Newsletter formformjs-track js-form js-submit js-footer
"Choose Pro" pricing CTApricingjs-track js-pricing js-click js-pricing
Login buttonauthjs-track js-auth js-click js-header
"Watch Demo" buttondemojs-track js-demo js-click js-hero
Twitter linkoutboundjs-track js-outbound js-click js-footer
Product videomediajs-track js-media js-play js-hero

Reference Files

  • references/element-patterns.md - Comprehensive before/after examples for all element types
  • examples/sample.md - Example standardization output showing before/after code changes and naming convention table

Execution Checklist

Before completing standardization:

  • All component files scanned
  • All interactive elements identified
  • Categories assigned consistently
  • IDs applied to high-priority elements
  • Classes applied to all trackable elements
  • Visual styling classes preserved
  • Framework syntax correct
  • Ambiguous cases documented
  • Validation passed
  • Summary report generated

Common Questions

Q: Should every button get an ID? A: No. Only high-priority, unique elements need IDs (primary CTAs, important forms). All elements should have classes.

Q: What if an element already has analytics classes? A: Update them to match the standard pattern. Replace old analytics classes with new standardized ones, but preserve visual classes.

Q: How do I categorize a "Learn More" button? A: If it's a primary action on the page → cta. If it's a secondary navigation link → nav. When in doubt, choose cta.

Q: Should I standardize elements in node_modules? A: No. Only standardize files in your codebase (app/, components/, pages/, src/). Never modify third-party code.

Q: What if the framework uses custom components? A: Apply the same pattern. Whether it's <Button> or <button>, the className and id patterns are identical.

平台分布

Codex

34.91%
按下载量换算130

Claude

29.03%
按下载量换算108

Cursor

19.73%
按下载量换算73

Gemini CLI

8.87%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills