How cangjie-skill Integrates with Darwin-skill for Automatic Skill Evolution
Cangjie-skill emits a darwin-compatible 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, 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 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 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【methodology/07‑stage5‑deliver.md†Line 61】:
# 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(darwin-compatible)
# Stage 2: Enable continuous evolution via darwin-skill
darwin evolve books/my-great-novel/
Darwin-skill then:
- Loads
test-prompts.jsonfrom the specified directory - Executes each prompt against the current model version
- Compares outputs against historical baselines or quality thresholds
- Generates improved skill versions when test results indicate progress
- 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 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, 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 |
| cangjie-skill | Books/text | Book-distilled skills | Via 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 contract.
Implementation details from the source code
The integration relies on specific conventions enforced by cangjie-skill's template system:
- File location:
test-prompts.jsonmust reside in the skill root directory - Version compatibility: The
darwin_compatibleboolean 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.jsonfile that enables automatic skill evolution - The
darwin_compatible: trueflag intemplates/test-prompts.json.templatesignals that a skill is ready for darwin-skill processing - The complete workflow requires only
cangjie runfollowed bydarwin 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.mdculminates 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 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 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 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.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →