Skip to content

Commit 5ccd559

Browse files
authored
perf(icp-cli): reduce skill body by 33 lines for token efficiency (#199)
1 parent 119fc05 commit 5ccd559

1 file changed

Lines changed: 2 additions & 35 deletions

File tree

skills/icp-cli/SKILL.md

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,11 @@ Before generating any `icp` command not explicitly documented here, run `icp --h
1717

1818
## Installation
1919

20-
**Recommended (npm)** — requires [Node.js](https://nodejs.org/) >= 22:
2120
```bash
2221
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
2322
```
2423

25-
`ic-wasm` is required when using official recipes (`@dfinity/rust`, `@dfinity/motoko`, `@dfinity/asset-canister`) — they depend on it for optimization and metadata embedding.
26-
27-
**Alternative methods:**
28-
```bash
29-
# Homebrew (macOS/Linux)
30-
brew install icp-cli
31-
brew install ic-wasm
32-
33-
# Shell script (macOS/Linux/WSL)
34-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/latest/download/icp-cli-installer.sh | sh
35-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/ic-wasm/releases/latest/download/ic-wasm-installer.sh | sh
36-
```
37-
38-
**Verify:**
39-
```bash
40-
icp --version
41-
ic-wasm --version
42-
```
24+
`ic-wasm` is required when using official recipes (`@dfinity/rust`, `@dfinity/motoko`, `@dfinity/asset-canister`) — they depend on it for optimization and metadata embedding. Requires [Node.js](https://nodejs.org/) >= 22. Also available via Homebrew and shell script installer — see the [icp-cli releases](https://github.com/dfinity/icp-cli/releases).
4325

4426
**Linux note:** On minimal installs, you may need system libraries: `sudo apt-get install -y libdbus-1-3 libssl3 ca-certificates` (Ubuntu/Debian) or `sudo dnf install -y dbus-libs openssl ca-certificates` (Fedora/RHEL).
4527

@@ -77,22 +59,7 @@ ic-wasm --version
7759
type: "@dfinity/rust@v3.2.0"
7860
```
7961
80-
4. **Writing manual build steps when a recipe exists.** Official recipes handle Rust, Motoko, and asset canister builds. Use them instead of writing shell commands:
81-
```yaml
82-
# Unnecessary — use a recipe instead
83-
build:
84-
steps:
85-
- type: script
86-
commands:
87-
- cargo build --target wasm32-unknown-unknown --release
88-
- cp target/.../backend.wasm "$ICP_WASM_OUTPUT_PATH"
89-
90-
# Preferred
91-
recipe:
92-
type: "@dfinity/rust@v3.2.0"
93-
configuration:
94-
package: backend
95-
```
62+
4. **Writing manual build steps when a recipe exists.** Official recipes handle Rust, Motoko, and asset canister builds. Use `recipe: { type: "@dfinity/rust@v3.2.0", configuration: { package: backend } }` instead of writing shell commands in `build.steps`.
9663

9764
5. **Not committing `.icp/data/` to version control.** Mainnet canister IDs are stored in `.icp/data/mappings/<environment>.ids.json`. Losing this file means losing the mapping between canister names and on-chain IDs. Always commit `.icp/data/` — never delete it. Add `.icp/cache/` to `.gitignore` (it is ephemeral and rebuilt automatically).
9865

0 commit comments

Comments
 (0)