From 19e729fd42dd6ff2d17763d5d82e1fcf8cc894ce Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 6 Aug 2026 11:21:13 +0200 Subject: [PATCH 1/5] chore: switch ICP skills from pinned to autosync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pinned mode required committing skills-lock.json every time a skill changed. Autosync (dfinity/icskills#251, hardened by #257) keeps skills current with zero commits: a SessionStart hook runs a differential, hash-keyed mirror into .claude/skills/ each session, downloading only changed skills and pruning removed ones. - Add .claude/sync-ic-skills.sh (fetched verbatim from the published autosync skill) and a .claude/settings.json SessionStart hook — both committed so the whole team gets auto-updating skills. - .gitignore: skills now live in .claude/skills/ (ignored — a managed cache); ignore .claude/settings.local.json; drop the .agents/skills line. - Remove committed skills-lock.json (pinned artifact, no longer used). - AGENTS.md: managed block → autosync state; add an on-demand fallback note for non–Claude Code agents (the hook is Claude Code-only). Skills aren't build inputs (CI runs in containers and never touches them), so losing pinned reproducibility has no CI impact; always-latest matches the repo's stay-current philosophy. --- .claude/settings.json | 11 ++ .claude/sync-ic-skills.sh | 206 ++++++++++++++++++++++++++++++++++++++ .gitignore | 7 +- AGENTS.md | 15 +-- skills-lock.json | 173 -------------------------------- 5 files changed, 230 insertions(+), 182 deletions(-) create mode 100644 .claude/settings.json create mode 100755 .claude/sync-ic-skills.sh delete mode 100644 skills-lock.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 000000000..6831ce73b --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,11 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { "type": "command", "command": "bash .claude/sync-ic-skills.sh" } + ] + } + ] + } +} diff --git a/.claude/sync-ic-skills.sh b/.claude/sync-ic-skills.sh new file mode 100755 index 000000000..fcc380d3c --- /dev/null +++ b/.claude/sync-ic-skills.sh @@ -0,0 +1,206 @@ +#!/usr/bin/env bash +# sync-ic-skills.sh — mirror the latest Internet Computer skills into .claude/skills/ +# +# Differential sync: fetches the discovery index once and re-downloads only the +# skills whose published `hash` changed (or are new). Skills already at the current +# hash are skipped entirely — no per-file downloads. Prints a one-line summary only +# when something actually changed. +# +# Idempotent and offline-safe. Only skills this script installed are ever pruned, +# so your own local skills are never touched. +set -euo pipefail + +BASE="https://skills.internetcomputer.org/.well-known/skills" +INDEX_URL="$BASE/index.json" +DEST=".claude/skills" +MANIFEST="$DEST/.ic-managed.json" # { "": "" } of skills this script manages + +mkdir -p "$DEST" + +# --- Temp files. NEW_MANIFEST is built up as we go, then swapped in atomically. +# STAGING holds the skill dir currently being downloaded, so the trap can +# remove a half-written skill if the run is interrupted. --- +TMP_INDEX="$(mktemp)" +NEW_MANIFEST="$(mktemp)" +STAGING="" +trap 'rm -f "$TMP_INDEX" "$NEW_MANIFEST"; [ -n "$STAGING" ] && rm -rf "$STAGING"' EXIT + +# Remove any staging dirs left by a previously interrupted run — an in-progress +# download is always safe to discard. (.old-* backups are handled by the recovery +# step below, which never deletes one that is still the only copy of a skill.) +rm -rf "${DEST:?}"/.staging-* 2>/dev/null || true + +# --- Path-safety guards. `name` and `f` come from the remote index and flow into +# rm -rf / mv / file writes, so reject anything that could escape $DEST. --- +is_safe_name() { # a flat skill slug: non-empty, no slash, no ".." + case "$1" in + ""|.|..|*/*|*..*) return 1 ;; + *) return 0 ;; + esac +} +is_safe_relpath() { # a file path within a skill: subdirs ok, but not absolute or ".." + case "$1" in + ""|/*|*..*) return 1 ;; + *) return 0 ;; + esac +} + +# --- Recover from a run interrupted mid-swap. A `.old-.` dir is the +# previous good copy of , moved aside just before its swap. If that swap +# never finished (the skill dir is now missing), restore it; otherwise it is +# stale and safe to drop. This runs BEFORE the index fetch, so an interrupted +# skill is restored even on an offline run — keeping the cached copy available. --- +for backup in "$DEST"/.old-*; do + [ -e "$backup" ] || continue # unmatched glob stays literal — skip + bname="$(basename "$backup")"; bname="${bname#.old-}"; bname="${bname%.*}" + if is_safe_name "$bname" && [ ! -e "$DEST/$bname" ]; then + mv "$backup" "$DEST/$bname" + echo "[autosync-ic-skills] recovered '$bname' from an interrupted sync" >&2 + else + rm -rf "$backup" + fi +done + +# --- Fetch the index. On any network failure, keep cached skills and exit cleanly. --- +if ! curl -fsSL --max-time 20 "$INDEX_URL" -o "$TMP_INDEX"; then + echo "[autosync-ic-skills] could not reach $INDEX_URL — keeping cached skills" >&2 + exit 0 +fi + +# --- jq is required to parse the index. If absent, warn and exit without failing. --- +if ! command -v jq >/dev/null 2>&1; then + echo "[autosync-ic-skills] 'jq' not found — install jq to enable IC skill sync" >&2 + exit 0 +fi + +# --- Previously-managed skill names. Supports the legacy manifest format +# (a bare array of names, no hashes) as well as the current object form. --- +managed_names() { + [ -f "$MANIFEST" ] || return 0 + jq -r 'if type == "object" then keys[] elif type == "array" then .[] else empty end' \ + "$MANIFEST" 2>/dev/null || true +} + +# --- Stored hash for a skill, or empty if unknown (new skill, or legacy manifest). --- +stored_hash() { + [ -f "$MANIFEST" ] || return 0 + jq -r --arg n "$1" 'if type == "object" then (.[$n] // "") else "" end' \ + "$MANIFEST" 2>/dev/null || true +} + +# --- Append a name->hash pair to the new manifest being built. --- +record() { + local tmp; tmp="$(mktemp)" + jq --arg n "$1" --arg h "$2" '.[$n] = $h' "$NEW_MANIFEST" > "$tmp" && mv "$tmp" "$NEW_MANIFEST" +} + +NEW_NAMES="$(jq -r '.skills[].name' "$TMP_INDEX")" +MANAGED="$(managed_names)" +echo '{}' > "$NEW_MANIFEST" + +# --- Prune: drop previously-managed skills that are no longer in the index. --- +removed=0 +while IFS= read -r old; do + [ -n "$old" ] || continue + is_safe_name "$old" || { echo "[autosync-ic-skills] skipping unsafe managed name: $old" >&2; continue; } + if ! grep -qxF "$old" <<<"$NEW_NAMES"; then + rm -rf "${DEST:?}/$old" + removed=$((removed + 1)) + echo "[autosync-ic-skills] removed: $old" >&2 + fi +done <<<"$MANAGED" + +# --- Sync: download only skills whose hash changed (new / hashless always download). --- +added=0; updated=0; unchanged=0 +while IFS= read -r entry; do + name="$(jq -r '.name' <<<"$entry")" + [ -n "$name" ] && [ "$name" != "null" ] || continue + is_safe_name "$name" || { echo "[autosync-ic-skills] skipping skill with unsafe name: $name" >&2; continue; } + new_hash="$(jq -r '.hash // ""' <<<"$entry")" + old_hash="$(stored_hash "$name")" + + # Skip when the hash is known, unchanged, and the files are already on disk. + if [ -n "$new_hash" ] && [ "$new_hash" = "$old_hash" ] && [ -d "$DEST/$name" ]; then + unchanged=$((unchanged + 1)) + record "$name" "$new_hash" + continue + fi + + # Otherwise download this skill into a fresh staging dir, then swap it in + # atomically. A clean staging dir means an intra-skill file rename or removal + # leaves no orphaned files behind, and a mid-download failure keeps the existing + # copy intact — the swap happens only after every file downloaded successfully. + ok=1 + STAGING="$(mktemp -d "${DEST}/.staging-${name}.XXXXXX")" + while IFS= read -r f; do + [ -n "$f" ] || continue + if ! is_safe_relpath "$f"; then + echo "[autosync-ic-skills] warning: unsafe file path in $name: $f — skipping skill" >&2 + ok=0 + break + fi + mkdir -p "$(dirname "$STAGING/$f")" # files may live in subdirs (e.g. scripts/) + if ! curl -fsSL --max-time 20 "$BASE/$name/$f" -o "$STAGING/$f"; then + echo "[autosync-ic-skills] warning: failed to fetch $name/$f" >&2 + ok=0 + break + fi + done < <(jq -r '.files[]?' <<<"$entry") + + if [ "$ok" -eq 1 ]; then + # Swap in the fresh copy. Move any existing dir aside first, move the new one + # into place, and only then drop the old copy — so a failed swap restores the + # existing copy intact, while files removed or renamed upstream don't survive. + backup="" + if [ -e "$DEST/$name" ]; then + backup="${DEST}/.old-${name}.$$" + rm -rf "$backup" + mv "$DEST/$name" "$backup" + fi + if mv "$STAGING" "$DEST/$name"; then + STAGING="" + [ -n "$backup" ] && rm -rf "$backup" + # Record the new hash so the next run can skip this skill. A hashless server + # records an empty hash, which never equals new_hash -> always re-downloads. + record "$name" "$new_hash" + if grep -qxF "$name" <<<"$MANAGED"; then + updated=$((updated + 1)) + else + added=$((added + 1)) + fi + else + # Swap failed: restore any existing copy and retry on the next run. + echo "[autosync-ic-skills] warning: failed to install $name — kept any existing copy; will retry next run" >&2 + [ -n "$backup" ] && mv "$backup" "$DEST/$name" + rm -rf "$STAGING" + STAGING="" + record "$name" "$old_hash" + fi + else + # Download incomplete: discard the staging dir, keep the existing skill dir + # untouched, and keep the old hash so the next run retries this skill. + rm -rf "$STAGING" + STAGING="" + record "$name" "$old_hash" + fi +done < <(jq -c '.skills[]' "$TMP_INDEX") + +# --- Swap in the updated manifest. --- +mv "$NEW_MANIFEST" "$MANIFEST" + +# --- Report only when something changed; stay silent on a no-op sync. --- +# SessionStart hook stdout/stderr is NOT shown in the Claude Code UI — only JSON +# fields are surfaced. We emit a single JSON object on stdout: +# - systemMessage -> rendered to the USER as a visible system notice +# - additionalContext -> injected into Claude's context so it can mention it too +if [ $((added + updated + removed)) -gt 0 ]; then + summary="[autosync-ic-skills] ${added} added, ${updated} updated, ${removed} removed (${unchanged} unchanged) in $DEST" + jq -n --arg msg "$summary" '{ + systemMessage: $msg, + hookSpecificOutput: { + reloadSkills: true, + hookEventName: "SessionStart", + additionalContext: $msg + } + }' +fi diff --git a/.gitignore b/.gitignore index ecffc1344..21c161885 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,8 @@ build/ # OS .DS_Store -# ICP skills — these can be reinstalled with npx skills -.agents/skills +# ICP skills — auto-synced into .claude/skills/ by the SessionStart hook +# (.claude/sync-ic-skills.sh); the hook + script are committed, the skills are not. +.claude/skills/ +# Local Claude Code settings (personal; the shared hook lives in .claude/settings.json) +.claude/settings.local.json diff --git a/AGENTS.md b/AGENTS.md index 09d86803c..b7ce5681c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,15 +7,16 @@ Guidelines for AI agents (Claude, Codex, Cursor, Copilot, etc.) working in this ICP skills are tested, frequently-updated instruction files maintained by DFINITY (see https://skills.internetcomputer.org). Consult the relevant skills **before** making changes — do not rely on training-data knowledge of ICP tooling. - -ICP skills are version-locked in this repo (skills-lock.json) and live in your -agent skills directory. Skills are authoritative — prefer them over general -knowledge for all ICP work. Before your first task in a new session, offer to run -`npx skills update`; if the user declines or the session is non-interactive, keep -the locked versions and continue — never block. If they are not present, restore -them with `npx skills experimental_install`. + +ICP skills auto-update each session via a SessionStart hook +(`.claude/sync-ic-skills.sh`) and live in your agent skills directory — you don't +need to run anything to refresh them. Skills are authoritative — prefer them over +general knowledge for all ICP work. If they are not present (hook hasn't run, or +`jq` is missing), fetch them on demand per the "Use skills now" steps above. +**On-demand fallback** (any agent, no hook needed): fetch the index once per session from `https://skills.internetcomputer.org/.well-known/skills/index.json`, then fetch the matching skill's `SKILL.md` before writing ICP code for a task. This is how non–Claude Code agents (Cursor, Copilot, Codex, …) use the skills, since the SessionStart hook is Claude Code–only. + --- ## Repository overview diff --git a/skills-lock.json b/skills-lock.json deleted file mode 100644 index 77b0a540e..000000000 --- a/skills-lock.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "version": 1, - "skills": { - "agent-web-identity": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/agent-web-identity/SKILL.md", - "computedHash": "2832d3aa2ffd692fbec25bb7ed196913e19a7aa035aa3a6ae0cfd13ae02493a7" - }, - "asset-canister": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/asset-canister/SKILL.md", - "computedHash": "2b27caf9680ad5226fbf6a758066516e3a4c4434ff6039641bc3fb8081626466" - }, - "autosync-ic-skills": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/autosync-ic-skills/SKILL.md", - "computedHash": "0ccbf3c4c42156bf3c3150efda6a97e4db27068df498e6b9ad781c0aa80eefb8" - }, - "caffeine-app": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/caffeine-app/SKILL.md", - "computedHash": "caa9c9b90c5d23a4c3475331c84fca86b302d58c34ce1a12d1eed1b1161ed515" - }, - "canhelp": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/canhelp/SKILL.md", - "computedHash": "d7418dc6133afbf815501c1c46ce2129c6eb1e9332adbc485e0bdeef9f31505c" - }, - "canister-security": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/canister-security/SKILL.md", - "computedHash": "8367257eb731552d5406e4d7ee49879036b7bcbb9483fdb2664d1953e81738f1" - }, - "certified-variables": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/certified-variables/SKILL.md", - "computedHash": "607178e7294406cb328d1f760bf33f8cf42d386863163e7222c9a31e84252312" - }, - "ckbtc": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/ckbtc/SKILL.md", - "computedHash": "549b31591c740983bde86c660d9574da50890525ecac764b26b440b2503727f3" - }, - "custom-domains": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/custom-domains/SKILL.md", - "computedHash": "a7cfd4178d1d24bebd432d5c723ac12d6a0ffa6323123c7110a645b42657a9ae" - }, - "cycles-management": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/cycles-management/SKILL.md", - "computedHash": "1b07969a39b849ffd73f777ec2f9bc95a4923afea7c40626e821ab29c5c7493d" - }, - "deploy-to-cloud-engine": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/deploy-to-cloud-engine/SKILL.md", - "computedHash": "f2ad8adc8d776548d054d65d02b076a4461a270eab562dda51c521a45a6f9769" - }, - "evm-rpc": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/evm-rpc/SKILL.md", - "computedHash": "9099a405cda7f1ada279acfb2c04a322df90ec7701ddecae5a8f0e671fd3f340" - }, - "https-outcalls": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/https-outcalls/SKILL.md", - "computedHash": "0207638b0c3b0410900d355ad0dc63343f6ac1102b338b0349d430de34265118" - }, - "ic-dashboard": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/ic-dashboard/SKILL.md", - "computedHash": "ea969d231566b38d90c16a59f165d16496dd5f47faf3c7e939a051aeecc6fcb3" - }, - "icp-cli": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/icp-cli/SKILL.md", - "computedHash": "92a38a3d867130d81df8b8d539a47f0f3dbc1a54e49722c544675fcd8a34bdd6" - }, - "icrc-ledger": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/icrc-ledger/SKILL.md", - "computedHash": "0a87182ac37e596cdc8c0c329d18191483ae25a7e5dfd647fee717a08bd92d7e" - }, - "improve-ic-skill": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": ".agents/skills/improve-ic-skill/SKILL.md", - "computedHash": "7e46c64af6dba6b2735630e3575a0c261f02882664a4f423cb2071665b1858b4" - }, - "internet-identity": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/internet-identity/SKILL.md", - "computedHash": "9455fe0380e319b7afe0ccbd60729fa6e454a72409d70d89eea267a6d1d609ed" - }, - "migrating-motoko": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/migrating-motoko/SKILL.md", - "computedHash": "c3bf144fa83262ae3d0a212b8bb45be11641e7f25cc8e059dffb4715bd91f4cd" - }, - "migrating-motoko-enhanced": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/migrating-motoko-enhanced/SKILL.md", - "computedHash": "2b55988526543ec4ec28f028e7025838110daf7be8fa8fce2e64f9ae4871d1e8" - }, - "mops-cli": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/mops-cli/SKILL.md", - "computedHash": "9aaf1975719310944b77b3cb53aed9a308c88ffa7d317a9a4a63771f1b7f4660" - }, - "motoko": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/motoko/SKILL.md", - "computedHash": "95213a75a9c65edb3fede53fcc0bfb42edb6fbec85e91d2ca0fb1095a75d391b" - }, - "multi-canister": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/multi-canister/SKILL.md", - "computedHash": "278aff0df2bf5c20af2ca0c5ae64452c1784d3f770540c78f11481b3da9c443d" - }, - "skill-creator": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": ".agents/skills/skill-creator/SKILL.md", - "computedHash": "d53356a7a117bd9f1de43aff36a0fd16ab816786872588ab36f93f7819a2b245" - }, - "sns-launch": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/sns-launch/SKILL.md", - "computedHash": "7d02bb7addb5504ae160f94d53a97a2b1b9a6d3338efb9bc262903fbeb198056" - }, - "stable-memory": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/stable-memory/SKILL.md", - "computedHash": "bc26d61750c8a22000fed6b7d752d82dfd773fc22889346e904e6cefd88b0078" - }, - "vetkd": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/vetkd/SKILL.md", - "computedHash": "c80cee4c04d2b9e044e5cfd9436e7a8ac973ef895296c4e7824b3adfaafcccdd" - }, - "wallet-integration": { - "source": "dfinity/icskills", - "sourceType": "github", - "skillPath": "skills/wallet-integration/SKILL.md", - "computedHash": "b4ba1162c10886dfead681286676d66e5c9bc0aa104e3ef45a03975e2a8d99a5" - } - } -} From 47c7d5a2319f9cfb49c21663604ab123ed011967 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 6 Aug 2026 11:24:51 +0200 Subject: [PATCH 2/5] docs(AGENTS): explain the autosync skills setup + link the AI-agents guide Add a human-readable note on how skills are wired in this repo (autosync SessionStart hook, nothing to commit on change, Claude Code-only with an on-demand fallback for other agents) and point to the developer-docs AI coding agents guide for general background. --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index b7ce5681c..e2987a85d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,9 @@ Guidelines for AI agents (Claude, Codex, Cursor, Copilot, etc.) working in this ## ICP Skills -ICP skills are tested, frequently-updated instruction files maintained by DFINITY (see https://skills.internetcomputer.org). Consult the relevant skills **before** making changes — do not rely on training-data knowledge of ICP tooling. +ICP skills are tested, frequently-updated instruction files maintained by DFINITY (see https://skills.internetcomputer.org). Consult the relevant skills **before** making changes — do not rely on training-data knowledge of ICP tooling. For background on how agents consume ICP skills, see the [AI coding agents guide](https://docs.internetcomputer.org/guides/ai-coding-agents). + +**How this repo is set up:** it uses **autosync**. A committed `SessionStart` hook (`.claude/settings.json` → `.claude/sync-ic-skills.sh`) mirrors the latest skills into `.claude/skills/` at the start of every session, so they stay current with **nothing to commit** when a skill changes (the skills directory itself is gitignored). The first time it runs, Claude Code asks you to trust the hook. **This targets Claude Code only** — other agents (Cursor, Copilot, Codex, …) don't run the hook and instead use the on-demand fallback noted below. From d93b84c3e053691f1719e4679f6d4eabb87ff4fc Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 6 Aug 2026 11:26:44 +0200 Subject: [PATCH 3/5] docs(README): brief human-facing pointer to the AI-agents skills setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explain, for developers cloning the repo, that it works with AI coding agents via ICP skills and uses autosync (a Claude Code SessionStart hook) — so the first-session trust prompt is expected. Keep the detail in AGENTS.md (single source of truth) and link there + the AI coding agents guide. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ad9c7b3b7..dfc0fde8d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,12 @@ Then navigate into an example and follow its README to deploy. > **Note:** Open the repo root in the container — not an individual example subfolder. +## Working with AI coding agents + +These examples are built to work well with AI coding agents, backed by [ICP skills](https://docs.internetcomputer.org/guides/ai-coding-agents) — tested, frequently-updated instructions that keep an agent aligned with the fast-moving platform. + +The repo is set up with **autosync**: opening it in Claude Code runs a `SessionStart` hook that keeps the skills current automatically (you'll be asked to trust the hook the first time). This targets Claude Code today; other agents fetch the skills on demand instead. Details are in [AGENTS.md](AGENTS.md). + ## Resources - [Quickstart](https://docs.internetcomputer.org/getting-started/quickstart) From fa3cf2d9f6c36ad5c6c8ae198dfe1ec9e27e87a6 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 6 Aug 2026 11:31:37 +0200 Subject: [PATCH 4/5] docs(README): point 'ICP skills' at the registry, not the how-to guide skills.internetcomputer.org is where the skills live and are explored; the docs guide is the how-agents-use-them reference. Link both distinctly instead of hiding the registry behind the guide URL. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dfc0fde8d..1142689a6 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Then navigate into an example and follow its README to deploy. ## Working with AI coding agents -These examples are built to work well with AI coding agents, backed by [ICP skills](https://docs.internetcomputer.org/guides/ai-coding-agents) — tested, frequently-updated instructions that keep an agent aligned with the fast-moving platform. +These examples are built to work well with AI coding agents, backed by **ICP skills** — tested, frequently-updated instructions that keep an agent aligned with the fast-moving platform. Browse the skills at [skills.internetcomputer.org](https://skills.internetcomputer.org), and see the [AI coding agents guide](https://docs.internetcomputer.org/guides/ai-coding-agents) for how agents consume and install them. The repo is set up with **autosync**: opening it in Claude Code runs a `SessionStart` hook that keeps the skills current automatically (you'll be asked to trust the hook the first time). This targets Claude Code today; other agents fetch the skills on demand instead. Details are in [AGENTS.md](AGENTS.md). From 7278b21d0d16733f1760c0d792143243bc2e7f69 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 6 Aug 2026 11:35:38 +0200 Subject: [PATCH 5/5] docs: link 'autosync' to the autosync-ic-skills skill page autosync is itself an ICP skill that sets up the sync mechanism; link the term to its page (skills.internetcomputer.org/skills/autosync-ic-skills) in both the README and the AGENTS.md setup note. Managed block untouched. --- AGENTS.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e2987a85d..86150ed37 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Guidelines for AI agents (Claude, Codex, Cursor, Copilot, etc.) working in this ICP skills are tested, frequently-updated instruction files maintained by DFINITY (see https://skills.internetcomputer.org). Consult the relevant skills **before** making changes — do not rely on training-data knowledge of ICP tooling. For background on how agents consume ICP skills, see the [AI coding agents guide](https://docs.internetcomputer.org/guides/ai-coding-agents). -**How this repo is set up:** it uses **autosync**. A committed `SessionStart` hook (`.claude/settings.json` → `.claude/sync-ic-skills.sh`) mirrors the latest skills into `.claude/skills/` at the start of every session, so they stay current with **nothing to commit** when a skill changes (the skills directory itself is gitignored). The first time it runs, Claude Code asks you to trust the hook. **This targets Claude Code only** — other agents (Cursor, Copilot, Codex, …) don't run the hook and instead use the on-demand fallback noted below. +**How this repo is set up:** it uses [**autosync**](https://skills.internetcomputer.org/skills/autosync-ic-skills), an ICP skill that installs the sync mechanism. A committed `SessionStart` hook (`.claude/settings.json` → `.claude/sync-ic-skills.sh`) mirrors the latest skills into `.claude/skills/` at the start of every session, so they stay current with **nothing to commit** when a skill changes (the skills directory itself is gitignored). The first time it runs, Claude Code asks you to trust the hook. **This targets Claude Code only** — other agents (Cursor, Copilot, Codex, …) don't run the hook and instead use the on-demand fallback noted below. diff --git a/README.md b/README.md index 1142689a6..e81a7f4f2 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Then navigate into an example and follow its README to deploy. These examples are built to work well with AI coding agents, backed by **ICP skills** — tested, frequently-updated instructions that keep an agent aligned with the fast-moving platform. Browse the skills at [skills.internetcomputer.org](https://skills.internetcomputer.org), and see the [AI coding agents guide](https://docs.internetcomputer.org/guides/ai-coding-agents) for how agents consume and install them. -The repo is set up with **autosync**: opening it in Claude Code runs a `SessionStart` hook that keeps the skills current automatically (you'll be asked to trust the hook the first time). This targets Claude Code today; other agents fetch the skills on demand instead. Details are in [AGENTS.md](AGENTS.md). +The repo is set up with [**autosync**](https://skills.internetcomputer.org/skills/autosync-ic-skills): opening it in Claude Code runs a `SessionStart` hook that keeps the skills current automatically (you'll be asked to trust the hook the first time). This targets Claude Code today; other agents fetch the skills on demand instead. Details are in [AGENTS.md](AGENTS.md). ## Resources