# How cangjie-skill Integrates with Darwin-skill for Automatic Skill Evolution

> Learn how cangjie-skill integrates with darwin-skill for automatic skill evolution. Discover how to test, compare, and evolve skills without manual retraining.

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: how-to-guide
- Published: 2026-08-16

---

**Cangjie-skill emits a darwin-compatible [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file that enables darwin-skill to automatically test, compare, and evolve book-distilled skills without manual retraining.**

This integration creates a complete "distill-then-evolve" pipeline for book-based AI skills. Cangjie-skill handles the initial conversion of book content into structured intelligence, while darwin-skill provides the continuous refinement engine that keeps that intelligence current as underlying models improve.

## The compositional relationship between cangjie-skill and darwin-skill

The two skills operate as distinct, composable components in a larger ecosystem. According to the source code in [`README.en.md`](https://github.com/kangarooking/cangjie-skill/blob/main/README.en.md), this mirrors how **nuwa‑skill** distills people-centric skills and darwin-skill evolves them—cangjie-skill plays the equivalent role for books【README.en.md†Line 13‑Line 158】.

**Cangjie-skill's responsibility:** Convert a book into a deployable skill directory containing markup files, schemas, and critically, a [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file marked with `darwin_compatible: true`.

**Darwin-skill's responsibility:** Read that test file, execute prompts against the current model, detect drift or improvement opportunities, and rewrite the skill when beneficial.

This separation of concerns means cangjie-skill never needs to implement evolution logic—it only needs to produce valid, well-structured test prompts that darwin-skill understands.

## The [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) format that enables integration

In `templates/test-prompts.json.template`, cangjie-skill defines the schema that darwin-skill expects【templates/test‑prompts.json.template†Line 5】. The template includes a `darwin_compatible: true` flag that signals to darwin-skill that this skill is ready for automated evolution.

This file contains:

- **Test prompts** that exercise the skill's core capabilities
- **Expected output patterns** or evaluation criteria
- **Metadata** linking prompts to specific skill functions

By embedding this file directly in the output directory, cangjie-skill ensures that any skill it produces can immediately enter the darwin-skill evolution loop without additional configuration.

## The two-command workflow for skill evolution

The complete pipeline requires only two commands, as documented in [`methodology/07-stage5-deliver.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/07-stage5-deliver.md)【methodology/07‑stage5‑deliver.md†Line 61】:

```bash

# Stage 1: Distill the book into a skill with test prompts

cangjie run --book my-great-novel --output-dir books/my-great-novel

```

This creates a directory containing:
- Distilled knowledge files
- Skill configuration
- [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) (darwin-compatible)

```bash

# Stage 2: Enable continuous evolution via darwin-skill

darwin evolve books/my-great-novel/

```

Darwin-skill then:

1. Loads [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) from the specified directory
2. Executes each prompt against the current model version
3. Compares outputs against historical baselines or quality thresholds
4. Generates improved skill versions when test results indicate progress
5. Preserves the evolution history for auditability

## Why this integration matters for skill maintenance

Without darwin-skill integration, book-distilled skills would require manual re-distillation whenever:

- Underlying LLM capabilities shift
- New editions of the source book emerge
- Usage patterns reveal gaps in coverage

The [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) bridge eliminates this maintenance burden. Because darwin-skill treats the skill as a testable artifact, evolution becomes a continuous, automated process rather than a periodic manual project.

As described in [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md), this represents the fifth and final stage of cangjie-skill's pipeline: delivering a skill that is not merely functional but **pressure-tested and evolution-ready**【SKILL.md†Line 28‑Line 64】.

## Ecosystem context: nuwa-skill, cangjie-skill, and darwin-skill

The README positions these three skills as a unified system【README.en.md†Line 13‑Line 158】:

| Skill | Domain | Output | Darwin Integration |
|-------|--------|--------|------------------|
| **nuwa-skill** | People/interviews | Human-centric skills | Via [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) |
| **cangjie-skill** | Books/text | Book-distilled skills | Via [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) |
| **darwin-skill** | Any skill type | Evolved, updated skills | Consumes compatible test files |

This architecture allows darwin-skill to evolve skills from heterogeneous sources through a single, consistent interface: the [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) contract.

## Implementation details from the source code

The integration relies on specific conventions enforced by cangjie-skill's template system:

- **File location:** [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) must reside in the skill root directory
- **Version compatibility:** The `darwin_compatible` boolean flag confirms schema alignment
- **Prompt structure:** Each test case includes input, expected behavior description, and evaluation rubric

These conventions are hardcoded in `templates/test-prompts.json.template`, ensuring that every book processed through cangjie-skill produces evolution-ready artifacts【templates/test‑prompts.json.template†Line 5】.

## Summary

- **Cangjie-skill** and **darwin-skill** integrate through a standardized [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file that enables automatic skill evolution
- The `darwin_compatible: true` flag in `templates/test-prompts.json.template` signals that a skill is ready for darwin-skill processing
- The complete workflow requires only `cangjie run` followed by `darwin evolve books/<slug>/`【methodology/07‑stage5‑deliver.md†Line 61】
- This compositional design mirrors the nuwa-skill/darwin-skill relationship for people-centric skills【README.en.md†Line 13‑Line 158】
- The five-stage pipeline in [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) culminates in delivering a pressure-tested, evolution-ready skill artifact【SKILL.md†Line 28‑Line 64】

## Frequently Asked Questions

### What is the exact file that enables cangjie-skill and darwin-skill integration?

The [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file, generated from `templates/test-prompts.json.template`, serves as the integration point【templates/test‑prompts.json.template†Line 5】. This file contains test cases marked with `darwin_compatible: true`, which darwin-skill recognizes and consumes to drive the evolution process.

### Can I use darwin-skill with a cangjie-skill output immediately, or does it require configuration?

No additional configuration is required. As long as cangjie-skill has generated the [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) file in the output directory, running `darwin evolve books/<slug>/` will immediately begin the evolution loop【methodology/07‑stage5‑deliver.md†Line 61】.

### How does the cangjie-skill/darwin-skill relationship compare to nuwa-skill?

Both follow identical integration patterns. Nuwa-skill distills person interviews into skills with [`test-prompts.json`](https://github.com/kangarooking/cangjie-skill/blob/main/test-prompts.json) files; cangjie-skill does the same for books. Darwin-skill consumes both indiscriminately, enabling a unified evolution layer across skill types【README.en.md†Line 13‑Line 158】.

### What happens during darwin-skill evolution of a cangjie-skill output?

Darwin-skill reads the test prompts, executes them against the current model, compares results to baselines, and rewrites the skill when improvements are detected. The cangjie-skill user need not intervene—the process is fully automated once initiated.