Skip to content

feat(icp-cli): use mops generate candid; Rust recipe v3.3.0 (optional package)#245

Merged
marc0olo merged 1 commit into
mainfrom
feat/icp-cli-mops-generate-rust-v3.3.0
Jul 13, 2026
Merged

feat(icp-cli): use mops generate candid; Rust recipe v3.3.0 (optional package)#245
marc0olo merged 1 commit into
mainfrom
feat/icp-cli-mops-generate-rust-v3.3.0

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Closes #214.

Improves the icp-cli skill on two fronts: adopting mops generate candid for Motoko Candid generation, and updating the Rust recipe to v3.3.0 (where package is now optional).

Changes to skills/icp-cli/SKILL.md

Issue #214mops generate candid

  • Pitfall 16 (Motoko binding-generation path) now recommends mops generate candid backend — a single step that extracts the Candid interface directly from Motoko source without compiling WASM — replacing the old mops build backend + cp .mops/.build/backend.did … two-step. Cross-references the mops-cli skill, where the command is already fully documented. The "nothing to do" path (no binding generation needed) is unchanged, as the issue requested.

Rust recipe v3.3.0 — package now optional

  • Bumped all @dfinity/rust@v3.2.0v3.3.0 references (pitfalls 3, 4, 14; Rust config example; recipe table).
  • Recipe table: package moved from requiredoptional (defaults to the canister name), and added the previously-missing metadata optional config.
  • New Pitfall 21: package is optional when the canister name matches the Cargo [package] name; set it only when they differ (e.g. a workspace crate). Pitfall 4 and the Rust config section cross-reference it.

Evals (evaluations/icp-cli.json)

Added two cases and re-scoped one. All changed/added cases were run with baseline.

Eval results

Case 24 — Candid generation for Motoko binding (mops generate candid) (new) — WITH 5/6 | WITHOUT 2/6

The one WITH miss is a completeness nuance (the "overwrites the existing [canisters.backend].candid path if set" branch); the prompt described a fresh setup so the model covered the other branch. Both branches are documented in the skill body.

Case 25 — Adversarial: Rust recipe package parameter (minimal vs workspace) (new) — WITH 4/4 | WITHOUT 4/4

No with/without delta: Opus 4.8 already knows the v3.3.0 package convention and reasons it out. Kept as a regression guard that pins the exact version behavior (and would catch a future WITH-skill regression / weaker models).

Case 15 — Full-stack Motoko config artifacts (reworked) — WITH 6/6 | WITHOUT 4/6

The previous version of this case asked for an entire full-stack project in one prompt (icp.yaml + mops.toml + Motoko source + bindings + Vite dev-server + React component + walkthrough). That response exceeded the eval runner's hard 120s subprocess timeout, so claude was killed with ETIMEDOUT and every behavior failed for both WITH and WITHOUT. Re-scoped the prompt to just the config artifacts + the candid command (excluding React component code and prose), and dropped the dev-server/outDir/local-network behaviors that are already covered by cases 19 and 6. It now completes reliably and shows the mops generate candid delta.

🤖 Generated with Claude Code

… package)

Closes #214.

- Pitfall 16 (Motoko binding path): recommend `mops generate candid`
  (single step, no WASM build) instead of `mops build` + `cp`; cross-ref
  the mops-cli skill. "Nothing to do" path unchanged.
- Bump @dfinity/rust@v3.2.0 -> v3.3.0 throughout.
- Recipe table: package moved from required -> optional (defaults to
  canister name); add previously-missing `metadata` optional config.
- New Pitfall 21: package is optional when the canister name matches the
  Cargo [package] name; required only when they differ (workspaces).
- Evals: update case 15 to expect `mops generate candid` and re-scope it
  to avoid the 120s runner timeout; add cases for mops generate candid
  and the Rust package convention.
@marc0olo marc0olo requested review from a team and JoshDFN as code owners July 13, 2026 09:37
@github-actions

Copy link
Copy Markdown

Skill Validation Report

Validating skill: /home/runner/work/icskills/icskills/skills/icp-cli

Structure

  • Pass: SKILL.md found
  • Pass: all files in references/ are referenced

Frontmatter

  • Pass: name: "icp-cli" (valid)
  • Pass: description: (626 chars)
  • Pass: license: "Apache-2.0"
  • Pass: metadata: (2 entries)

Tokens

  • Warning: SKILL.md body is 7163 tokens (spec recommends < 5000)

Markdown

  • Pass: no unclosed code fences found

Tokens

File Tokens
SKILL.md body 7,163
references/binding-generation.md 1,031
references/dev-server.md 690
references/dfx-migration.md 2,620
Total 11,504

Content Analysis

Metric Value
Word count 3,873
Code block ratio 0.17
Imperative ratio 0.12
Information density 0.14
Instruction specificity 0.80
Sections 20
List items 73
Code blocks 35

References Content Analysis

Metric Value
Word count 2,133
Code block ratio 0.25
Imperative ratio 0.13
Information density 0.19
Instruction specificity 0.80
Sections 18
List items 33
Code blocks 12

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)

References Contamination Analysis

Metric Value
Contamination level low
Contamination score 0.03
Primary language category javascript
Scope breadth 2
  • Warning: Language mismatch: shell (1 category differ from primary)

Result: 1 warning

Project Checks


✓ Project checks passed for 1 skills (0 warnings)

@marc0olo marc0olo merged commit da9d763 into main Jul 13, 2026
6 checks passed
@marc0olo marc0olo deleted the feat/icp-cli-mops-generate-rust-v3.3.0 branch July 13, 2026 13:45
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.

Update icp-cli skill: replace mops build + cp pattern with mops generate candid

3 participants