Skip to content

fix(asset-canister): fix skill errors, add npm versions and evals#102

Merged
raymondk merged 5 commits intomainfrom
fix/asset-canister-skill-improvements
Mar 23, 2026
Merged

fix(asset-canister): fix skill errors, add npm versions and evals#102
raymondk merged 5 commits intomainfrom
fix/asset-canister-skill-improvements

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Mar 21, 2026

Summary

Fixes factual errors in the asset-canister skill, wraps top-level await in code examples, adds npm versions, and creates the first evaluation suite.

Mentions #97, #95, #96, #100.

Changes

Skill (asset-canister/SKILL.md):

  • Wrap all await in async function manageAssets() (no top-level await)
  • Fix import for fs — was mid-block (invalid ES module syntax), moved to top
  • Add npm versions to prerequisites (@icp-sdk/canisters >= 3.5.0, @icp-sdk/core >= 5.0.0)
  • Replace all source references with dir (dfx terminology → icp-cli)
  • Fix pitfall #1: sourceconfiguration.dir
  • Fix pitfall #3: clarify configuration.build is optional, dir must have content
  • Add pitfall #7: asset canister Wasm version must be >= 0.30.2 for ic_env cookie support
  • Add note in programmatic uploads: shouldFetchRootKey is for Node.js scripts only, browser frontends should use rootKey from ic_env cookie
  • Fix custom domain registration: replace "registration is automatic" with the actual validate + POST flow (https://icp0.io/custom-domains/v1/<domain>/validate and POST .../v1/<domain>)
  • Remove unrelated Motoko backend canister from icp.yaml example

Evaluations (evaluations/asset-canister.json): New file with 4 output evals + 12 trigger evals

  • Programmatic asset upload (Node.js context)
  • SPA routing configuration (.ic-assets.json5)
  • Asset canister recipe setup (icp.yaml)
  • Security: shouldFetchRootKey in Node.js scripts

@marc0olo marc0olo requested review from a team and JoshDFN as code owners March 21, 2026 01:40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

Skill Validation Report

Validating skill: /home/runner/work/icskills/icskills/skills/asset-canister

Structure

  • Pass: SKILL.md found

Frontmatter

  • Pass: name: "asset-canister" (valid)
  • Pass: description: (312 chars)
  • Pass: license: "Apache-2.0"
  • Pass: compatibility: (31 chars)
  • Pass: metadata: (2 entries)

Markdown

  • Pass: no unclosed code fences found

Links

Tokens

File Tokens
SKILL.md body 3,292
Total 3,292

Content Analysis

Metric Value
Word count 1,954
Code block ratio 0.42
Imperative ratio 0.14
Information density 0.28
Instruction specificity 0.91
Sections 16
List items 24
Code blocks 13

Contamination Analysis

Metric Value
Contamination level low
Contamination score 0.12
Primary language category shell
Scope breadth 3
  • Warning: Language mismatch: config, javascript (2 categories differ from primary)

Result: passed

Project Checks


✓ Project checks passed for 1 skills (0 warnings)

@raymondk raymondk enabled auto-merge (squash) March 23, 2026 21:26
@raymondk raymondk merged commit 3a50346 into main Mar 23, 2026
6 checks passed
@raymondk raymondk deleted the fix/asset-canister-skill-improvements branch March 23, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants