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

data-gtm-datalayer数据 GTM 数据层

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

194

周安装

8

GitHub Stars

11

下载量

63
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/parhumm/jaan-to --skill data-gtm-datalayer

简介

自动生成符合规范的 Google Tag Manager 跟踪代码,强化命名约束。

  • 可根据 PRD 或文字描述设计埋点方案,支持交互式向导引导配置。
  • 执行前必须读取预设知识库和模板,遵循语言协议进行本地化适配。
  • 涉及用户行为整理时应确认隐私政策,确保符合 GDPR 等法规要求。
  • data-gtm-datalayer 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

data-gtm-datalayer

Generate production-ready GTM tracking code with enforced naming conventions.

Context Files

  • $JAAN_LEARN_DIR/jaan-to-data-gtm-datalayer.learn.md - Past lessons (loaded in Pre-Execution)
  • $JAAN_TEMPLATES_DIR/jaan-to-data-gtm-datalayer.template.md - Output template
  • ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md - Language resolution protocol

Input

Tracking Request: $ARGUMENTS

  • If PRD path provided → Read and suggest tracking points
  • If text description provided → Design tracking based on input
  • If empty → Start interactive wizard

Pre-Execution Protocol

MANDATORY — Read and execute ALL steps in: ${CLAUDE_PLUGIN_ROOT}/docs/extending/pre-execution-protocol.md Skill name: data-gtm-datalayer Execute: Step 0 (Init Guard) → A (Load Lessons) → B (Resolve Template) → C (Offer Template Seeding)

Language Settings

Read and apply language protocol: ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md Override field for this skill: language_data-gtm-datalayer


PHASE 1: Analysis (Read-Only)

Step 1: Determine Input Mode

Check $ARGUMENTS:

Mode A - PRD Input: If path to $JAAN_OUTPUTS_DIR/ or PRD text provided:

  1. Read/parse the PRD
  2. Identify trackable interactions (buttons, forms, modals, etc.)
  3. Suggest tracking points with types:

- Impressions: modal displays, section visibility - Clicks: buttons, links, interactive elements - Include non-happy paths (close, dismiss, cancel)

  1. Ask user to confirm/modify suggestions

Mode B - Description Input: If text description of what to track:

  1. Parse the description
  2. Ask clarifying questions if needed
  3. Suggest tracking structure

Mode C - Interactive Wizard: If no arguments, ask questions in order:

Question 1: Tracking Type

"What type of tracking do you need?" 1. click-html - HTML attributes (data-al-*) for simple clicks 2. click-datalayer - dataLayer.push for flow-based clicks 3. impression - dataLayer.push for visibility/exposure events

Question 2: Feature Name

"What is the feature name? (e.g., player, checkout, onboarding)"

Apply naming rules:

  • Convert to lowercase-kebab-case: "Play Button" → "play-button"
  • If unclear (e.g., "btn1", "x"), ask: "What does '{input}' represent?"
  • Suggest better name if abbreviated: "nav" → suggest "navigation" or "navbar"
  • Confirm conversion: "Feature 'Play Button' → 'play-button' - OK? [y/edit]"

Question 3: Item Name

"What is the item name? (e.g., play, pause, submit, modal-purchase)"

Apply same naming rules as feature.

Question 4: Action (click-datalayer only)

"What is the action? (default: Click)"

If user provides custom action, apply naming rules. If empty/skipped, use "Click".

Question 5: Additional Params (optional)

"Any additional params? Enter as key=value, one per line. (or 'skip')"

Example:

source=modal
count=3
active=true

Parse into object with ES5 type detection:

  • true / false → bool (no quotes): true
  • Numeric values (e.g., 3, 42) → int (no quotes): 3
  • Everything else → string (with quotes): "modal"

If none provided, omit params entirely from output.

Step 2: Confirm Values

Show full dataLayer preview before generating:

For click-html:

TRACKING SUMMARY
────────────────────────────────────────

<button data-al-feature="{feature}" data-al-item="{item}">...</button>

────────────────────────────────────────

For click-datalayer (without params):

TRACKING SUMMARY
────────────────────────────────────────

dataLayer.push({
  event: "al_tracker_custom",
  al: {
    feature: "{feature}",
    item: "{item}",
    action: "{action}"
  },
  _clear: true
});

────────────────────────────────────────

For click-datalayer (with params):

TRACKING SUMMARY
────────────────────────────────────────

dataLayer.push({
  event: "al_tracker_custom",
  al: {
    feature: "{feature}",
    item: "{item}",
    action: "{action}",
    params: {
      source: "modal",
      count: 3,
      active: true,
    }
  },
  _clear: true
});

────────────────────────────────────────

Values are typed: strings in "quotes", ints/bools without quotes.

For impression (without params):

TRACKING SUMMARY
────────────────────────────────────────

dataLayer.push({
  event: "al_tracker_impression",
  al: {
    feature: "{feature}",
    item: "{item}"
  },
  _clear: true
});

────────────────────────────────────────

For impression (with params):

TRACKING SUMMARY
────────────────────────────────────────

dataLayer.push({
  event: "al_tracker_impression",
  al: {
    feature: "{feature}",
    item: "{item}",
    params: {
      variant: "A",
      position: 1,
      visible: true,
    }
  },
  _clear: true
});

────────────────────────────────────────
"Generate tracking code with these values? [y/edit]"

HARD STOP - Human Review Check

Show the full dataLayer preview above (not just field summary).

"Proceed with code generation? [y/n/edit]"

Do NOT proceed to Phase 2 without explicit approval.


PHASE 2: Generation (Write Phase)

Step 3: Generate Code

Based on tracking type, generate the appropriate code:

Type: click-html

<element data-al-feature="{feature}" data-al-item="{item}">{element content}</element>

Example output:

<button data-al-feature="player" data-al-item="pause">Pause</button>

Type: click-datalayer

Without params:

dataLayer.push({
  event: "al_tracker_custom",
  al: {
    feature: "{feature}",
    item: "{item}",
    action: "{action}"
  },
  _clear: true
});

With params (ES5 typed values):

dataLayer.push({
  event: "al_tracker_custom",
  al: {
    feature: "{feature}",
    item: "{item}",
    action: "{action}",
    params: {
      {key1}: {value1},  // string: "value", int: 3, bool: true
      {key2}: {value2},
    }
  },
  _clear: true
});

Type: impression

Without params:

dataLayer.push({
  event: "al_tracker_impression",
  al: {
    feature: "{feature}",
    item: "{item}"
  },
  _clear: true
});

With params (ES5 typed values):

dataLayer.push({
  event: "al_tracker_impression",
  al: {
    feature: "{feature}",
    item: "{item}",
    params: {
      {key1}: {value1},  // string: "value", int: 3, bool: true
      {key2}: {value2},
    }
  },
  _clear: true
});

Step 4: Quality Check

Before preview, verify:

  • event key present in all dataLayer pushes
  • Feature and item are non-empty strings
  • Feature/item/action are lowercase-kebab-case
  • No abbreviations without user clarification
  • Names are descriptive and understandable
  • User-provided strings preserved (after kebab conversion)
  • _clear: true included in all dataLayer pushes
  • No empty params: {} (omit entirely if no params)
  • Param values use correct ES5 types (string in "quotes", int/bool without)
  • Output is deterministic (same input → same code)

If any check fails, fix before preview.

Step 5: Preview & Approval

Display the generated code in conversation:

GENERATED TRACKING CODE
───────────────────────

{code block}

EXAMPLE WITH VALUES
───────────────────
{example showing real values based on user input}
"Save tracking code to output? [y/n]"

Step 5.5: Generate ID and Folder Structure

If approved, set up the output structure:

  1. Source ID generator utility:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/id-generator.sh"
  1. Generate sequential ID and output paths:
# Define subdomain directory
SUBDOMAIN_DIR="$JAAN_OUTPUTS_DIR/data/gtm"
mkdir -p "$SUBDOMAIN_DIR"

# Generate next ID
NEXT_ID=$(generate_next_id "$SUBDOMAIN_DIR")

# Create folder and file paths (slug from feature-item, e.g., "player-pause")
slug="{lowercase-hyphenated-feature-item}"
OUTPUT_FOLDER="${SUBDOMAIN_DIR}/${NEXT_ID}-${slug}"
MAIN_FILE="${OUTPUT_FOLDER}/${NEXT_ID}-gtm-${slug}.md"
  1. Preview output configuration:
Output Configuration - ID: {NEXT_ID} - Folder: $JAAN_OUTPUTS_DIR/data/gtm/{NEXT_ID}-{slug}/ - Main file: {NEXT_ID}-gtm-{slug}.md

Step 6: Write Output

  1. Create output folder:
mkdir -p "$OUTPUT_FOLDER"
  1. Write tracking code to main file using template:
# Use template from $JAAN_TEMPLATES_DIR/jaan-to-data-gtm-datalayer.template.md
cat > "$MAIN_FILE" <<'EOF'
{generated tracking documentation with Executive Summary}
EOF
  1. Update subdomain index:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/index-updater.sh"
add_to_index \
  "$SUBDOMAIN_DIR/README.md" \
  "$NEXT_ID" \
  "${NEXT_ID}-${slug}" \
  "{Tracking Title}" \
  "{1-2 sentence summary: feature-item tracking with event type}"
  1. Confirm completion:
✓ Tracking code written to: $JAAN_OUTPUTS_DIR/data/gtm/{NEXT_ID}-{slug}/{NEXT_ID}-gtm-{slug}.md ✓ Index updated: $JAAN_OUTPUTS_DIR/data/gtm/README.md

Step 7: Capture Feedback

"Any feedback? [y/n]"

If yes:

"[1] Fix now [2] Learn for future [3] Both"
  • Option 1: Update output, re-preview, re-write
  • Option 2: Run /jaan-to:learn-add data-gtm-datalayer "{feedback}"
  • Option 3: Do both

Skill Alignment

  • Two-phase workflow with HARD STOP for human approval
  • Template-driven output structure
  • Generic and tech-stack agnostic
  • Output to standardized $JAAN_OUTPUTS_DIR path

Definition of Done

  • User confirmed tracking values
  • Code generated and displayed in conversation
  • Markdown file written to $JAAN_OUTPUTS_DIR/data/gtm/{slug}/
  • User can copy-paste and use immediately

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.11%
按下载量换算23

Claude

29.09%
按下载量换算18

Cursor

18.27%
按下载量换算12

Gemini CLI

9.2%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills