Skip to main content

Build

Openclaw Performance

OpenClawOfficialCertified

Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.

  • New
  • v1.0.2
  • Reviewed Oct 19
  • No reviews yet

Capabilities

  • Measure

    Write the acceptance rule in the PR before the first run: flow…

  • Find waste

    Ask of every counted operation: does this request need it

  • Fix in this order

    A worker move or a deferral relocates cost; count main-thread and…

  • Land

    Done when the table meets the rule written in step 1

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.2

OpenClaw Performance

Waste is work a request does not need. Big speedups come from deleting waste, not from doing the same work faster. A cache is the last resort: it hides waste until its key, invalidation or hit rate breaks, and the waste returns.

1. Measure

Write the acceptance rule in the PR before the first run: flow, workload, metric, cold or warm, samples, and the change that counts as a win or a regression.

Flow Committed workload
CLI startup pnpm test:startup:bench (:check holds the budget)
Gateway startup / restart scripts/bench-gateway-startup.ts, scripts/bench-gateway-restart.ts, scripts/perf/post-restart-burst-measure.ts
Chat turn, frames per turn scripts/bench-channel-turn.mts, scripts/perf/transcript-broadcast-measure.ts
Control UI cold load scripts/bench-control-ui-cold-load.ts, pnpm ui:check-performance (:base compares)
Control UI older-history paging scripts/bench-control-ui-history-depth.ts
Session list, multi-agent shape scripts/perf/team-shape-fixture.ts, src/gateway/session-list-viewers.perf.test.ts
Concurrency, SQLite state scripts/bench-gateway-concurrency.ts, pnpm test:sqlite:perf
  • Counts first: operations per action (SQL statements, RPCs and frames, file reads, catalog or registry loads, spawns, renders) before wall time. Counts hold steady on a loaded host. A count that should be zero is the bug.
  • Real flow: an isolated Gateway on the head under test, real transport, the slow path included. A mock Gateway, a stale build or a dev server measures something else.
  • Samples: baseline and candidate interleaved (ABAB), at least 5 each, cold and warm apart; median and p95 with spread, run serially, host load recorded.
  • Rerunnable: only committed scripts count; extend an existing one when none fits.
  • Profile: node --cpu-prof per thread, or a browser performance trace, on the hot path.

Done when the flow has a committed workload, a baseline table and a written rule.

2. Find waste

Ask of every counted operation: does this request need it? Look for:

  • Eager imports: a registry lookup loading the plugin runtime, or startup loading optional runtimes.
  • Repeated work: a synchronous read per archived row, log patterns resolved per frame, or a child process per lookup.
  • Redundant checks and backups: rechecking schema or admission on a warm handle, or rescanning and backing up state just checked or written.
  • Catalog rebuilds: rebuilding per agent, per miss, or on every TTL expiry.
  • Unrelated waits: blocking the Usage page on optional provider plans or retrying unrelated reads.
  • Unnecessary copies: cloning a payload per turn or wrapping every value as it crosses a boundary.
  • Work that grows with each delta: reparsing the whole reply per token, rendering on every update, or resending full rows for one change.

Done when each dominant count traces to the code that issues it, with a yes or no on "needed".

3. Fix in this order

  1. Delete the waste. Keep checks that protect a contract and prove the contract still holds.
  2. Once at the owner: callers consume the owner's recorded fact.
  3. Carry the prepared fact through the hot path.
  4. Batch independent work, and prove the batch keeps frames, latency tails and cold start steady.
  5. Cache, with a written reason why steps 1–4 do not apply. Follow root "Cache identity", invalidate from the owner's writes, bound the size, and add an interleaved work-count test. Check whether readers evict each other or the budget causes repeated misses.

A worker move or a deferral relocates cost; count main-thread and total work both.

Done when the waste is gone from the counts, or the PR says which step stopped and why.

4. Land

  • Rerun the step 1 workload on baseline and candidate under the same rule.
  • Every user-facing metric holds or improves: latency, p95/p99, frames, cold start, CPU, memory, counts. A worse metric needs the owner's explicit acceptance in the PR. A 20% move in one cell is a stop, never "within spread".
  • Revert changes without a measurable gain.
  • Proof lives in the PR, not in new tests: the before/after counts are the evidence. Extend a flow's existing work-count test only when this waste has come back before; test-audit owns test value.
  • PR evidence: workload command, acceptance rule, before/after table (counts and times, median and p95, samples), waste removed, and any metric that moved the wrong way.

Done when the table meets the rule written in step 1.

Test-suite speed: openclaw-test-performance. Test heap growth: openclaw-test-heap-leaks. CI capacity: openclaw-ci-limits.

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from OpenClaw

View source →

Frequently asked questions about openclaw-performance

What does the openclaw-performance skill do?

Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the openclaw-performance skill?

Run `npx @skills-hub-ai/cli install openclaw-performance` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/openclaw-performance/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does openclaw-performance work with?

openclaw-performance runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the openclaw-performance skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use openclaw-performance after installing it?

In Claude Code, type `/openclaw-performance` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the openclaw-performance skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/openclaw-performance)](https://skills-hub.ai/skills/openclaw-performance)
HTML
<a href="https://skills-hub.ai/skills/openclaw-performance"><img src="https://skills-hub.ai/api/badges/skill/openclaw-performance" alt="Install on Skills Hub"></a>

More options in the badge docs.