Output Files Generated by cangjie-skill: Complete Documentation Pipeline Guide

The cangjie-skill repository generates five primary output files—SKILL.md, INDEX.md, DIGEST.md, BOOK_OVERVIEW.md, and test-prompts.json—by processing markdown extractors through Jinja2 templates orchestrated by scripts/generate_star_history.py.

The kangarooking/cangjie-skill project transforms raw research notes and structured extractors into polished documentation assets. Understanding the output files generated by cangjie-skill is essential for contributors who want to modify the skill's presentation or integrate the generated assets into downstream systems. This guide maps every generated file to its source template and explains the generation pipeline that produces them.

Primary Markdown Documentation Files

The generation pipeline produces four core markdown documents that serve as the primary consumable outputs of the skill.

SKILL.md

The SKILL.md file serves as the main skill document that Instagit and other consumers use to present the skill's purpose, usage, and detailed content. This file is rendered from templates/SKILL.md.template and represents the authoritative reference for the skill's capabilities.

INDEX.md

INDEX.md provides a table-of-contents style overview that links to other generated sections within the repository. Generated from templates/INDEX.md.template, this file acts as the navigation hub for readers exploring the skill structure.

DIGEST.md

The digest file offers a concise summary of the most important points for quick consumption. Created from templates/DIGEST.md.template, DIGEST.md distills the full skill content into an abbreviated format suitable for rapid review.

BOOK_OVERVIEW.md

BOOK_OVERVIEW.md delivers a higher-level narrative walkthrough intended for readers who want a comprehensive understanding of the whole skill without diving into implementation details. This output originates from templates/BOOK_OVERVIEW.md.template.

Structured Data and Configuration Files

Beyond markdown documentation, the pipeline generates machine-readable assets used for testing and validation.

test-prompts.json

The test-prompts.json file contains automatically generated test prompts used during the skill's validation phase. Rendered from templates/test-prompts.json.template, this JSON file enables automated testing frameworks to verify skill behavior against expected outputs.

Static Assets and Visual Resources

While not generated through template rendering, the assets/ directory contains visual files referenced by the generated markdown documentation.

These static files include:

  • star-history.svg - Charts and visualizations referenced in documentation
  • wecom-cangjie-group-qr.png - QR codes for community access
  • Bundled fonts for xkcd-style graphics

The generation script copies these files unchanged from assets/ to ensure the generated markdown can reference them directly via relative paths.

The Generation Pipeline: From Extractors to Output Files

Understanding how the output files generated by cangjie-skill are created requires examining the three-stage pipeline implemented in scripts/generate_star_history.py.

Stage 1: Extraction

The script processes files in the extractors/ directory, which parse raw research notes into structured markdown fragments. Each extractor produces content segments that feed into specific template placeholders.

Stage 2: Template Rendering

Using the Jinja2 templating engine, the script loads templates from the templates/ directory:

  • templates/SKILL.md.template
  • templates/INDEX.md.template
  • templates/DIGEST.md.template
  • templates/BOOK_OVERVIEW.md.template
  • templates/test-prompts.json.template

The engine replaces placeholders (e.g., {{ content }}) with extracted markdown content.

Stage 3: File Writing

The script writes rendered content to the repository root, stripping the .template suffix from filenames to produce the final output files.

Reproducing the Output Generation

You can execute the generation pipeline programmatically using the same logic found in scripts/generate_star_history.py:

from pathlib import Path
import jinja2

# 1️⃣ Load all extractor outputs (they are plain markdown files)

extractor_dir = Path("extractors")
extracted_parts = {
    p.stem: p.read_text(encoding="utf-8")
    for p in extractor_dir.glob("*.md")
}

# 2️⃣ Initialise the Jinja2 environment pointing at the template directory

tmpl_env = jinja2.Environment(
    loader=jinja2.FileSystemLoader("templates"),
    autoescape=False,
)

# 3️⃣ Render each template with the extracted parts

for tmpl_name in [
    "SKILL.md.template",
    "INDEX.md.template",
    "DIGEST.md.template",
    "BOOK_OVERVIEW.md.template",
    "test-prompts.json.template",
]:
    template = tmpl_env.get_template(tmpl_name)
    rendered = template.render(**extracted_parts)

    # 4️⃣ Write the final output (strip the .template suffix)

    out_path = Path(tmpl_name.replace(".template", ""))
    out_path.write_text(rendered, encoding="utf-8")
    print(f"✅ Generated {out_path}")

Running this script creates the complete set of output files in the repository root, ready for commit or publication.

Summary

  • Five primary files constitute the core output: SKILL.md, INDEX.md, DIGEST.md, BOOK_OVERVIEW.md, and test-prompts.json
  • Template-driven generation uses Jinja2 to render templates/*.template files into final documentation
  • Extraction phase processes extractors/*.md files to produce structured content for templates
  • Orchestration occurs in scripts/generate_star_history.py, which coordinates the entire pipeline
  • Static assets from the assets/ directory are copied unchanged to support visual elements in generated documentation

Frequently Asked Questions

What is the main entry point for generating cangjie-skill output files?

The scripts/generate_star_history.py script serves as the core orchestration tool. It executes the extraction logic, feeds content into Jinja2 templates, and writes the final output files to the repository root.

Are the README files generated by the cangjie-skill pipeline?

No. The repository-level README files (README.md, README.en.md, README.ja.md) are static files maintained separately. However, they reference the generated output files like SKILL.md and INDEX.md to present the skill documentation.

How do I modify the content of the generated SKILL.md file?

Edit the source files in the extractors/ directory or modify the templates/SKILL.md.template file. The generation pipeline combines extractor output with the template structure to produce the final SKILL.md output.

What templating engine does cangjie-skill use for file generation?

The project uses Jinja2 for template rendering. The scripts/generate_star_history.py script initializes a jinja2.Environment with a FileSystemLoader pointed at the templates/ directory to process .template files into final output documents.

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 →