You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve repo structure, CI pipeline, and contributor experience
Consolidate duplicated parsing logic into a shared module, add structural
validation, harden the CI pipeline for PRs, and align all documentation
with actual tooling behavior.
- Extract shared parser into scripts/lib/parse-skill.js (eliminates 5x duplication)
- Add scripts/validate-skills.js for frontmatter, sections, deps, and cycle detection
- Add skills/skill.schema.json and skills/_template/SKILL.md.template
- Add .claude/CLAUDE.md with contributor instructions
- Add PR validation and version bump enforcement to CI pipeline
- Auto-generate ai-plugin.json alongside agent.json
- Move sitemap.xml to build-time dist/ generation (deterministic git dates)
- Add requires and tags fields to all 12 skill frontmatter blocks
- Remove redundant > version: body lines (frontmatter as single source of truth)
- Add Setup section and generate step to CONTRIBUTING.md
- Update README with Programmatic Access section and accurate usage instructions
This repository contains agent-readable skill files for the Internet Computer. Each skill is a single markdown file at `skills/<skill-id>/SKILL.md`.
4
+
5
+
## Key Rules
6
+
7
+
-**Never edit `src/skills-data.js`** — it is auto-generated and gitignored
8
+
-**Never edit auto-generated files in `public/`** — `llms.txt`, `llms-full.txt`, `.well-known/agent.json`, `.well-known/ai-plugin.json` are all regenerated from SKILL.md sources. These files ARE committed to git (not gitignored) but must only be updated by running `npm run generate`. Note: `sitemap.xml` is generated at build time into `dist/` and is NOT committed.
9
+
-**Never edit `src/app.jsx` to add or update a skill** — the website auto-discovers skills from SKILL.md frontmatter. Only edit app.jsx for site-level UI changes.
10
+
-**One skill = one file** at `skills/<skill-id>/SKILL.md`. No nested directories, no images, no external dependencies within a skill.
11
+
- Skill IDs are **lowercase, hyphenated** (e.g., `ckbtc`, `https-outcalls`, `stable-memory`) and must match the directory name.
12
+
13
+
## Skill File Structure
14
+
15
+
Every SKILL.md has YAML frontmatter followed by a markdown body. See `skills/skill.schema.json` for the full schema and `skills/_template/SKILL.md.template` for a ready-to-copy skeleton.
`dependencies`, `requires`, `tags` — validator warns if missing but does not block
22
+
23
+
### Required body sections (## headings)
24
+
1.`What This Is` — 2-3 sentences
25
+
2.`Prerequisites` — exact tools and versions
26
+
3.`Mistakes That Break Your Build` — numbered pitfalls (highest-value section)
27
+
4.`Implementation` — subsections per language (Motoko, Rust, JS)
28
+
5.`Deploy & Test` — step-by-step commands
29
+
6.`Verify It Works` — concrete verification commands with expected output
30
+
31
+
### Optional body sections
32
+
-`Canister IDs` — table of external canister principals (include when skill interacts with external canisters)
33
+
-`How It Works` — flow descriptions for non-trivial multi-step processes
34
+
35
+
## Build Commands
36
+
37
+
```bash
38
+
npm install # Install dependencies
39
+
npm run validate # Validate all skills (frontmatter, sections, deps)
40
+
npm run generate # Regenerate all auto-generated files from SKILL.md sources
41
+
npm run dev # Validate + generate + start Vite dev server
42
+
npm run build # Validate + generate + production build
43
+
```
44
+
45
+
## Workflow
46
+
47
+
After modifying any SKILL.md file, ALWAYS:
48
+
1.**Bump the `version`** in frontmatter (patch for fixes, minor for new content, major for breaking changes). CI enforces this on PRs.
49
+
2. Run:
50
+
```bash
51
+
npm run validate # Fix all errors before committing. Warnings are acceptable.
52
+
npm run generate # Regenerate public/ files — commit these alongside your SKILL.md changes.
53
+
```
54
+
Both run in CI. Validate blocks deployment on errors. Generate output is checked for freshness — if `public/` files don't match what `npm run generate` produces, CI rejects the PR.
55
+
56
+
## Writing Guidelines
57
+
58
+
-**Write for agents, not humans.** Be explicit with canister IDs, function signatures, and error messages.
59
+
-**Pitfalls prevent hallucinations.** Every pitfall documented saves agents from generating broken code.
60
+
-**Code must be copy-paste correct.** Agents use code blocks directly — test everything.
61
+
-**Use semver strictly.** Patch for typos, minor for new sections, major for breaking API changes.
62
+
-**Keep code blocks annotated** with language identifiers (```motoko, ```rust, ```bash, etc.).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+68-14Lines changed: 68 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,15 @@ If you're not sure whether something is wrong, open an issue. We'd rather invest
11
11
12
12
---
13
13
14
+
## Setup
15
+
16
+
```bash
17
+
node -v # Requires Node.js >= 20
18
+
npm ci # Install dependencies
19
+
```
20
+
21
+
---
22
+
14
23
## Adding a New Skill
15
24
16
25
### 1. Create the skill directory
@@ -19,37 +28,69 @@ If you're not sure whether something is wrong, open an issue. We'd rather invest
19
28
skills/<skill-id>/SKILL.md
20
29
```
21
30
22
-
Use a short, lowercase, hyphenated ID (e.g., `ckbtc`, `https-outcalls`, `stable-memory`).
31
+
Use a short, lowercase, hyphenated ID (e.g., `ckbtc`, `https-outcalls`, `stable-memory`). The ID must match the directory name.
32
+
33
+
A template is available at `skills/_template/SKILL.md.template` — copy it as your starting point.
23
34
24
35
### 2. Write the SKILL.md file
25
36
26
-
Every skill file follows this structure:
37
+
Every skill file has YAML frontmatter followed by a markdown body. The frontmatter is the machine-readable metadata; the body is the agent-consumable content.
27
38
28
-
```markdown
39
+
#### Frontmatter
40
+
41
+
```yaml
29
42
---
30
43
id: <skill-id>
31
-
name: Display Name
44
+
name: "Display Name"
32
45
category: CategoryName
33
-
description: One sentence. When should an agent load this skill? What does it cover?
34
-
version: 1.0.0
46
+
description: "One sentence. When should an agent load this skill? What does it cover?"
See `skills/skill.schema.json` for the formal schema.
57
+
58
+
#### Frontmatter field reference
59
+
60
+
| Field | Required | Description |
61
+
|-------|----------|-------------|
62
+
|`id`| yes | Lowercase, hyphenated identifier. Must match the directory name. |
63
+
|`name`| yes | Human-readable display name. |
64
+
|`category`| yes | One of the predefined categories (see below). |
65
+
|`description`| yes | One sentence. Describes when an agent should load this skill. |
66
+
|`endpoints`| yes | Number of distinct canister methods or external API operations documented in the Implementation section. |
67
+
|`version`| yes | Semantic version (`major.minor.patch`). |
68
+
|`status`| yes |`stable` (production-ready) or `beta` (API may change). |
69
+
|`dependencies`| recommended | Array of skill IDs this skill depends on. Use `[]` if none. |
70
+
|`requires`| recommended | Tool/package dependencies with version constraints (e.g., `icp-cli >= 0.1.0`). |
71
+
|`tags`| recommended | Keywords for agent discovery. Lowercase, hyphenated. |
72
+
73
+
#### Body sections
74
+
75
+
```markdown
40
76
# Skill Title
41
-
> version: 1.0.0 | requires: [icp-cli >= 0.1.0, other deps]
42
77
43
78
## What This Is
44
79
Brief explanation of the technology. 2-3 sentences max.
45
80
46
81
## Prerequisites
47
82
- Bullet list of required tools, packages, versions
48
83
49
-
## Mistakes That Break Your Build
50
-
Numbered list of critical pitfalls. These are the most important part of the skill —
51
-
they prevent agents from hallucinating incorrect patterns.
84
+
## Canister IDs <!-- optional: include when skill uses external canisters -->
85
+
| Environment | Canister | ID |
86
+
|-------------|----------|-----|
87
+
| Mainnet | ... |`...`|
88
+
89
+
## How It Works <!-- optional: for non-trivial multi-step flows -->
90
+
### Flow Name
91
+
1. Step one...
52
92
93
+
## Mistakes That Break Your Build <!-- HIGHEST-VALUE SECTION -->
53
94
1.**Pitfall name.** Explanation of what goes wrong and why.
54
95
55
96
## Implementation
@@ -63,13 +104,24 @@ Step-by-step commands to deploy locally and on mainnet.
63
104
Concrete commands to confirm the implementation is correct.
64
105
```
65
106
66
-
### 3. That's it — the website auto-discovers skills
107
+
### 3. Validate and regenerate
108
+
109
+
```bash
110
+
npm run validate # Check frontmatter, sections, dependency graph
111
+
npm run generate # Regenerate public/ files (llms.txt, agent.json, etc.)
112
+
```
113
+
114
+
Both commands run automatically in CI. The deploy pipeline verifies that committed files in `public/` match what `npm run generate` produces — if they're out of date, CI will reject the PR.
115
+
116
+
**Commit the updated `public/` files** alongside your SKILL.md changes.
117
+
118
+
### 4. That's it — the website auto-discovers skills
67
119
68
120
The website is automatically generated from the SKILL.md frontmatter at build time. You do **not** need to edit `app.jsx` or any other source file. The build script (`scripts/generate-skills.js`) scans all `skills/*/SKILL.md` files, parses their frontmatter, and generates the data the site uses.
69
121
70
122
Stats (skill count, operations, categories) all update automatically.
71
123
72
-
### 4. Submit a PR
124
+
### 5. Submit a PR
73
125
74
126
- One skill per PR
75
127
- Include a brief description of what the skill covers and why it's needed
Copy file name to clipboardExpand all lines: public/.well-known/ai-plugin.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
"schema_version": "v1",
3
3
"name_for_human": "IC Skills",
4
4
"name_for_model": "ic_skills",
5
-
"description_for_human": "Agent-readable skill files for Internet Computer (ICP) development. Covers ckBTC, ICRC ledger, Internet Identity, stable memory, HTTPS outcalls, EVM RPC, SNS, and more.",
6
-
"description_for_model": "Retrieve structured skill files for Internet Computer (ICP) development. Each skill is a markdown document with prerequisites, pitfalls, tested code blocks, and deploy commands. Use the raw GitHub URLs to inject skills directly into context. Available skills: ckbtc, icrc-ledger, internet-identity, multi-canister, stable-memory, https-outcalls, evm-rpc, asset-canister, certified-variables, sns-launch, vetkd, wallet.",
5
+
"description_for_human": "Agent-readable skill files for Internet Computer (ICP) development. Covers 12 capabilities including ckBTC, ICRC ledger, Internet Identity, stable memory, HTTPS outcalls, EVM RPC, SNS, and more.",
6
+
"description_for_model": "Retrieve structured skill files for Internet Computer (ICP) development. Each skill is a markdown document with prerequisites, pitfalls, tested code blocks, and deploy commands. Use the raw GitHub URLs to inject skills directly into context. Available skills: asset-canister, certified-variables, ckbtc, evm-rpc, https-outcalls, icrc-ledger, internet-identity, multi-canister, sns-launch, stable-memory, vetkd, wallet.",
0 commit comments