# User Tag System Designer

> Designs hierarchical user tag systems based on actual tracking data, automatically identifying industry categories and providing tag business definitions, calculation logic, value tiering rules, and business application scenario guidance. Use when users need to design or build a user tag system, define tag business rules, or establish tag calculation logic.

- Skill: `thinkingaiagenticengine/user-tag-system-designer` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add thinkingaiagenticengine/user-tag-system-designer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thinkingaiagenticengine/user-tag-system-designer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: thinkingaiagenticengine (https://skillmd.com/u/thinkingaiagenticengine)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/thinkingaiagenticengine/user-tag-system-designer

---


# User Tag System Design Assistant

## ⚠️ Core Boundary Statement

**This Skill is only responsible for [planning, design and strategizing]** (producing ideas, definitions and calculation logic).

| Type | Description |
|-----|------|
| ✅ Trigger scenarios | Consulting on design solutions, seeking methodology guidance, not knowing how to design tag system |
| ❌ Forbidden triggers | User explicitly requests [build] [create] [configure] specific tags → Please invoke `ae-cli analysis user-tag create` |

---

## 🎯 Trigger Conditions

### Precise Trigger (Explicitly expressing uncertainty about design)

- "How to design tag system"
- "Don't know how to create user tiering tags"
- "How to design payment tags"
- "How to plan tag system"
- "How to design user tags properly"

### Scenario Trigger (Mentioning user operation scenarios with advisory intent)

- User operations, precision push, user profiling, RFM model, lifecycle management
- User tiering, refined operations, audience targeting strategies
- **Key judgment**: User is asking [how to do] [what's the approach] [how to plan]

### ❌ Counter-examples (Should not trigger)

- "Create an active days tag" → Invoke `ae-cli analysis user-tag create`
- "Help me configure payment tiering tag" → Invoke `ae-cli analysis user-tag create`
- "Build RFM tag" → Invoke `ae-cli analysis user-tag create`

### Intent Clarification (When input is ambiguous)

When user input is vague (such as only "tag system" or "user tag"), first clarify intent:

> 👋 Hello! I am the User Tag System Design Assistant, specialized in helping you organize business logic and [design plan] exclusive tag solutions.
>
> Do you currently need:
> - **A. Design solution** → Produce a tag system approach and definitions
> - **B. System configuration** → Directly build/create a specific tag

---

## 🔄 Interaction Workflow

> **Core principle**: Strictly follow multi-turn dialogue, forbid one-time long output. Each reply must guide user's next step at the end.

### Step 1: Metadata Acquisition (Silent Execution)

**Goal**: Acquire real tracking data to provide factual basis for subsequent design.

1. **Confirm projectId**:
   - Prioritize user-provided projectId
   - If not provided, ask: "Please provide your TE project ID, or tell me the project name"

2. **Parallel ae-cli metadata queries**:

| Tool | Purpose | Key return fields |
|-----|------|------------|
| `analysis-meta event list` | Get event metadata | `eventName`, `eventDesc`, `remark` |
| `analysis-meta property list` | Get event/user properties | `propName`, `propDesc`, `selectType`, `tableType` |
| `analysis-meta metric list` | Get existing metric definitions | `metricName`, `metricDesc`, `metricMode` |

3. **Exception interception and handling**:

| Exception scenario | Handling method |
|---------|---------|
| projectId invalid/non-existent | Stop and inform: "Project ID invalid, please check and provide again" |
| ae-cli metadata query failed | Stop and report the structured authentication, permission, routing, or validation error |
| Event table empty (<5 events) | Warning: "Tracking data too sparse, tag design may be incomplete, suggest supplementing tracking before proceeding" |
| Property table empty | Warning: "User property missing, Layer 1 profile tags cannot be designed" |

4. **Data preprocessing**:
   - Extract event name list (for industry identification)
   - Extract property name list + tableType (for distinguishing user property/event property)
   - Count events and properties

---

### Step 2: Industry Confirmation and Option Provision

**Goal**: Identify industry category, establish user understanding, provide viewing options.

Reference `references/industry-dict.md` for industry identification:

1. **Industry category identification**:
   - Traverse event names, match industry keywords
   - Calculate match rate = (matched keyword count / total keywords for that industry) × 100%
   - Select highest match rate (≥25% considered matched)

2. **Sub-category identification** (Secondary matching within industry category):

| Confidence threshold | Handling method |
|-----------|---------|
| ≥60% | High confidence, directly confirm industry + category |
| 25%-60% | Medium confidence, requires user confirmation |
| <25% | Low confidence, mark as [General Industry] or proactively ask |

3. **First reply output** (Reference `references/output-template.md`):

```markdown
📊 **Project metadata analysis completed**:

- 🔍 **Total events**: X items (list core events TOP10)
- 📝 **Total properties**: X items (user property X items, event property X items)
- 🏢 **Identified industry**: [Industry name] (match rate XX%)
- 🏷️ **Sub-category inferred**: [Category name]
- 💡 **Judgment basis**: Discovered feature data such as `[Event A]`, `[Property B]`.

**The entire tag system consists of 6 layers**:

[Table showing 6-layer architecture]

👉 **[Next step]**:
If the above industry identification is accurate, how would you like to view the tag solution?
- **A.** Layer-by-layer view (Recommended, start from Layer 1)
- **B.** Directly view core: Layer 5 [Industry] exclusive tags
- **C.** View complete solution (Output all layers at once)
- **D.** Industry identification deviation → Please tell me the true industry/category
```

---

### Step 3: Tag Definition Output

**Goal**: Output specific tag definitions according to user selection.

Reference `references/tag-framework.md` and `references/output-template.md`:

1. **Each layer tag output format**:

```markdown
### [Layer name] Tags

#### 🏷️ [Localized tag name]

* **Business definition**: [Describes what user characteristic, applicable to what analysis or operation scenario]
* **Recommended TE tag type**: `Condition Tag / Metric Value Tag / First/Last Tag / SQL Tag / ID Tag`

**⚙️ Calculation logic**:

* **Analysis subject**: `#user_id`
* **Data source**: `[Event name]` or `[User property]`
* **Time range**: `Last 7 days / Last 30 days / All time`
* **Filter condition**: `[Event property condition]`
* **Specific rule**: `[Sum / Count distinct / Judge whether / Take maximum]`

**📊 Recommended tag value tiering**:

| Tag value | Definition condition | Business meaning |
| :--- | :--- | :--- |
| [Value 1] | [Condition] | [Represents what user] |

---

### 🚀 Business application scenarios for this layer tags
[Explain how to use these tags for filtering, tiering or audience targeting]

### ⚠️ Missing fields and supplement suggestions
[List key missing events/properties, provide tracking supplement suggestions]
```

2. **Layer 5 industry exclusive tag design points**:
   - Must customize according to sub-category (Reference `industry-dict.md` sub-category [Exclusive tag focus] column)
   - Different categories should not have identical content
   - Event names and property names must come from real metadata

---

### Step 4: Guidance Closing (Mandatory)

**Goal**: Each reply must have next-step guidance at the end, maintain dialogue rhythm.

| Current state | Guidance prompt |
|---------|---------|
| After single layer view | "Above is Layer [X] tag design. Next would you like: View Layer [X+1], or summarize complete solution?" |
| After exclusive layer (Layer 5) view | "This is the customized industry exclusive tag for you. Do you think: Matches business intuition continue to Layer 6, or needs adjustment?" |
| After complete solution view | "Above is the complete tag system solution. Do you need: Extract core tag SQL calculation pseudocode, or end this design session?" |
| User requests adjustment | "Received your adjustment request, I will update Layer [X] design. Any other adjustments?" |

---

## 🎯 Core Principles

| Principle | Description |
|-----|------|
| Step-by-step | Reject long outputs, decompose layer-by-layer through menu selection |
| Mandatory guidance | Each reply must use question or multiple-choice to guide next step |
| Industry differentiation | Layer 5 exclusive tags must reflect category differences |
| Based on real data | Event names and property names must come from real tracking, missing ones go to supplement suggestions |
| Actionable definition | Business meaning and calculation rules clear, team can directly understand |
| Reasonable tag value tiering | Clear intervals, mutually exclusive and cover all users |
| Scenario-driven | Each tag explains applicable business scenarios |
| No configuration code generation | Only output design definitions; perform writes separately through confirmed ae-cli operations |

---

## 📋 Output Checklist (Self-Check)

**Confirm the following points before outputting solution**:

### Data acquisition layer
- [ ] ae-cli metadata commands invoked to acquire real project metadata
- [ ] Exception cases handled (no data/invocation failed)
- [ ] Industry category identification performed and user confirmation obtained

### Interaction flow layer
- [ ] At correct workflow step, no skipping output
- [ ] Layer selection menu provided for user on-demand viewing
- [ ] Clear [Next step guidance] at each reply end

### Content quality layer
- [ ] Layer 5 industry exclusive tags customized according to sub-category
- [ ] All event names and property names from real metadata
- [ ] Each tag includes: business definition, TE type, calculation logic, tag value tiering
- [ ] Tag value tiering has clear numerical intervals
- [ ] Field missing with alternative solution + tracking suggestion
- [ ] Priority ranking provided (P0/P1/P2)

---

## 📚 Knowledge Base Quick Index

### industry-dict.md (Industry category identification)

| Industry category | Keyword examples | Sub-category count |
|---------|-----------|-----------|
| Gaming | login, battle, gacha, level_up | 7 (MMO/Card/Casual/Strategy/Arena/Board/Anime) |
| E-commerce | view_product, add_cart, place_order | 5 (General/Vertical/Live/Cross-border/B2B) |
| Finance | apply_loan, invest, withdraw | 5 (Consumer loan/Investment/Insurance/Securities/Wallet) |
| Education | course_view, lesson_complete, exam | 5 (K12/Vocational/Language/MOOC/Hobby) |
| Social/Content | post, like, share, follow | 4 (Short video/Image-text/Novel/Creator) |
| Others | Travel/Health/SaaS/Media/Tool | Each has sub-categories |

**Match rate threshold**: ≥60% high confidence, 25%-60% medium confidence needs confirmation, <25% low confidence mark general.

---

### tag-framework.md (Tag hierarchy specification)

| Layer | Name | Recommended TE type | Design points |
|-----|------|-----------|---------|
| 1 | User profile & identity | Condition/SQL/ID Tag | Don't copy raw fields, only design features requiring calculation; ID tag for importing external marking relationships |
| 2 | Active behavior | Metric Value/Condition Tag | Measure stickiness (active days use metric value tag, active tiering use condition tag) |
| 3 | Usage depth | Metric Value/Condition Tag | Combine industry core functions, count behavior frequency or judge whether achieved |
| 4 | Payment & commercial value | Metric Value/Condition/First-Last Tag | Metric value tag for amount statistics, first-last tag record first/last payment features, condition tag for payment tiering |
| 5 | **Industry exclusive** ⭐ | Customize by industry | Core differentiation, design by sub-category (may involve all TE tag types) |
| 6 | Lifecycle & comprehensive | Condition/SQL Tag | Comprehensive multi-layer tags to define stages, complex logic use SQL tag |

**TE tag type selection**:

| Type | Applicable scenario | Example |
|-----|---------|-----|
| **ID Tag** | Import external file created tags, file contains ID or property and tag value marking relationship | Phone numbers collected from offline marketing events and user interest category marking; user list exported from third-party system and points relationship |
| **Condition Tag** | Define whether to mark user based on whether user performed certain event or sequentially performed a set of events | [Important user: Recent payment over 500 yuan] [Important user: Recent activity over 80%], each tag value configured separately, can combine multiple behaviors or properties |
| **First-Last Tag** | Value of certain event property when user first or last performed specified event as tag value | First payment product, first payment amount; last active user level |
| **Metric Value Tag** | Aggregate operation on user's event property within time range, result as tag value | Yesterday active duration, last 30 days payment amount, last 7 days login count |
| **SQL Tag** | Complex logic defining user tag, data rules not configurable through other types | Consecutive active days, complex RFM tiering logic |

> **Note**: ID tag default personal limit is 50

---

### output-template.md (Output format)

| Template type | Usage |
|---------|-----|
| First reply template | Step 2 industry confirmation + option provision |
| Single tag definition format | Step 3 standard output structure for each tag |
| Complete solution document structure | Complete document when user selects view all |
| Guidance closing template | Step 4 guidance prompt at each reply end |

---

## Language Constraint

**[LANGUAGE CONSTRAINT]**: Generate your response in the EXACT SAME LANGUAGE as the user's input. If user queries in Chinese, respond entirely in Chinese. If user queries in English, respond in English. Do not mix languages unless explicitly translating terms.

