# How cangjie‑skill Works with darwin‑skill for Automatic Skill Evolution

> Discover how cangjie-skill works with darwin-skill to automatically test, compare, and evolve distilled book skills. Streamline your skill evolution process without manual retraining.

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: deep-dive
- Published: 2026-08-14

---

**cangjie‑skill emits a darwin‑compatible `test‑prompts.json` file that darwin‑skill consumes to automatically test, compare, and evolve the distilled book skill without manual retraining.**

The **cangjie‑skill** repository implements a "book‑distilling" capability that converts written content into structured AI skills. To keep these skills current as underlying models improve, the project deliberately integrates with **darwin‑skill**—a generic evolution framework. This article explains the precise relationship between cangjie‑skill and darwin‑skill for skill evolution, based on the source code in `kangarooking/cangjie-skill`.

## The Compositional Architecture: Distill, Then Evolve

The relationship between cangjie‑skill and darwin‑skill is **compositional rather than dependent**. Each tool has a single responsibility:

- **cangjie‑skill** performs the one-time work of ingesting a book and producing a skill directory.
- **darwin‑skill** handles the ongoing work of testing that skill against live model outputs and rewriting it when drift or improvement is detected.

This separation mirrors the broader ecosystem pattern described in [`README.en.md`](https://github.com/kangarooking/cangjie-skill/blob/main/README.en.md)【Line 13‑Line 158】, where **nuwa‑skill** distills people-centric skills and darwin‑skill evolves them. Cangjie‑skill extends this pattern to book-centric skills.

## Stage 5: Emitting Darwin‑Compatible Test Prompts

The five-stage pipeline in [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md)【Line 28‑Line 64】culminates in a delivery stage that produces evolution-ready artifacts. Specifically, cangjie‑skill generates `test‑prompts.json` with a mandatory `darwin_compatible: true` flag.

The template at `templates/test‑prompts.json.template`【Line 5】defines this format:

```json
{
  "darwin_compatible": true,
  "test_cases": [
    {
      "prompt": "Summarize Chapter 3's main argument",
      "expected_behavior": "Identifies the thesis about economic incentives"
    }
  ]
}

```

This structured format allows darwin‑skill to parse the file unambiguously and execute the defined prompts against the current model version.

## The Evolution Command Chain

According to `methodology/07‑stage5‑deliver.md`【Line 61】, the handoff from cangjie‑skill to darwin‑skill uses a simple directory path convention:

```bash

# 1️⃣ Run cangjie‑skill on a book (produces `test‑prompts.json`)

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

# 2️⃣ Feed the resulting skill to darwin‑skill for automatic evolution

darwin evolve books/my‑great‑novel/

```

The `darwin evolve` command performs three operations:

1. **Reads** `test‑prompts.json` from the provided path.
2. **Executes** each prompt against the current model.
3. **Compares** outputs to the stored baseline; if improvements exceed the threshold, rewrites the skill files.

This enables **continuous evolution** without requiring the original book or manual prompt engineering.

## Key Files Supporting the Integration

| File | Purpose |
|------|---------|
| `templates/test‑prompts.json.template` | Defines the darwin‑compatible schema with `darwin_compatible: true`【templates/test‑prompts.json.template†Line 5】 |
| [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) | Documents the five-stage pipeline including the pressure‑test stage【SKILL.md†Line 28‑Line 64】 |
| [`README.en.md`](https://github.com/kangarooking/cangjie-skill/blob/main/README.en.md) | Explains ecosystem relationships between nuwa‑skill, cangjie‑skill, and darwin‑skill【README.en.md†Line 13‑Line 158】 |
| `methodology/07‑stage5‑deliver.md` | Specifies the `darwin evolve` command for skill evolution【methodology/07‑stage5‑deliver.md†Line 61】 |

## WhyThis Design Matters

The cangjie‑skill and darwin‑skill integration solves a critical maintenance problem: **model drift**. As base language models improve, a skill distilled six months ago may produce suboptimal outputs even if its logic remains sound. By externalizing test cases into a darwin‑compatible format, cangjie‑skill ensures that:

- Evolution happens **automatically** in CI pipelines.
- Test coverage remains **portable** across model versions.
- Skills stay current **without reprocessing the source book**.

## Summary

- cangjie‑skill and darwin‑skill operate as **compositional tools** in a distill‑then‑evolve pipeline.
- cangjie‑skill emits `test‑prompts.json` with `darwin_compatible: true`【templates/test‑prompts.json.template†Line 5】.
- darwin‑skill consumes this file via `darwin evolve <path>`【methodology/07‑stage5‑deliver.md†Line 61】 to test and rewrite skills automatically.
- This architecture enables continuous skill maintenance without manual intervention or source material reprocessing.

## Frequently Asked Questions

### Does cangjie‑skill require darwin‑skill to function?

No. cangjie‑skill produces a complete, runnable skill directory independently. darwin‑skill is optional and used only when you want automated evolution. The `test‑prompts.json` file is safely ignored if darwin‑skill is not present.

### What happens if darwin‑skill finds no improvements during evolution?

darwin‑skill leaves the skill files unchanged and reports the comparison results. No rewrite occurs unless the new model outputs exceed the configured improvement threshold, protecting against regression.

### Can I use darwin‑skill with skills that weren't created by cangie‑skill?

Yes. darwin‑skill is a generic framework that can evolve any skill providing a valid `test‑prompts.json`. The cangjie‑skill integration simply automates the creation of that file in the correct format【README.en.md†Line 13‑Line 158】.

### How does this relate to nuwa‑skill in the broader ecosystem?

nuwa‑skill distills people (interviews, profiles) into skills; cangjie‑skill distills books. Both emit darwin‑compatible artifacts so darwin‑skill can evolve either type of skill automatically【README.en.md†Line 13‑Line 158】.