feat: skills canister — list_skills, get_skill, search_skills#148
Open
dfinityianblenke wants to merge 1 commit intomainfrom
Open
feat: skills canister — list_skills, get_skill, search_skills#148dfinityianblenke wants to merge 1 commit intomainfrom
dfinityianblenke wants to merge 1 commit intomainfrom
Conversation
…ry methods Adds a Rust IC canister that exposes the skill collection as callable query methods. Skill content is embedded at compile time via build.rs so there is no runtime filesystem dependency and no separate data migration needed. - `canisters/skills/src/lib.rs` — three query methods: list_skills(), get_skill(name), search_skills(query); returns SkillSummary / SkillDetail - `canisters/skills/build.rs` — parses SKILL.md frontmatter at build time, embeds names/titles/descriptions/categories/content as static data - `canisters/skills/skills.did` — Candid interface (SkillSummary, SkillDetail) - `canisters/skills/Cargo.toml` — ic-cdk 0.19.0, candid 0.10.22 - `Cargo.toml` — workspace root with release profile - `dfx.json` — dfx config for skills canister + webmcp method descriptions (input for ic-webmcp-codegen dfx when generating /.well-known/webmcp.json) - `.gitignore` — add target/ and Cargo.lock Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Skill Validation ReportNo skill files were changed in this PR — validation skipped. |
4 tasks
dfinityianblenke
added a commit
that referenced
this pull request
Apr 2, 2026
Registers list_skills, get_skill, and search_skills with navigator.modelContext so AI agents can call them as tools regardless of browser: Chrome 146+ uses the native WebMCP API, all others pick up the inline polyfill installed by this script. - public/webmcp-setup.js — self-contained polyfill + tool registration Uses the existing /.well-known/skills/ static API endpoints (no canister or @dfinity/webmcp dependency required). When PR #148 is deployed and @dfinity/webmcp is published, the execute() functions can be upgraded to use ICWebMCP for full Candid canister calls with certified responses. - src/layouts/BaseLayout.astro <link rel="modelcontext" href="/.well-known/webmcp.json"> — signals Chrome 146+ to load the manifest automatically. <script src="/webmcp-setup.js" defer> — loads the polyfill on every page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 tasks
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.
Summary
Adds a Rust IC canister that exposes the 19 IC skill documents as callable query methods. Skill content is embedded at compile time from
skills/*/SKILL.mdviabuild.rs— no runtime filesystem access, no data migration.Three query methods (see
canisters/skills/skills.did):list_skills() → vec SkillSummary— names, titles, descriptions, categoriesget_skill(name: text) → opt SkillDetail— full SKILL.md content + metadatasearch_skills(query: text) → vec SkillSummary— substring match across name, title, description, and contentHow skill data is embedded (
build.rs):skills/*/SKILL.mdat compile timeskills_data.rsinto$OUT_DIRwith astatic SKILLS_DATA: &[StaticSkillData]arraycargo:rerun-if-changed=../../skillsensures incremental rebuilds when any skill changesdfx.json includes a
webmcpconfig block (used byic-webmcp-codegen dfxin the follow-up manifest PR) with per-method descriptions and param descriptions for AI agents.Test plan
cargo check -p ic-skills-canister— passes (verified locally)dfx deploy skills --network local— deploys canisterdfx canister call skills list_skills— returns all skill summariesdfx canister call skills get_skill '("motoko")'— returns full SKILL.mddfx canister call skills search_skills '("ckbtc")'— returns matching skillsdfx canister call skills get_skill '("nonexistent")'— returnsnullThis should be followed by merging PR 149 and optionally (but ideally) PR 150