bench
Run criterion benchmarks locally for one or all ICN crates. CI runs these on ubuntu-latest; local runs on icn-dev are for relative comparison only.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run criterion benchmarks locally for one or all ICN crates. CI runs these on ubuntu-latest; local runs on icn-dev are for relative comparison only.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ICN development companion for the InterCooperative Network Rust monorepo. Use when working on ICN code, docs, deployment, or protocol design. Provides crate-aware routing to specialist agents (icn-architect, icn-economist, icn-ops), enforces project conventions, and understands the current sprint state, cluster topology, and demo flow status. Triggers on: any ICN crate names, "cooperative contract", "mutual credit", "governance", "gossip", "K3s", "icn-dev", "ops/mcp", "Sprint", "demo flow", "CCL", "federation", "DID", "ledger", "trust graph", "icnd", "icnctl".
Full sprint-batch or stacked-PR integration pipeline. Owns merge order, rebases, local gates, and main sync.
Full sprint-batch or stacked-PR integration pipeline. Owns merge order, rebases, local gates, and main sync.
Show full ICN development status dashboard — active sessions, sprint tasks, worktree freshness, CI state, and cluster health
ICN session preflight. This skill should be used when the user explicitly invokes "/icn-agent-pack:preflight", or asks to "run preflight", "orient me on ICN", or "check the ICN session environment". Loads canonical docs and the latest handoff, then verifies branch, gh auth, ports, toolchain, and a light cargo check. Read-only; reports, never fixes.
ICN repo navigator / knowledge graph. This skill should be used when the user explicitly invokes "/icn-agent-pack:navigator", or asks to "map the repo", "build/refresh the knowledge graph", "trace this concept to its source", or "show the conceptual map / impact map". Begins the living repository knowledge-graph and conceptual-map workflow, grounded in the icn-ops MCP tools and (future) generated graph artifacts.
| name | bench |
| description | Run criterion benchmarks locally for one or all ICN crates. CI runs these on ubuntu-latest; local runs on icn-dev are for relative comparison only. |
| argument-hint | [crate-name | all] |
| user-invocable | true |
| allowed-tools | Bash |
| truth_contract | {"canonical_sources":["ops/state/config/repo-map.json"],"live_load_required":["cargo metadata --no-deps --format-version 1"],"examples_only":[],"never_hardcode":["package names (resolve via cargo metadata)","workspace paths (resolve via git rev-parse --show-toplevel)"]} |
Run criterion benchmarks for the specified crate, or all six targets.
Pass the short name (without icn- prefix) as $ARGUMENTS, e.g. gossip for icn-gossip.
| Short name | Full crate | Bench file |
|---|---|---|
| ledger | icn-ledger | ledger_bench |
| gossip | icn-gossip | gossip_bench |
| trust | icn-trust | trust_bench |
| net | icn-net | net_bench |
| compute | icn-compute | compute_bench |
| gateway | icn-gateway | commons_bench |
All commands run from the Rust workspace root (icn/ within the monorepo).
Confirm working directory: cd "$CLAUDE_PROJECT_DIR/icn"
If $ARGUMENTS is a short crate name (e.g. gossip), look up its bench file above and run:
cargo bench -p icn-<short-name> --bench <bench_file>
Example: cargo bench -p icn-gossip --bench gossip_bench
If $ARGUMENTS is all or empty, run all six:
cargo bench --bench compute_bench --bench commons_bench --bench gossip_bench \
--bench ledger_bench --bench net_bench --bench trust_bench
Criterion prints regression vs previous run automatically. Flag regressions in
gossip_bench, net_bench, or ledger_bench as high-priority (protocol-critical paths).
target/criterion/ artifacts.cargo check -p <crate> first.