canhelp
Given a canister ID or name in $ARGUMENTS, fetch and summarize its Candid interface.
Steps
-
Resolve the canister ID by running the resolve script from the skill's base directory:
./scripts/resolve-canister-id.sh "$ARGUMENTS"If
$ARGUMENTSis already a valid principal, the script echoes it back. Otherwise, it queries the IC Dashboard API and outputs matches as<canister-id> <name>(one per line).- If there is a single result, clearly display the resolved canister ID and use it directly.
- If there are multiple results, present the list to the user and ask them to pick one before continuing.
-
Fetch the Candid interface using the resolved canister ID:
./scripts/fetch-candid.sh <resolved-canister-id>The script outputs the path to the downloaded
.didfile. -
Read the file using the
Readtool. -
Present the output as a readable summary with the following structure:
Canister
<canister-id>Query methods:
method_name(arg1: type1, arg2: type2) → return_type— one-line description if inferable from the name
Update methods:
method_name(arg1: type1) → return_type
Types:
- List any custom record/variant types defined in the interface, with their fields
Guidelines
- Group methods by query vs update
- Sort methods alphabetically within each group
- For complex nested types, show the top-level structure and note nesting
- If the candid is very large (>100 methods), show a summary count and list only the most important-looking methods, offering to show the full list on request
- If the fetch succeeds, but the Candid interface is empty,explain that the canister is not exposing its Candid interface in the wasm metadata
- If the fetch fails, suggest the user verify the canister ID and that
icpis installed
More from dfinity/icskills
icp-cli
Guides use of the icp command-line tool for building and deploying Internet Computer applications. Covers project configuration (icp.yaml), recipes, environments, canister lifecycle, and identity management. Use when building, deploying, or managing any IC project. Use when the user mentions icp, dfx, canister deployment, local network, or project setup. Do NOT use for canister-level programming patterns like access control, inter-canister calls, or stable memory — use domain-specific skills instead.
127asset-canister
Deploy frontend assets to the IC. Covers certified assets, SPA routing with .ic-assets.json5, content encoding, and programmatic uploads. Use when hosting a frontend, deploying static files, or setting up SPA routing on IC. Do NOT use for canister-level code patterns or custom domain setup — use custom-domains instead.
119internet-identity
Integrate Internet Identity authentication. Covers passkey and OpenID login flows, delegation handling, and principal-per-app isolation. Use when adding login, sign-in, auth, passkeys, or Internet Identity to a frontend or canister. Do NOT use for wallet integration or ICRC signer flows — use wallet-integration instead.
116https-outcalls
Make HTTPS requests from canisters to external web APIs. Covers transform functions for consensus, cycle cost management, response size limits, and idempotency patterns. Use when a canister needs to call an external API, fetch data from the web, or make HTTP requests. Do NOT use for EVM/Ethereum calls — use evm-rpc instead.
114stable-memory
Persist canister state across upgrades. Covers StableBTreeMap and MemoryManager in Rust, persistent actor in Motoko, and upgrade hook patterns. Use when dealing with canister upgrades, data persistence, data lost after upgrade, stable storage, StableBTreeMap, pre_upgrade traps, or heap vs stable memory. Do NOT use for inter-canister calls or access control — use multi-canister or canister-security instead.
113canister-security
IC-specific security patterns for canister development in Motoko and Rust. Covers access control, anonymous principal rejection, reentrancy prevention (CallerGuard pattern), async safety (saga pattern), callback trap handling, cycle drain protection, and safe upgrade patterns. Use when writing or modifying any canister that modifies state, handles tokens, makes inter-canister calls, or implements access control.
112