# Available Templates for SKILL.md, INDEX.md, and DIGEST.md in Cangjie-Skill

> Explore available templates for SKILL.md, INDEX.md, and DIGEST.md within the kangarooking/cangjie-skill repository. Generate project documentation effectively with these Handlebars templates.

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: api-reference
- Published: 2026-07-22

---

**The cangjie-skill repository provides three Handlebars-style templates—`templates/SKILL.md.template`, `templates/INDEX.md.template`, and `templates/DIGEST.md.template`—that generate the project's primary documentation artefacts.**

The [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill) project uses a templating system to maintain consistent documentation across its markdown outputs. These templates for SKILL.md, INDEX.md, and DIGEST.md define the default structure and placeholders required to build the final documentation files through the repository's skill-generation tooling.

## Core Template Files

The repository stores its documentation scaffolding in the `templates/` directory. Three specific files define the layout for the respective generated documents:

- **`templates/SKILL.md.template`** – Defines the layout for the skill’s primary documentation file
- **`templates/INDEX.md.template`** – Provides the scaffold for the repository index overview
- **`templates/DIGEST.md.template`** – Supplies a concise digest format for quick reference

## Template Processing Workflow

These templates use Handlebars-style syntax processed by the repository’s build scripts. During the build pipeline, the tooling compiles each template with a context object containing metadata, sections, or summaries, then writes the rendered output to the corresponding `.md` file in the repository root.

### Rendering SKILL.md

The `templates/SKILL.md.template` accepts fields such as `title`, `description`, `version`, and `author` to produce comprehensive skill documentation.

### Rendering INDEX.md

The `templates/INDEX.md.template` typically receives an array of sections (e.g., Overview, Usage, License) to generate the repository’s table of contents and navigation structure.

### Rendering DIGEST.md

The `templates/DIGEST.md.template` processes summary-level data to create a condensed reference document distinct from the full skill documentation.

## Code Examples

The following JavaScript demonstrates how these templates are rendered using a Handlebars-compatible engine. While the actual cangjie-skill repository uses its own rendering pipeline, the workflow remains conceptually identical.

To generate [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md) from its template:

```javascript
const fs = require('fs');
const hb = require('handlebars');

// Load template from kangarooking/cangjie-skill
const skillTemplate = fs.readFileSync('templates/SKILL.md.template', 'utf8');
const compileSkill = hb.compile(skillTemplate);

// Prepare context data
const data = {
  title: 'Cangjie Skill',
  description: 'A skill for the Instag iT voice assistant',
  version: '1.0.0',
  author: 'kangarooking',
};

// Render final markdown
const skillMD = compileSkill(data);
fs.writeFileSync('SKILL.md', skillMD);

```

To render [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md):

```javascript
const indexTemplate = fs.readFileSync('templates/INDEX.md.template', 'utf8');
const compileIndex = hb.compile(indexTemplate);
const indexMD = compileIndex({ sections: ['Overview', 'Usage', 'License'] });
fs.writeFileSync('INDEX.md', indexMD);

```

To render [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md):

```javascript
const digestTemplate = fs.readFileSync('templates/DIGEST.md.template', 'utf8');
const compileDigest = hb.compile(digestTemplate);
const digestMD = compileDigest({ summary: 'Quick reference for Cangjie Skill' });
fs.writeFileSync('DIGEST.md', digestMD);

```

## Additional Template Files

While the three templates above generate the core documentation artefacts, the `templates/` directory also contains supporting files:

- **`templates/BOOK_OVERVIEW.md.template`** – Supports book-style documentation layouts
- **`templates/test-prompts.json.template`** – Handles testing configuration generation

These supplementary templates serve additional documentation or testing purposes but are not directly related to the three primary markdown artefacts asked about.

## Summary

- The **cangjie-skill** repository maintains three primary Handlebars templates in `templates/` for documentation generation
- **`SKILL.md.template`**, **`INDEX.md.template`**, and **`DIGEST.md.template`** define the structure for their respective output files
- Build scripts process these templates by replacing placeholders with actual content to produce the final committed markdown files
- Each template serves a distinct purpose: comprehensive documentation (SKILL.md), repository index (INDEX.md), and quick reference (DIGEST.md)

## Frequently Asked Questions

### Where are the template files located in the cangjie-skill repository?

The template files reside in the `templates/` directory at the repository root. Specifically, you will find `templates/SKILL.md.template`, `templates/INDEX.md.template`, and `templates/DIGEST.md.template` alongside supplementary templates like `BOOK_OVERVIEW.md.template`.

### What templating engine does cangjie-skill use for these markdown files?

According to the source code, the templates use Handlebars-style syntax. The repository's build scripts or skill-generation tooling processes these templates to replace placeholders with actual data before committing the final [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md), [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md), and [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md) files.

### Can I customize these templates for my own skill project?

Yes, you can modify the `.template` files in the `templates/` directory to change the structure and content of the generated markdown. After editing, run the repository's build scripts to re-render the output files with your custom layout and placeholder values.

### What is the difference between SKILL.md and DIGEST.md templates?

The `SKILL.md.template` generates comprehensive documentation including detailed metadata, descriptions, and usage instructions, while `DIGEST.md.template` produces a condensed summary designed for quick reference, containing only essential skill information in a compact format.