Skip to content
Development
Command

/benchmark

Compare per-instruction CU with the stored baseline to catch regressions

From plugin
ai-kit
11154 skills15 agents54 commands4 MCP
> /plugin marketplace add solanabr/ai-kit
> /plugin install solana-ai-kit@stbr

Command definition

benchmark.md
description: "Compare per-instruction CU with the stored baseline to catch regressions"

Measure CU per instruction and compare it with the baseline in `.claude/benchmarks/cu-baseline.json`. $ARGUMENTS: optional program or instruction filter. For one-off profiling and optimization advice, use `/profile-cu`.

Steps

1. Build (`anchor build` / `cargo build-sbf`) and run the tests. Stop if any fail, since CU from failing paths is meaningless. 2. Measure with the same harness, inputs and toolchain as the baseline, because platform-tools and Agave upgrades shift CU on their own. Repeatable sources: `MolluskComputeUnitBencher`, LiteSVM `compute_units_consumed`, or Surfpool `surfnet_profileTransaction` with a tag plus `surfnet_getProfileResultsByTag`. 3. Write `.claude/benchmarks/cu-current.json`:

   {"timestamp": "<ISO 8601>", "commit": "<short sha>",
    "instructions": {"deposit": {"cu": 45000, "limit": 200000}}}

4. With no baseline yet, copy the current file to `cu-baseline.json` and say so. Otherwise compare per instruction: a delta above +5% of the baseline is a REGRESSION, below -5% is IMPROVED, anything else is STABLE. List new and removed instructions separately, and flag any instruction above 100k CU (warning) or 200k CU (critical: over the default per-instruction budget). 5. Replace the baseline only after the user confirms the changes are intended.

Output

Table: instruction | baseline | current | delta % | status. For each regression, give the commit range and the likely cause from the diff of that instruction's code since the baseline commit.

`.claude/` is gitignored by default in kit installs; run `/commit-claude-config` if CI or teammates should share the baseline.

Read more
@solanabr
Ships withai-kit

Claude Code, set up to ship on Solana. Not programs alone — the whole lifecycle: validating the idea, building the program and the app around it, shipping it, and the launch and growth work that follows.

1113 skills15 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
111
Star history of solanabr/solana-ai-kit on GitHub, a chart by star-history.com

Other commands on ai-kit.

add-skill

add-skill

Command

Install a pinned skill extension on demand (/add-skill <id>), or list core packs and extensions

@solanabr@solanabrInstall Command
adv

adv

Command

Short for /adversarial: run every task through proposer and adversary pairs, no triage

@solanabr@solanabrInstall Command
adversarial

adversarial

Command

Put a task's load-bearing claims and key decisions through a proposer and an adversary, with proof

@solanabr@solanabrInstall Command
audit-solana

audit-solana

Command

Audit Solana program code for exploitable bugs and write a findings report

@solanabr@solanabrInstall Command
build-app

build-app

Command

Build the web client (Next.js, Vite, React) and check env, types and bundle

@solanabr@solanabrInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command