|
| 1 | +# Contributing to IC Skills |
| 2 | + |
| 3 | +## Adding a New Skill |
| 4 | + |
| 5 | +### 1. Create the skill directory |
| 6 | + |
| 7 | +``` |
| 8 | +skills/<skill-id>/SKILL.md |
| 9 | +``` |
| 10 | + |
| 11 | +Use a short, lowercase, hyphenated ID (e.g., `ckbtc`, `https-outcalls`, `stable-memory`). |
| 12 | + |
| 13 | +### 2. Write the SKILL.md file |
| 14 | + |
| 15 | +Every skill file follows this structure: |
| 16 | + |
| 17 | +```markdown |
| 18 | +--- |
| 19 | +name: <skill-id> |
| 20 | +description: One sentence. When should an agent load this skill? What does it cover? |
| 21 | +--- |
| 22 | + |
| 23 | +# Skill Title |
| 24 | +> version: 1.0.0 | requires: [dfx >= 0.24.0, other deps] |
| 25 | +
|
| 26 | +## What This Is |
| 27 | +Brief explanation of the technology. 2-3 sentences max. |
| 28 | + |
| 29 | +## Prerequisites |
| 30 | +- Bullet list of required tools, packages, versions |
| 31 | + |
| 32 | +## Mistakes That Break Your Build |
| 33 | +Numbered list of critical pitfalls. These are the most important part of the skill — |
| 34 | +they prevent agents from hallucinating incorrect patterns. |
| 35 | + |
| 36 | +1. **Pitfall name.** Explanation of what goes wrong and why. |
| 37 | + |
| 38 | +## Implementation |
| 39 | +### Subsection per approach |
| 40 | +Code blocks with working, tested examples. |
| 41 | + |
| 42 | +## Deploy & Test |
| 43 | +Step-by-step commands to deploy locally and on mainnet. |
| 44 | + |
| 45 | +## Verify It Works |
| 46 | +Concrete commands to confirm the implementation is correct. |
| 47 | +``` |
| 48 | + |
| 49 | +### 3. Register the skill on the website |
| 50 | + |
| 51 | +Add an entry to the `SKILLS` array in `src/app.jsx`: |
| 52 | + |
| 53 | +```javascript |
| 54 | +{ |
| 55 | + id: "your-skill-id", // matches the directory name |
| 56 | + name: "Human-Readable Name", |
| 57 | + category: "Category", // DeFi, Auth, Architecture, Tokens, etc. |
| 58 | + description: "One-line description for the card.", |
| 59 | + endpoints: 6, // number of operations/endpoints covered |
| 60 | + lastUpdated: "2026-02-24", // date of last content change |
| 61 | + version: "1.0.0", // semver, matches the SKILL.md header |
| 62 | + status: "stable", // stable | beta | experimental |
| 63 | + dependencies: [], // IDs of other skills this depends on |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +### 4. Submit a PR |
| 68 | + |
| 69 | +- One skill per PR |
| 70 | +- Include a brief description of what the skill covers and why it's needed |
| 71 | +- Make sure the SKILL.md is tested — code examples should compile and deploy |
| 72 | +- **All PRs require approval from a repo admin before merge.** No skill additions or updates go live without review. |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## Updating an Existing Skill |
| 77 | + |
| 78 | +### When to bump the version |
| 79 | + |
| 80 | +| Change | Version bump | Example | |
| 81 | +|--------|-------------|---------| |
| 82 | +| Fix a typo, clarify wording | Patch `x.x.+1` | 1.0.0 → 1.0.1 | |
| 83 | +| Add a new section, update code examples | Minor `x.+1.0` | 1.0.0 → 1.1.0 | |
| 84 | +| Rewrite for breaking API changes (e.g., mo:base → mo:core) | Major `+1.0.0` | 1.0.0 → 2.0.0 | |
| 85 | + |
| 86 | +### Steps |
| 87 | + |
| 88 | +1. Edit the `SKILL.md` content |
| 89 | +2. Bump the `version` in the SKILL.md header line: `> version: X.Y.Z | requires: [...]` |
| 90 | +3. Update the matching entry in `src/app.jsx`: |
| 91 | + - Set `version` to the new value |
| 92 | + - Set `lastUpdated` to today's date |
| 93 | + - Update `endpoints` count if it changed |
| 94 | +4. Submit a PR with a summary of what changed |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Skill Writing Guidelines |
| 99 | + |
| 100 | +- **Write for agents, not humans.** Be explicit. State exact canister IDs, exact function signatures, exact error messages. |
| 101 | +- **Pitfalls are the highest-value section.** Every pitfall you document is a hallucination prevented. |
| 102 | +- **Code must be copy-paste correct.** Agents will use your code blocks directly. Test everything. |
| 103 | +- **Include canister IDs and URLs** for both local and mainnet environments. |
| 104 | +- **Keep it flat.** One file per skill. No nested directories, no images, no external dependencies. |
| 105 | +- **Use semver strictly.** Agents and tooling rely on version numbers to detect stale skills. |
| 106 | + |
| 107 | +## Categories |
| 108 | + |
| 109 | +Current categories used on the site: |
| 110 | + |
| 111 | +| Category | Examples | |
| 112 | +|----------|---------| |
| 113 | +| DeFi | ckBTC, ICRC Ledger | |
| 114 | +| Auth | Internet Identity | |
| 115 | +| Architecture | Multi-Canister, Stable Memory | |
| 116 | +| Tokens | ICRC Ledger | |
| 117 | +| Integration | HTTPS Outcalls, EVM RPC | |
| 118 | +| Governance | SNS Launch | |
| 119 | +| Frontend | Asset Canister | |
| 120 | +| Crypto | vetKD | |
| 121 | +| DevOps | Cycles & Wallet | |
| 122 | +| Data | Certified Variables | |
0 commit comments