Skip to content

Commit fa635d3

Browse files
authored
feat: add skill download buttons — .md for single-file, .zip for multi-file skills (#86)
- Generate zip bundles at build time for multi-file skills (SKILL.md + references) - Add download button to browse cards and skill detail pages - Single-file skills download as .md, multi-file as .zip - Skill detail page shows raw URL for single-file, zip with file count for multi-file - Add fileCount to Skill interface for conditional rendering - Update README, CLAUDE.md, CONTRIBUTING.md to document references pattern
1 parent abee871 commit fa635d3

File tree

10 files changed

+1171
-23
lines changed

10 files changed

+1171
-23
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This repository contains agent-readable skill files for the Internet Computer. E
66

77
- **`llms.txt`, `.well-known/skills/`, and `sitemap.xml`** are all generated by Astro at build time into `dist/`. They are NOT committed to git.
88
- **Never edit Astro source files to add or update a skill** — the website auto-discovers skills from SKILL.md frontmatter at build time. Only edit `src/` files for site-level UI changes.
9-
- **One skill = one file** at `skills/<skill-name>/SKILL.md`. No nested directories, no images, no external dependencies within a skill.
9+
- **One skill = one directory** at `skills/<skill-name>/` with a required `SKILL.md`. May include a `references/` subdirectory for additional files. No images or external dependencies within a skill.
1010
- Skill names are **lowercase, hyphenated** (e.g., `ckbtc`, `https-outcalls`, `stable-memory`) and must match the directory name. This aligns with the [Agent Skills spec](https://agentskills.io/specification).
1111

1212
## Skill File Structure

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ npm ci # Install dependencies
2828

2929
```
3030
skills/<skill-name>/SKILL.md
31+
skills/<skill-name>/references/ # optional — for large reference material
3132
```
3233

3334
Use a short, lowercase, hyphenated name (e.g., `ckbtc`, `https-outcalls`, `stable-memory`). The name must match the directory name. This aligns with the [Agent Skills spec](https://agentskills.io/specification).
3435

36+
Keep the main SKILL.md under 500 lines. Move detailed reference material (migration guides, config examples) to `references/*.md` and reference them from SKILL.md. See `skills/icp-cli/` for an example.
37+
3538
A template is available at `skills/_template/SKILL.md.template` — copy it as your starting point.
3639

3740
### 2. Write the SKILL.md file

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The files are plain markdown — paste into any system prompt, rules file, or co
6969
| Skills discovery | [`.well-known/skills/index.json`](https://skills.internetcomputer.org/.well-known/skills/index.json) | Machine-readable skill index ([Agent Skills Discovery RFC](https://github.com/cloudflare/agent-skills-discovery-rfc)) |
7070
| Single skill | `/.well-known/skills/{name}/SKILL.md` | Raw markdown for one skill |
7171
| Reference files | `/.well-known/skills/{name}/references/{file}.md` | Additional files listed in the discovery index |
72+
| Download (zip) | `/.well-known/skills/{name}/SKILL.zip` | Zip bundle for multi-file skills (SKILL.md + references) |
7273
| Skill index | [`llms.txt`](https://skills.internetcomputer.org/llms.txt) | All skills with descriptions and discovery links |
7374
| Skill page | [`/skills/{name}/`](https://skills.internetcomputer.org/skills/ckbtc/) | Pre-rendered skill page for humans |
7475

0 commit comments

Comments
 (0)