Skip to content
Skills Library
Programming · Analysis

perf

/perf

Measure performance — baseline and bottleneck first, user-picked candidates, a pre-registered measurement run by worker with /haechi:run-experiment and checked by worker with /haechi:audit-experiment, then an authorized product change under the common work contract or a recorded rejection. Use for /haechi:perf, only when the user explicitly asks to measure or speed up something.

Repository
haechi ↗
Licence
MIT
Last repository change
11.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Measure performance — baseline and bottleneck first, user-picked candidates, a pre-registered measurement run by worker with /haechi:run-experiment and checked by worker with /haechi:audit-experiment, then an authorized product change under the common work contract or a recorded rejection. Use for /haechi:perf, only when the user explicitly asks to measure or speed up something.

Original author description

Measure performance — baseline and bottleneck first, user-picked candidates, a pre-registered measurement run by worker with /haechi:run-experiment and checked by worker with /haechi:audit-experiment, then an authorized product change under the common work contract or a recorded rejection. Use for /haechi:perf, only when the user explicitly asks to measure or speed up something.

How it works

  1. Task focus
  2. Settings and storage
  3. Steps
  4. Rejected-idea entry format
  5. No measurement tool in the repo
  6. Extra DONE evidence
  7. Delegation contracts
Original SKILL.md headings · 115 lines, 1,169 words
SKILL.md preview
---
name: perf
description: Measure performance — baseline and bottleneck first, user-picked candidates, a pre-registered measurement run by worker with /haechi:run-experiment and checked by worker with /haechi:audit-experiment, then an authorized product change under the common work contract or a recorded rejection. Use for /haechi:perf, only when the user explicitly asks to measure or speed up something.
---

# Measure and audit performance

Apply the [common work contract](../../principles/work-contract.md) within the authorized scope. It owns required implementation, verification, review and completion obligations; this skill supplies methods. Use /haechi:delegate for a bounded worker task when independent execution helps. Existing step names below are compatible delegation entry points, not an exclusive workflow state.

The main session runs these steps. Scope, delegation, authorization and completion requirements are in the session rules; this file adds only what is specific to performance. Principle files are two levels above this skill's folder (`<this skill's folder>/../../principles/<name>.md`): read **explain-the-number** before step 3 and **benchmark-checklist** before step 5. The haechi tools folder is two levels above this skill's folder (`<this skill's folder>/../../tools/`); run tools with `node`.

Start only on an explicit request to measure or speed something up. "It feels slow" alone: clarify whether measurement is requested or ordinary mismatch investigation is needed.

## Task focus

Define the number and the rule that decides success. Example: "p50 time from opening `/orders` to the first row drawn drops below 300 ms on the 5,000-order fixture." The easy mistake is not knowing what is being measured; "faster" alone does not define success.

## Settings and storage

Resolve measurement paths from repository instructions and conventions. Read `notesDir` from `~/.haechi/user.json`. Ask for any paths needed for this measurement that remain unresolved. Save personal preferences only when requested.

| What | Where |
|---|---|
| Measurement record: pre-registration, then problem, method, result, interpretation, next; environment, verdict table, excluded rows, raw-data path, variant hashes | Repository measurement folder, committed |
| One-line conclusion and baseline numbers | the area's main doc — committed |
| Rejected idea / open issue | Repository rejection or issue record, committed |
| Raw data and harness | `<notesDir>/perf-runs/<topic>` — never the scratchpad or a worktree that will be deleted |

## Steps

1. **Clarify the task.** Consider /haechi:spec using its description while establishing the requirements; this does not replace the measurement pre-registration or its confirmation. Establish the metric and conditions, the success rule, behavior and other metrics that must not worsen, and the evidence needed for a worker with /haechi:audit-experiment to rate the result "supported" under the pre-registered rules. Fixed labels and tables are optional.
2. **Purpose line.** One line on what this measurement decides: whether to adopt a change, or a before/after reference for a change already decided. If adoption is already decided, do not use the result as the reason to adopt.
3. **Baseline and bottleneck.** Measure the baseline and find what is actually slow with a profiler, separately from the reporting run. No hypothesis about what to change until the bottleneck is known.
   Leave: the baseline number and the bottleneck, with how you found it.
4. **Check past rejections.** Read the repository rejection record if one exists and run `node <tools>/rejected-staleness.mjs <rejection-record> [--json]`. An idea marked `unchanged` is not proposed again. An idea marked `changed` may come back, with what changed. If the user asks directly for a re-measurement, run it regardless.
5. **Candidates.** Compare candidates based on the bottleneck, including their cost and expected effect. The user picks what to try.
6. **Pre-register.** Write down: the decision metric and how sides are compared, rounds and order shuffling, how noise is measured, the decision rule, conditions for dropping a row, the marker that proves each variant ran, and the expected duration. Get the user's confirmation before running. Never change it after seeing data.
   Leave: the pre-registration, as the first section of the measurement record.
7. **Build the variant.** In an `exp/<topic>` worktree. Plant a fixed marker string (for example `PERF-MARKER:orders-virtual`) so each row can prove the variant ran.
8. **Run.** Delegate to a worker using /haechi:run-experiment with the pre-registration and the raw-data folder: noise, main run, aggregation, no interpretation. One measurement at a time — if another is running, wait until it ends.
   Leave: raw data in `<notesDir>/perf-runs/<topic>`.
9. **Audit.** Delegate to a separate worker using /haechi:audit-experiment with the pre-registration, raw data and the conclusion you want to draw. It re-aggregates and rates each claim supported, weak or invalid.
10. **Adopt.** The experiment code is reference only. Apply the common work contract to the authorized product change; use feature/refactor methods where useful and retain settled requirements. The implementer may read the experiment diff for direction; never cherry-pick or merge it. Include a short confirmation measurement on the real code in the evidence. A marker string left in the final diff means not done.
11. **Or reject.** Add an entry to `perf.rejected` in the format below.
12. **Record and correct.** Freeze the measurement record. Put the one-line conclusion and the baseline numbers in the area's main doc. Find docs this result contradicts and fix them.

## Rejected-idea entry format

`rejected-staleness.mjs` parses exactly this. Each entry starts with a `## ` heading and has no other `## ` line inside it. Each key is one line, written `Key: value` — no bullets, no bold. Required keys: `Base` (a commit in the current branch's history), `Paths` (comma-separated, each must exist at Base or now), `Revisit when`. Optional: `Dependencies` (comma-separated `name@version`, version required), plus free-text keys such as `Tried`, `Result`, `Data`. An entry that breaks these rules is reported `invalid` with the reason — fix the entry.

```markdown
## Virtualize the order list
Base: 3f2a91c
Paths: src/orders/OrderList.tsx, src/orders/useOrders.ts
Dependencies: react-window@1.8.9
Tried: windowed rendering of rows
Result: p50 first row 410 → 395 ms, inside noise (±30 ms)
Data: 5,000-order fixture
Revisit when: the list passes 20,000 rows or react-window 2 ships
```

## No measurement tool in the repo

First use what is already available: the browser profiler, `node --cpu-prof`, `py-spy`, installed test tools. If nothing fits, search the web for tools for this stack and compare install cost, accuracy and whether they run in CI; a table is optional. Widely used packages only, version pinned. Build it only after the user picks; adding a dependency is on the ask list.

## Extra DONE evidence

The auditor's "supported" verdict, plus the numbers, round count, scope (which conditions were measured) and the limiting factor. On adoption, the confirmation measurement on the real code and no marker strings in the diff.

## Delegation contracts

These compatible entries identify delegated methods, not an exclusive workflow or a mandatory agent sequence. Packet assembly also supplies the canonical common work contract. The main session fills the named context fields and task-specific acceptance criteria; detailed procedures and principle bodies stay in their referenced files. `read-only` means repository files remain unchanged; authorized temporary or report outputs must be named separately in `artifactPaths`.

```haechi-handoffs
{
  "measure": {
    "skills": [
      "run-experiment"
    ],
    "principles": [
      "explain-the-number"
    ],
    "checks": [],
    "writeScope": "read-only",
    "contextRequired": [
      "repository",
      "preregisteredPlan",
      "artifactLocation"
    ],
    "completion": [
      "Return raw tables and execution log without interpretation or an adoption decision."
    ]
  },
  "audit": {
    "skills": [
      "audit-experiment"
    ],
    "principles": [
      "explain-the-number"
    ],
    "checks": [
      "benchmark-checklist"
    ],
    "writeScope": "read-only",
    "contextRequired": [
      "repository",
      "preregisteredPlan",
      "rawData",
      "proposedConclusion",
      "harness",
      "runnerReport"
    ],
    "completion": [
      "Re-aggregate independently and rate claims supported, weak or invalid without a new measurement."
    ]
  }
}
```

Versions

RepositoryScoreLicence
This page · jisuzzzz/haechi100MIT
duronext/jig100MIT
dxos/dxos100Apache-2.0
anilsoylu/famiglia100Apache-2.0
oliver-kriska/claude-elixir-phoenix100MIT
8beeeaaat/touchdesigner-mcp100MIT
8beeeaaat/touchdesigner-mcp100MIT
htlin222/dotfiles100MIT
qainsights/perf-skills100MIT

Database snapshot: 13.11.2026 · package version da06eac3cdfb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 81about
    Explains what the haechi plugin is and what this build includes. Use when the user asks what haechi is or whether it is installed.
  • 90audit-experiment
    Audit a pre-registered measurement against raw evidence and re-aggregate its results. Use for delegated worker with /haechi:audit-experiment work without new measurements or adoption decisions.
  • 100trove-perf
    Diagnose and fix a measured performance problem against a baseline: measure first, fix, re-measure, and cite the delta with an artifact path. Use for slow endpoints, slow queries, or any \"make this faster\" backed by a measurement.
  • 100plan-perf-audit
    Plan-only performance audit across web, mobile, backend, and data; measures first, fixes nothing. Use when "performance audit plan", "perf burndown", "measure before optimize", or "N+1 audit plan". Apply fixes → audit-performance.
  • 100web-perf
    Diagnose and fix web performance through a disciplined measure-first loop. Forces evidence-based optimization: measure → identify bottleneck → fix ONE thing → re-measure → repeat. Prevents guessing. Use when pages load slowly, user mentions performance, LCP, INP, CLS,…
  • 100perf-audit
    Use when auditing performance — baseline, profile, identify top 3 bottlenecks, fix, remeasure

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.