How Candidate Skills Are Structured into the RIA++ Format in Stage 2

In Stage 2 of the cangjie-skill pipeline, candidate methodological units are transformed into Claude Code skills using the RIA++ schema—a six-section blueprint that standardizes activation triggers, execution steps, and usage boundaries.

The cangjie-skill repository implements a systematic pipeline for extracting decision-making frameworks from source texts. During Stage 2, the project converts validated methodological units from Stage 1.5 into Claude Code skills that conform to the RIA++ format, ensuring each skill carries precise activation logic and operational constraints.

The Six Sections of the RIA++ Schema

The RIA++ format structures each candidate skill into six distinct sections defined in methodology/04-stage2-ria-plus.md. This schema drives how the skill is recognized, invoked, and bounded during execution.

R — Reading (Direct Quotation)

The Reading section contains a direct quotation from the original source, limited to 150 characters or 100 words, with precise citation. This section anchors the skill to its canonical origin.

> "Original quote" — Author, Chapter/Page

I — Interpretation (Methodology Skeleton)

The Interpretation section rewrites the core idea in the author's own words across 5–15 lines. This explanation must be comprehensible to readers who have not encountered the original source, translating abstract concepts into actionable mental models.

A1 — Past Application (Historical Cases)

The Past Application section documents one to three concrete cases where the author applied the methodology. Each case follows a structured narrative: problem identification, methodology application, conclusion reached, and measurable result achieved. These appear as structured bullet points under "案例 1", "案例 2", etc.

A2 — Future Trigger ★ (Activation Logic)

The Future Trigger section is the only component that feeds the skill's description front-matter. It defines:

  • Invocation scenarios: 3–5 realistic contexts where the skill applies
  • Language signals: Representative user utterances in Chinese and English that indicate intent
  • Skill distinction: Preliminary comparison to neighboring skills to prevent collision

This section determines when Claude should activate the skill.

E — Execution (Concrete Steps)

The Execution section translates the methodology into 1–3 concrete steps, each featuring:

  • A measurable completion criterion
  • Optional "stop-go" branching logic ("判停条件") for conditional flow control

For example:

1. **列出所有选项**
   - 完成标准: 选项数量 ≥ 3
2. **评估正反理由**
   - 完成标准: 每选项列出 ≥ 2 条正面/负面理由
   - 判停条件: 若出现关键风险则直接跳到步骤 3

B — Boundary ★ (Usage Constraints)

The Boundary section explicitly defines situations where the skill must not be used, including:

  • Author-cited failure modes
  • The author's acknowledged blind spots or historical limitations
  • Confusable neighboring methodologies that might trigger incorrectly

This creates a negative constraint space that prevents skill misfires.

Front-Matter Metadata Structure

Each RIA++ skill file begins with YAML front-matter that encodes the essential metadata and the condensed A2 description. According to the schema defined in the repository, the front-matter appears immediately before the markdown body:

---
name: <skill-slug>
description: |
  <何时用 + 何时不用 + 关键 trigger>
source_book: 《<BOOK_TITLE>》 <AUTHOR>
source_chapter: <章节>
tags: [<tag1>, <tag2>]
related_skills: []    # 填充于 Stage 3

---

The description field is directly derived from the A2 (Future Trigger) section, enabling Claude to evaluate whether the skill should activate based on user intent.

Implementation Files and Templates

The RIA++ architecture is instantiated through specific files in the repository:

  • methodology/04-stage2-ria-plus.md: Defines the six-section layout, front-matter specifications, and quality-control rules
  • templates/SKILL.md.template: Jinja-style template used to render each candidate skill into a concrete SKILL.md
  • extractors/*-extractor.md: Provide raw material (quotes, cases, methodologies) that populate the R/I/A sections prior to Stage 2 processing

During the pipeline execution, the template engine processes these components to generate the final skill artifacts.

Complete SKILL.md Example

The following excerpt from a rendered SKILL.md demonstrates how the RIA++ sections populate the document structure:

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

# 逆向思维

## R — 原文 (Reading)

> "...逆向思维能帮助我们发现隐藏的风险..." — 查理·芒格, 第三讲

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

(作者自行阐述的 7-行概述)

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

### 案例 1: …

- **问题**: …
- **方法论的使用**: …
- **结论**: …
- **结果**: …

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

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

1. …
2. …
3. …

### 语言信号

- "我该怎么决定"
- "怎样才能成功"
- "列出正面理由"

### 与相邻 skill 的区分

- 与 `decision-tree` 的区别: …

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

1. **列出所有选项**
   - 完成标准: 选项数量 ≥ 3
2. **评估正反理由**
   - 完成标准: 每选项列出 ≥ 2 条正面/负面理由
   - 判停条件: 若出现关键风险则直接跳到步骤 3
3. **做出最终决定**
   - 完成标准: 明确选出最佳选项

## B — 边界 (Boundary) ★

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

- 纯粹的事实查询
- 日常琐碎选择(如午餐吃什么)

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

- 忽视隐藏风险…

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

- …

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

- …

This structure ensures that every skill carries self-contained activation logic, executable instructions, and explicit guardrails.

Summary

  • The RIA++ format structures Stage 2 candidate skills into six sections: R (Reading), I (Interpretation), A1 (Past Application), A2 (Future Trigger), E (Execution), and B (Boundary).
  • The A2 section generates the front-matter description field, controlling when Claude activates the skill.
  • Front-matter in SKILL.md files includes name, description, source_book, source_chapter, tags, and related_skills.
  • Implementation resides in methodology/04-stage2-ria-plus.md and templates/SKILL.md.template.
  • Each section carries specific constraints: Reading limits quotes to 150 characters, Execution defines measurable completion criteria, and Boundary explicitly prohibits misuse.

Frequently Asked Questions

What does the "A2 — Future Trigger" section control in the RIA++ format?

The A2 section defines the skill's activation logic and feeds directly into the description front-matter field. It specifies invocation scenarios, language signals (user utterances in Chinese and English), and distinctions from neighboring skills. This section determines when Claude should trigger the skill during conversation.

Why is the RIA++ format called "plus" compared to standard RIA?

The "plus" designation indicates the expansion from a basic Read-Interpret-Apply framework to include E (Execution) and B (Boundary) sections. These additions provide concrete step-by-step instructions with completion criteria and explicit negative constraints that prevent skill misfires, creating a more robust operational definition than traditional RIA schemas.

How does the Boundary section prevent skill misuse?

The B — Boundary section lists specific failure modes, author blind spots, and confusable methodologies where the skill must not activate. By cataloging antipatterns such as "不要在以下情况使用此 skill" (do not use in these situations), the section creates guardrails that prevent the skill from firing on irrelevant queries like pure fact retrieval or trivial daily decisions.

Where is the RIA++ schema formally defined in the repository?

The schema is formally specified in methodology/04-stage2-ria-plus.md, which documents the six-section layout, front-matter design, and quality-control rules. The concrete implementation occurs through templates/SKILL.md.template, which renders candidate skills into compliant SKILL.md files during the Stage 2 pipeline execution.

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 →