# What Source Content Formats Does cangjie-skill Support?

> Discover the source content formats cangjie-skill supports. Learn how to use Markdown for skill definitions and JSON for automated testing.

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: api-reference
- Published: 2026-08-13

---

**cangjie-skill supports two source content formats: Markdown files (`*.md`) for skill definitions and Darwin-compatible JSON ([`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json)) for automated testing.**

The `kangarooking/cangjie-skill` repository is a framework for converting educational content into modular, test-driven AI skills. Understanding its supported source content formats is essential for anyone building or extending skill packs. This guide examines each format's structure, purpose, and location in the codebase.

## Markdown Files: The Core Skill Format

**Markdown files** serve as the primary vehicle for skill content in cangjie-skill. The system expects specific file types organized throughout a skill repository.

A typical skill package contains:

- [`BOOK_OVERVIEW.md`](https://github.com/kangarooking/cangjie-skill/blob/main/BOOK_OVERVIEW.md) — Global book metadata and context
- [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) — Structured navigation for the skill collection
- [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md) — Reader-facing summary content
- [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) — Term definitions and reference material
- `*/SKILL.md` — Individual skill definitions (one per skill)

### SKILL.md Structure

Each per-skill Markdown file resides in its own directory and follows a strict template defined in [`templates/SKILL.md.template`](https://github.com/kangarooking/cangjie-skill/blob/main/templates/SKILL.md.template). The file captures:

- **Skill name and description**
- **Trigger conditions** for skill activation
- **Execution patterns** defining how the skill operates
- **Optional metadata** such as `source_book` and `source_chapter`

```markdown

# {{SKILL_TITLE}}  

source_book: 《{{BOOK_TITLE}}》 {{AUTHOR}}  
source_chapter: {{章节}}  

## 触发条件  

- {{trigger_description}}

## 执行模式  

- {{execution_pattern}}

```

The template uses placeholder syntax (`{{VARIABLE}}`) for automated generation, allowing the framework to populate content from source material during the skill creation pipeline.

## Darwin-Compatible JSON: The Testing Format

The second source content format is **Darwin-compatible JSON**, implemented as [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) files. This format enables automated pressure-testing and evolutionary improvement of skills.

According to [[`methodology/06-stage4-pressure-test.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md)](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md), every skill must include a [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file that conforms to the *darwin-skill* JSON schema. The template at [`templates/test-prompts.json.template`](https://github.com/kangarooking/cangjie-skill/blob/main/templates/test-prompts.json.template) provides the canonical structure.

### test-prompts.json Structure

The JSON file enumerates test cases with three key fields:

```json
[
  {
    "prompt": "请解释《{{BOOK_TITLE}}》第{{source_chapter}}的核心观点。",
    "expected": "…（模型应给出的答案）…",
    "tags": ["核心概念"]
  },
  {
    "prompt": "（不应出现的情景）",
    "expected": "（模型应拒绝或给出默认回复）",
    "tags": ["边界测试"]
  }
]

```

Each test case specifies:

- **`prompt`** — The input query to test against the skill
- **`expected`** — The desired model output or behavior
- **`tags`** (optional) — Categorical labels for organizing tests

The framework supports **"bait" prompts** — deliberately tricky inputs designed to verify that skills refuse inappropriate requests or provide safe fallback responses.

## How the Formats Work Together

These two source content formats operate in tandem throughout the cangjie-skill pipeline:

1. **Markdown files** define *what* the skill knows and *when* to activate
2. **JSON test files** verify *how well* the skill performs under varied conditions

Both formats are designed for **automatic evolution**: the testing framework can identify weak points in a skill and trigger regeneration of the underlying Markdown content.

## Summary

- **Markdown (`*.md`)** — Primary skill content format; includes [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md), [`BOOK_OVERVIEW.md`](https://github.com/kangarooking/cangjie-skill/blob/main/BOOK_OVERVIEW.md), [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md), [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md), and [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md)
- **Darwin JSON ([`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json))** — Required testing format per the *darwin-skill* schema; enables automated pressure-testing
- **Template files** — Located in `templates/SKILL.md.template` and `templates/test-prompts.json.template`
- **Documentation** — Full specification in [`methodology/06-stage4-pressure-test.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/06-stage4-pressure-test.md)

## Frequently Asked Questions

### Is Markdown the only text format cangjie-skill accepts?

Yes. As implemented in `kangarooking/cangjie-skill`, Markdown is the sole text format for source content. The framework does not support reStructuredText, AsciiDoc, or other markup languages. All skill metadata, descriptions, and execution patterns must reside in `*.md` files following the established templates.

### What happens if a skill lacks test-prompts.json?

A missing or malformed [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file breaks the automated pressure-testing stage. Per the methodology documentation, every skill must ship this file for the system to perform quality validation and automatic evolution. Skills without it cannot complete the full pipeline.

### Can I extend cangjie-skill to support additional formats?

The current implementation hardcodes support for these two source content formats. Any extension would require modifying the ingestion pipeline in the core codebase and updating the templates in the `templates/` directory. The modular design suggests this is feasible, but no plugin architecture exists in the current version.