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
AI-agents docs: three skills consumption modes (+ autosync) (#321)
## What
Aligns the AI-agents docs with the three ways to consume ICP skills.
- `docs/guides/ai-coding-agents.md`: adds autosync as a third option,
frames fetch-on-demand / pin / auto-update as an explicit choice,
corrects the "fetched fresh each time" line to be mode-aware, clarifies
that no install is needed to get started (installing is a separate
option), and links to the icp-cli-templates `AGENT_SKILLS.md`.
- `plugins/astro-agent-docs.mjs`: the generated `llms.txt` "Agent
skills" block becomes a short pointer to
`skills.internetcomputer.org/llms.txt` instead of duplicating fetch
instructions.
Em-dash free (docs validator passes); branch up to date with `main`.
## Validation
`astro build` passes (209 pages) and `scripts/validate.js` passes on the
changed guide. Generated `llms.txt` carries the pointer.
_(The `.sources/*` submodule pointers seen in a local working tree are
pre-existing and not part of this PR.)_
### Companion PRs
- dfinity/icp-cli-templates#36
- dfinity/icskills#251
- dfinity/icp-cli#673
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/guides/ai-coding-agents.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "AI coding agents"
3
3
description: "ICP skills are agent-readable instruction files that teach AI coding agents how to build correctly on the Internet Computer."
4
4
---
5
5
6
-
AI coding agents frequently hallucinate canister IDs, use deprecated APIs, and miss ICP-specific constraints. ICP skills solve this: structured markdown files containing accurate canister IDs, tested code patterns, and documented pitfalls: so your agent writes correct ICP code on the first attempt.
6
+
AI coding agents frequently hallucinate canister IDs, use deprecated APIs, and miss ICP-specific constraints. ICP skills solve this: structured markdown files containing accurate canister IDs, tested code patterns, and documented pitfalls, so your agent writes correct ICP code on the first attempt.
7
7
8
8
## Getting started
9
9
@@ -13,26 +13,32 @@ Paste this into your AI coding agent:
13
13
Fetch https://skills.internetcomputer.org/llms.txt and follow its instructions when building on ICP
14
14
```
15
15
16
-
Your agent fetches the skills index, reads each skill's description, and loads the relevant skill files on demand. No installation required.
16
+
Your agent fetches the skills index, reads each skill's description, and loads the relevant skill files on demand, so it produces correct ICP code right away with nothing to install. When you use that prompt, the agent then offers to set up how your project keeps using skills going forward (fetch on demand, pin, or auto-update) and runs whatever the chosen option needs. Those options are described below, and you can also apply them yourself.
17
17
18
18
### Install skills into your project
19
19
20
-
To install skills locally or commit them to your project repository, use the `skills` CLI:
20
+
Fetching on demand (above) needs no install and is the default. To make skills a committed part of a project instead, the agent offers to pin them or enable auto-updates when you follow the prompt above, and runs the setup for you. You can also do it manually:
21
+
22
+
**Pin them (any agent).** Version-lock skills into your repo with the `skills` CLI:
21
23
22
24
```bash
23
25
npx skills add dfinity/icskills
24
26
```
25
27
26
-
This prompts you to choose your agent (Claude Code, Cursor, Windsurf, GitHub Copilot, and others) and installs the selected skills into the correct location for that agent.
28
+
This detects your agent (Claude Code, Cursor, Windsurf, GitHub Copilot, and others), installs the skills into the right location, and writes a `skills-lock.json`. Refresh them later with `npx skills update`.
29
+
30
+
**Auto-update them (Claude Code).** Install the [`autosync-ic-skills`](https://skills.internetcomputer.org/.well-known/skills/autosync-ic-skills/SKILL.md) skill to add a `SessionStart` hook that keeps `.claude/skills/` mirroring the latest skills automatically, every session.
Paste the output into your agent's system prompt, rules file, or context window.
35
39
40
+
> **Scaffolding with icp-cli?** Projects generated by `icp new` ship an `AGENTS.md` that walks your agent through choosing one of these modes (fetch on demand, pin, or auto-update) and then configures itself. See [how that works](https://github.com/dfinity/icp-cli-templates/blob/main/AGENT_SKILLS.md).
41
+
36
42
## What ICP skills are
37
43
38
44
Each ICP skill covers one capability area and includes:
@@ -49,14 +55,17 @@ ICP skills follow the [Agent Skills open standard](https://agentskills.io/specif
49
55
50
56
## How discovery works
51
57
52
-
When an agent follows the `skills.internetcomputer.org/llms.txt` instructions:
58
+
However skills are set up, the pattern is the same: the agent matches your task to a skill by its description, follows that skill, and prefers its guidance over general knowledge when both cover the same topic. What differs is where the skill content comes from.
59
+
60
+
**On-demand (the default).** Following the `llms.txt` prompt, the agent:
61
+
62
+
1. fetches the skills index at `https://skills.internetcomputer.org/.well-known/skills/index.json`
63
+
2. reads each skill's name and description to understand what it covers
64
+
3. fetches the matching skill's `SKILL.md` from its URL when a task fits
53
65
54
-
1. It fetches the skills index at `https://skills.internetcomputer.org/.well-known/skills/index.json`
55
-
2. It reads each skill's name and description to understand what it covers
56
-
3. When a task matches a skill's description, it fetches the skill content from that skill's URL
57
-
4. It prefers skill guidance over general knowledge when both cover the same topic
66
+
Fetched this way, skills are always the latest version.
58
67
59
-
Skills are fetched fresh each time: agents always use the latest version.
68
+
**Pinned or autosync.** The skills already live in the agent's skills directory (installed by `npx skills` or the autosync hook), so the agent discovers and loads them natively without fetching each time. Pinned uses the versions locked in `skills-lock.json`; autosync refreshes to the latest each session.
0 commit comments