How to Determine Trigger Conditions (A2 Field) for Skill Descriptions in cangjie-skill

The A2 field in cangjie-skill defines a skill's "Future Trigger" through concrete user scenarios, explicit language signals in both Chinese and English, and clear differentiation from related skills, all condensed into a ≤300-word description string parsed by Claude for skill activation.

In kangarooking/cangjie-skill, every skill definition relies on precise trigger conditions stored in the A2 section. This field directly populates the front-matter description in SKILL.md, which Claude uses to decide when to activate a given skill. Understanding how to craft effective A2 trigger conditions is essential for building reliable, non-overlapping skills.

Understanding the A2 Field Structure

The A2 section follows a strict format defined in methodology/04-stage2-ria-plus.md. The structure mandates three components:

  • When to invoke (何时调用): Observable user situations
  • When NOT to invoke (何时不调用): Explicit exclusion cases
  • Trigger keywords (触发词): Bilingual language signals for matching

Here is the complete flow from raw analysis to final description field:

  1. Identify concrete scenarios – List 3-5 realistic, observable situations where users need this mental model
  2. Extract language signals – Document exact phrases users say (Chinese and English)
  3. Differentiate from neighbors – Note how this skill differs from related skills
  4. Compose final description – Merge into ≤300 words following the template structure

Step 1: Identify Observable User Scenarios

The A2 definition in 04-stage2-ria-plus.md requires scenarios that are "必须明确" (must be explicit). Vague scenarios like "when making decisions" fail because Claude cannot match them reliably.

Strong scenarios are actionable and utterance-based:

  • "用户纠结一个决策,列举正面理由却理不出头绪"
  • "用户问'怎么做 X 才能成功'"
  • "用户在多个相似选项之间反复比较"

Each scenario must describe something you could realistically hear in a user message.

Step 2: Extract Bilingual Language Signals

The SKILL.md.template explicitly asks for "语言信号" (language signals). These become the matching keywords Claude uses against incoming messages.

Scenario Chinese Signals English Signals
Decision paralysis "纠结决定", "拿不定主意" "decision stuck", "can't decide"
Achievement seeking "怎么做到", "如何才能" "how to achieve", "how to succeed"
Option comparison "选哪个", "A 还是 B" "which one", "vs", "compare"

Include both languages even if you expect primarily Chinese queries—Claude's matching benefits from semantic coverage.

Step 3: Differentiate From Neighboring Skills

In the draft stage, briefly note how this skill's trigger differs from related ones. The full refinement happens after stage 3 linking, per 04-stage2-ria-plus.md.

Example distinction note:

"不同于 pro-con-list 技能(用户已明确列出优缺点),本技能针对的是用户尚未结构化的纠结状态。"

This prevents false activation when multiple skills could theoretically apply.

Step 4: Compose the Final Description Field

The composed description string goes directly into SKILL.md front-matter. The format is rigid:

---
name: reverse-thinking
description: |
  当用户纠结一个决策、列举正面理由却理不出头绪时;或在问"怎么做 X 才能成功"时;
  不适用于纯信息查询、日常琐碎选择。
  触发词 (中英双写): "纠结决定", "decision stuck", "怎么做到", "how to achieve"
source_book: 《穷查理宝典》
source_chapter: 第三讲
tags: [decision, mental-model, cognitive-bias]
related_skills: []
---

Key constraints from the source code:

  • ≤300 words – Long descriptions dilute matching precision
  • Starts with "当用户" – Standardized opening for parser consistency
  • Explicit "不适用于" section – Critical for negative examples
  • Bilingual trigger words – Ensures robust matching

Programmatic Description Generation

The pipeline uses helper functions to standardize A2 composition. Below is a Python pattern derived from the repository's processing logic:

def build_a2_description(scenarios, signals, not_applicable):
    """Compose the A2 front-matter description string.
    
    Parameters match the three required sections from 04-stage2-ria-plus.md.
    """
    parts = [
        "当用户" + "、".join(scenarios) + "时;",
        "不适用于" + "、".join(not_applicable) + "。",
        "触发词 (中英双写): " + ", ".join(signals)
    ]
    return "\n".join(parts)


# Example: Building description for a decision-framing skill

scenarios = [
    "纠结一个决策",
    "列举正面理由却理不出头绪"
]
signals = [
    "纠结决定",
    "decision stuck", 
    "怎么做到",
    "how to achieve"
]
not_applicable = [
    "纯信息查询",
    "日常琐碎选择"
]

description = build_a2_description(scenarios, signals, not_applicable)
print(description)

Output:


当用户纠结一个决策、列举正面理由却理不出头绪时;
不适用于纯信息查询、日常琐碎选择。
触发词 (中英双写): 纠结决定, decision stuck, 怎么做到, how to achieve

Validating Trigger Precision Under Pressure

After composing the A2 description, validation occurs during stage 4 pressure testing documented in methodology/06-stage4-pressure-test.md. This tests:

  • False positives: Does the skill activate on non-target queries?
  • False negatives: Does it miss legitimate trigger scenarios?
  • Overlap with neighbors: Do related skills compete for the same utterances?

Precision failures return to 04-stage2-ria-plus.md for A2 refinement. Only after pressure testing passes does the skill enter production.

Key Files for A2 Implementation

File Purpose
methodology/04-stage2-ria-plus.md A2 requirements, checklist, and best-practice examples
templates/SKILL.md.template Skeleton for SKILL.md with A2 placeholders
SKILL.md Concrete skill with populated description field
methodology/06-stage4-pressure-test.md Trigger precision validation protocol

Summary

  • A2 is the activation gate: The description field parsed by Claude determines skill firing
  • Concrete > abstract: Observable scenarios beat vague concepts every time
  • Bilingual signals matter: Chinese and English trigger words together improve match coverage
  • Explicit exclusions reduce error: The "不适用于" section prevents false activation
  • ≤300 words maintains precision: Long descriptions dilute matching effectiveness
  • Pressure testing validates: Real queries expose trigger gaps before deployment

Frequently Asked Questions

Why must A2 descriptions stay under 300 words?

Long descriptions introduce noise that degrades Claude's matching accuracy. The 300-word limit in 04-stage2-ria-plus.md forces concise, high-signal trigger definitions. Exceeding this risks the skill either never firing or firing unpredictably on partial matches.

How do I handle skills with overlapping trigger scenarios?

First draft your A2 with a note on neighbor differentiation. After stage 3 linking, return to refine this distinction based on actual related skills. The final resolution happens in pressure testing, where you add explicit "不适用于" exclusions or adjust trigger word specificity.

Can I use only Chinese trigger signals?

Technically yes, but the SKILL.md.template explicitly requests "中英双写" (Chinese and English). Bilingual coverage improves robustness against mixed-language queries and ensures the skill activates regardless of which language dominates the user's expression.

What makes a scenario "observable" versus too vague?

Observable scenarios describe specific user utterances or visible behaviors. "用户纠结一个决策" is observable—you can see this in messages. "需要深度思考时" is too vague—no concrete linguistic marker exists. The "必须明确" checklist in 04-stage2-ria-plus.md enforces this standard.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →