What Source Content Formats Does cangjie-skill Support?

cangjie-skill supports two source content formats: Markdown files (*.md) for skill definitions and Darwin-compatible JSON (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 — Global book metadata and context
  • INDEX.md — Structured navigation for the skill collection
  • DIGEST.md — Reader-facing summary content
  • 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. 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

# {{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 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), every skill must include a test-prompts.json file that conforms to the darwin-skill JSON schema. The template at templates/test-prompts.json.template provides the canonical structure.

test-prompts.json Structure

The JSON file enumerates test cases with three key fields:

[
  {
    "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

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 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.

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 →