Skill Distillation Output Directory Structure: Complete Guide to cangjie-skill Artifacts
The cangjie-skill distillation process produces a standardized directory hierarchy containing SKILL.md, templates/, assets/, methodology/, and supporting documentation files that package a book as an executable AI skill.
When you run the skill distillation pipeline in kangarooking/cangjie-skill, the output directory follows a predictable, flat structure designed for immediate consumption by downstream agents and version control systems. This article maps every file and folder generated during the process, based on the actual implementation in the open-source repository.
Root-Level Files in the Output Directory
The skill distillation output directory always includes two critical entry points at its root:
SKILL.md– The central manifest that declares the skill, enumerates its commands, and provides usage instructions. This file serves as the primary interface for agents like Nuwa-skill and Darwin-skill.LICENSE– The open-source license governing distribution and modification of the skill pack.
Two additional reference files appear at this level:
GITHUB_REPO.md– A concise index linking to the source repository and its major components.README.*files (e.g.,README.en.md,README.ja.md) – Human-readable project overviews in multiple languages describing how to execute the distillation pipeline.
Generated Subdirectories
templates/
The templates/ folder holds markdown template files that define skeleton structures for skill components. During distillation, these templates are populated with book-specific content to produce final documentation.
Key template files found here include:
| Template File | Generated Output |
|---|---|
INDEX.md.template |
Skill index documentation |
DIGEST.md.template |
Condensed book summaries |
BOOK_OVERVIEW.md.template |
High-level book metadata |
According to the source code at templates/, these files use placeholder syntax that the distillation tool replaces with extracted content from the source book.
assets/
The assets/ directory contains static resources referenced by the skill's documentation. Files here include:
star-history.svg– Repository visualization graphicswecom-cangjie-group-qr.png– Community contact resources- Additional images, fonts, and SVGs as needed
All assets are copied verbatim from the source repository and maintain relative path references after distillation.
methodology/
The methodology/ folder documents the distillation pipeline itself through stage-by-stage markdown files:
00-overview.md– Process introduction01-stage0-adler.md– Initial extraction stage (Adler32-based content hashing)- Additional numbered stage files following the
XX-stageX-name.mdpattern
These files explain how the skill was constructed, enabling reproducibility and debugging.
Verifying the Output Structure
After distillation completes, inspect the generated directory tree programmatically:
import pathlib
import json
root = pathlib.Path("/path/to/distilled/skill")
tree = {
p.relative_to(root).as_posix(): {
"type": "dir" if p.is_dir() else "file",
"size": p.stat().st_size,
}
for p in root.rglob("*")
}
print(json.dumps(tree, indent=2))
Running this against a fresh distillation confirms the presence of all required components: SKILL.md at root, populated template files in templates/, copied assets in assets/, and stage documentation in methodology/.
Summary
- The skill distillation output directory follows a flat, predictable structure optimized for agent consumption and version control.
SKILL.mdacts as the central entry point declaring commands and usage.templates/,assets/, andmethodology/directories contain respectively: renderable templates, static resources, and process documentation.- Supporting files include multilingual
README.*variants,LICENSE, andGITHUB_REPO.md. - The entire structure is designed for immediate use by downstream skills without additional transformation.
Frequently Asked Questions
What is the purpose of SKILL.md in the distillation output?
SKILL.md serves as the primary entry point for any skill pack. It declares the skill identity, lists available commands, provides usage instructions, and follows a standardized format that Nuwa-skill, Darwin-skill, and other agents can parse automatically during skill loading.
Are template files in templates/ pre-rendered or raw?
Template files remain raw skeletons (.md.template extension) capable of reuse. The distillation process populates these templates with book-specific content to produce final .md outputs, but the original templates persist for regeneration and modification.
How does the methodology/ directory help with skill maintenance?
The methodology/ directory contains human-readable stage documentation (e.g., 01-stage0-adler.md) that records each transformation step applied during distillation. This enables debugging when outputs differ from expectations and allows contributors to understand or modify the pipeline without reverse-engineering the source code.
Can the output directory structure be customized?
The current implementation in kangarooking/cangjie-skill follows a fixed layout hardcoded in the distillation tool. All skills must include SKILL.md, templates/, assets/, and methodology/ at minimum to be valid for downstream agents. Custom additions are permitted but standard locations must remain intact.
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 →