How to Create a SKILL.md File Using the R/I/A1/A2/E/B Template in Cangjie-Skill

Create a SKILL.md file by filling the R/I/A1/A2/E/B template from templates/SKILL.md.template, replacing placeholders with concrete values for your skill.

The cangjie-skill pipeline transforms book knowledge into executable AI skills through a strict markdown format. Each skill originates from a single SKILL.md file following the RIA++ structure: Reading, Interpretation, A1 Past Application, A2 Future Trigger, Execution, and Boundary. This guide walks you through creating this file using the official template and methodology specifications.

Start with the Template File

The foundation is templates/SKILL.md.template in the repository root. This file contains:

  • Required YAML front-matter with placeholder variables ({{…}})
  • Six standardized section headings
  • Inline instructions for each field

Copy this template rather than starting from scratch. The structure is enforced by the pipeline's validation stages.

Fill the Front-Matter Fields

The YAML header requires four core fields:

Field Requirement Source Reference
name Kebab-case unique identifier methodology/04-stage2-ria-plus.md "Frontmatter 设计"
description ≤300 words combining what, when, and key trigger phrases (from A2) Template guidelines
source_book, source_chapter Exact citation for audit trail Original source material
tags, related_skills Metadata for linking (leave related_skills empty for stage 3) Pipeline specification

The description field is critical—it feeds directly into AI retrieval systems. It must capture the A2 Future Trigger content in compressed form.

Populate the Six Body Sections

R — Reading: The Verbatim Anchor

  • Length constraint: ≤150 characters (≤100 English words)
  • Must be exact quote with chapter/page/timestamp
  • No paraphrasing permitted

This section grounds the skill in authoritative source material.

I — Interpretation: Your Synthesis

Rewrite the core idea in 5–15 lines. The reader should grasp the method without consulting the original book. Avoid copy-paste from source.

A1 — Past Application: Evidence from the Book

Document 1–3 concrete cases where the author applied this method. Each case needs:

  • Problem statement
  • Approach taken
  • Conclusion reached
  • Outcome observed

All cases must be factually derived from the source material.

A2 — Future Trigger: The Activation Engine

This section determines when your skill fires. Include three subsections:

  1. User scenarios (3–5 items): When would someone need this?
  2. Language signals: Exact phrases that trigger activation (e.g., "怎么才能…", "如何决定…")
  3. Skill differentiation: Preliminary notes separating this from neighboring skills

The A2 content becomes your front-matter description.

E — Execution: Actionable Steps

Provide 1–3 concrete steps with:

  • Clear completion criteria
  • Optional branching conditions ("判停条件")

Steps must be actionable by an AI agent, not vague advice.

B — Boundary: Safety Guardrails

Prevent over-application by documenting:

  • Do-not-use situations: When is this skill inappropriate?
  • Author-warned failure modes: What did the source caution against?
  • Author blind spots: Historical or domain limitations
  • Confusable methods: Nearby techniques that look similar

Sources for this section include counter-example-extractor.md and stage 0 critique materials.

File Location and Saving

Place completed files at:

books/<book-slug>/<skill-slug>/SKILL.md

The repository includes a working example at SKILL.md (root) demonstrating a fully-populated skill.

Complete Example: Reverse Thinking Skill

Below is a minimal, valid SKILL.md following all constraints:

---
name: reverse-thinking
description: |
  当用户在纠结决策、列举正面理由却理不出头绪时;或在问"怎么做 X 才能成功"时;不适用于纯信息查询或日常琐碎选择。
source_book: 《穷查理宝典》 查理·芒格
source_chapter: 第三讲
tags: [decision, mental-model, cognitive-bias]
related_skills: []    # 阶段 3 填充

---

# 逆向思维

## R — 原文 (Reading)

> "当面对复杂决策时,先想象最坏的结果,然后再逆向思考如何避免它。"  
> — 查理·芒格, 第三讲

---

## I — 方法论骨架 (Interpretation)

逆向思维是一种先假设最糟情况出现,再倒推需要做哪些关键行动以防止该情境实现的策略。它帮助决策者突破常规思维框架,聚焦于风险点并制定防御措施。通过把注意力转向"如果…会怎样",可快速识别隐藏的假设并找到最简洁的解决方案。

---

## A1 — 书中的应用 (Past Application)

### 案例 1: 投资决策

- **问题**: 芒格在评估一家新兴公司时,担心技术不可行。
- **方法论的使用**: 他设想技术完全失败的后果,并逆向推导必须满足的最少技术指标。
- **结论**: 只要满足这些指标,风险即可接受。
- **结果**: 该公司随后成功上市,投资回报率达 300%。

---

## A2 — 触发场景 (Future Trigger) ★

### 用户会在什么情境下需要这个 skill?

1. 面临需要做重大决策但感到信息过载。
2. 需要快速识别项目的最大风险点。
3. 在团队讨论中陷入"好主意"循环,缺少批判视角。

### 语言信号 (用户的话里出现这些就应激活)

- "我该怎么决定…?"
- "如果最坏的情况出现,我该怎么办?"
- "有没有办法先找出最大的风险?"

### 与相邻 skill 的区分

- 与 `scenario-planning` 的区别: 本 skill 专注于单一决策的逆向风险,后者更侧重多种情境的前瞻规划。

---

## E — 可执行步骤 (Execution)

当 skill 被激活后, agent 应按以下步骤执行:

1. **定义最坏情境**  
   - 完成标准: 用户明确描述潜在的最糟结果。
2. **列出关键风险因素**  
   - 完成标准: 至少三项可量化的风险点。
   - 判停条件: 若风险因素少于两项,则返回步骤 1 重新定义情境。
3. **逆向制定防御措施**  
   - 完成标准: 每个风险点对应至少一具体行动计划。

---

## B — 边界 (Boundary) ★

### 不要在以下情况使用此 skill

- 只需要查找事实信息(如"今天北京天气如何?")。
- 需要长期战略规划,而不是单一决策的风险评估。

### 作者在书中警告的失败模式

- 过度聚焦最坏情境导致悲观决策。

### 作者的盲点 / 时代局限

- 该方法在高度不确定的创新领域可能不适用,因为最坏情境难以预见。

### 容易混淆的邻近方法论

- "场景规划" – 更宏观、包含多种可能性;本 skill 只关注逆向风险。

---

## 相关 skills (阶段 3 填充)

- depends-on: {}
- contrasts-with: {}
- composes-with: {}

---

## 审计信息

- **验证通过**: V1 ✓ / V2 ✓ / V3 ✓
- **测试通过率**: 92 % (详见 test-prompts.json)
- **蒸馏时间**: 2026-08-16

Stage 3 Linking and Audit Fields

After creation, two elements complete the skill:

Related skills linking: Populate related_skills array and the "相关 skills" block with depends-on, contrasts-with, and composes-with relationships. This happens in pipeline stage 3.

Audit fields (optional but recommended): Track verification status, test-prompt pass rate, and extraction time at the file bottom once the skill passes triple-verification (stage 1.5) and pressure-testing (stage 4).

Key Reference Files

File Purpose
templates/SKILL.md.template Master template with placeholders
methodology/04-stage2-ria-plus.md Detailed RIA++ specification and quality checks
SKILL.md (root) Concrete finished example
methodology/00-overview.md Pipeline architecture context

Summary

  • Start from templates/SKILL.md.template—never create from scratch
  • Front-matter description must compress A2 content into ≤300 words
  • R section requires verbatim quotes with exact citations, no paraphrasing
  • A2 determines skill activation—invest heavily in trigger phrases
  • E section needs concrete steps with completion criteria, not vague advice
  • B section prevents harm by documenting failure modes and boundaries
  • Save to books/<book-slug>/<skill-slug>/SKILL.md for pipeline ingestion
  • Stage 3 completes linking; stage 4 validates through pressure-testing

Frequently Asked Questions

What happens if I exceed the 150-character limit for the R section?

The pipeline validation flags oversized quotes. Truncate strategically while preserving the core claim and citation. The constraint ensures retrieval efficiency—long quotes dilute semantic search precision.

Can I leave A2 empty and fill it later?

No. A2 is starred (★) as critical in the template because it drives both the front-matter description and the skill's activation logic. Without it, the skill cannot pass stage 1 validation.

Where does the B section content come from?

Boundary material derives from three sources: the original author's explicit warnings in the book, counter-example-extractor.md analysis, and stage 0 critique identifying author blind spots or historical limitations.

How do I handle skills that seem similar to existing ones?

Document distinctions in A2's "与相邻 skill 的区分" subsection. Be specific about scope, trigger conditions, and execution differences. Stage 3 linking will formalize these relationships in contrasts-with mappings.

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 →