Self-configuring ICP skills onboarding in generated projects - #36
Merged
Conversation
The generated AGENTS.md now walks the user through choosing how the project uses ICP skills (autosync / pinned / registry) and then rewrites itself into a terse, mode-specific block. Adds AGENT_SKILLS.md documenting the modes, update policies, fallbacks, commit-vs-ignore, and how to switch. Gitignores the skill caches (.claude/skills/, .agents/skills/) across all subtemplates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Renames the third skills mode from 'registry' to 'on-demand' (all three modes use the registry, so the behavioural name is clearer). The on-demand configured block now references the fetch mechanics (index + SKILL.md) directly instead of 'follow llms.txt', so an already-configured project never re-enters onboarding once llms.txt itself becomes a choice-flow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 23, 2026
Merged
- pinned update policy is now 'manual' or 'ask-first' (drop silent 'auto', which a prompt cannot enforce and which failed silently in testing). 'ask-first' offers 'npx skills update' before the first task and never blocks — it skips in non-interactive/CI sessions and keeps the locked versions. - on-demand now fetches the index once per session (remembering names/URLs) rather than re-fetching per task. - Stop pre-shipping skill-cache .gitignore entries; committing vs ignoring .claude/skills is a maintainer decision, now documented in AGENT_SKILLS.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
marc0olo
marked this pull request as ready for review
July 24, 2026 14:41
Member
Author
npx skills update only refreshes and prunes skills already in the lock — it does not discover newly published skills (vercel-labs/skills#591), and its stale-skill prune can silently no-op for shorthand sources like dfinity/icskills (vercel-labs/skills#1376). Update the pinned-mode guidance in AGENT_SKILLS.md and the generated AGENTS.md markers (write-agent-files.rhai) so an update is treated as refresh + discover: also run 'npx skills add dfinity/icskills --list' and offer to add any not-yet-installed skills (never --all), and remove a renamed skill's stale copy with 'npx skills remove <old>' if it lingers.
raymondk
pushed a commit
to dfinity/icskills
that referenced
this pull request
Aug 4, 2026
## What `llms.txt` guides the user into a skills-mode choice, and the site no longer duplicates `AGENTS.md`. - `src/pages/llms.txt.ts`: leads with the on-demand fetch mechanics (usable immediately, never blocked), then offers a one-time choice (on-demand / pinned / autosync) with an ask-first, non-destructive option to persist it into `AGENTS.md` (create if missing; append a delimited block to an unrelated one without touching its content). - Removed the orphaned `/AGENTS.md` endpoint (`src/pages/AGENTS.md.ts`) and reworked the Get Started page by intent (use skills with your agent; start a new project with icp-cli; pin into an existing project; browse/read yourself). `llms.txt` is now the sole agent entrypoint; no AGENTS.md copy remains on the site. - `README.md`: quick-start paste prompt. **Key properties** - No terminal or install for the default path: the `.well-known` index and `SKILL.md` are plain URL fetches, so web-only agents (e.g. Perplexity) are handled; a correct `curl -sL` example is included. Installs for pin/autosync are run by the agent per the chosen mode. - Index fetched once per session (remembering names/URLs); `SKILL.md` per task. - Pinned update policy: manual or ask-first (never blocks; skips when non-interactive). ## Validation `astro build` passes (30 pages); generated `llms.txt` carries the choice-flow and the `/AGENTS.md` endpoint is correctly gone. Behaviour validated via simulated paste-flow (empty / unrelated-AGENTS / non-interactive), cross-link arrival, no-re-onboard regression, and pinned/ask-first (interactive offer, non-interactive skip). ### Companion PRs - dfinity/icp-cli-templates#36 - dfinity/icp-cli#673 - dfinity/developer-docs#321 --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
raymondk
approved these changes
Aug 4, 2026
marc0olo
added a commit
to dfinity/developer-docs
that referenced
this pull request
Aug 5, 2026
## 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What
Generated projects ship a self-configuring
AGENTS.md. On first use an agent walks the user through choosing how the project consumes ICP skills — autosync (Claude Code session hook), pinned (npx skills, version-locked), or on-demand (fetch each session) — then rewrites its own skills block into a terse, mode-specific form. Later sessions just follow it._shared/write-agent-files.rhai— emits the onboardingAGENTS.md(+CLAUDE.md).AGENT_SKILLS.md— documents the modes, fallbacks, the marker mechanism, how to switch, and the version-control trade-off.Design principles
on-demandis the default and the non-interactive fallback; no "avoid skills" option (delete the block manually if desired).ask-firstoffersnpx skills updatebefore the first task and never blocks (skips in CI / keeps locked versions).SKILL.mdper task..gitignoreis left to the maintainer — the templates do not pre-ignore.claude/skills; committing vs ignoring is documented as your choice.Validation
Simulated agent sessions (Claude Code / Cursor / Aider personas): onboarding for every mode, follow-up sessions, non-interactive & "just start" fallback, missing-
jqcold start, no-clobber of unrelated files, and pinned/ask-first non-blocking in CI. GeneratedAGENTS.mdverified byte-identical throughcargo generate.Companion PRs (coordinated; still in draft)