Harness First logo

Harness First

Community
peterpme
harness-first

Use when a change is meant to move a number: faster, smaller, smoother, cheaper or less flaky (startup, jank, frame drops, bundle size, memory, CI time, API cost, eval scores, any hill climb), or when Peter asks how you know it is faster. Measure a baseline first, then report the change against it. Not for a bug with a repro.

Overview

Publisherpeterpme
Repositoryskills
Skill nameharness-first
Stars
28
Forks
0
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by peterpme on GitHub. Read the source before you install it.

Installation

Install the Harness First AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/peterpme/skills/tree/main/harness-first
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterpme/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/harness-first .claude/skills/harness-first
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Harness First in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Harness First on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Harness First is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Harness first

A number nobody measured before the change is a guess, and a guess in a PR body is a claim nobody can check. Peter's rule: no change meant to improve a number lands without a committed baseline from a harness in the repo.

1. Name the number

Before reading code for fixes, write down: the metric and its unit (late frames per scenario, cold start ms, bundle bytes, p95 latency, flaky failures per 100 runs), which direction is better, the environment users run (physical device model, release build, production bundler, real data), and Peter's target if he gave one. This goes in the contract's acceptance checks as "baseline X on base SHA, after Y on head SHA, same harness, same environment".

2. Find the harness before writing one

Search, and record what you found and why it fits or not:

  • scripts/, tools/, bench*, perf*, profil*, verify*, package and task-runner scripts, CI workflows.
  • The repo's agents file and docs, and the skills installed for the stack (profilers, e2e recorders).
  • Earlier PRs: gh pr list --search "perf OR benchmark OR baseline" --state all. A PR with a before-and-after table names its harness.

Use an existing harness when it measures the named number in the environment users run. Extend it before replacing it.

3. No harness: building it is the first PR

The harness PR holds no optimization, so it is reviewable on its own and a later PR cannot quietly change how it measures. It contains:

  • one command that runs it, documented in its README and the repo's agents file;
  • the shipped runtime: a release build on a real device for app performance, the production bundle for size, the deployed stack or a copy of it for latency. A cheaper proxy only after you show it moves with the real number;
  • warm-up, at least five runs, median and spread, machine-readable output, and a way to run two builds or refs back to back (A/B);
  • the baseline: a file next to the harness, baselines/<YYYY-MM-DD>-<metric>.md, with the base SHA, environment, run count, median and spread per scenario.

If the spread is larger than the effect you expect, fix the noise (more runs, pinned device state, fixed data) before any optimization.

When a harness exists but no committed baseline does, or it was taken on older code or another environment, run it on the base and commit the baseline the same way.

The baseline, with the harness if it is new, is its own PR, opened before any optimization work and never a commit inside the optimization PR. It is the one exception to starting a build as one draft PR: it holds no behavior change, so it can merge while the optimization is still being built, and the optimization PR stacks on it.

4. Every change: the same harness, the same environment, the delta

Each optimization PR body carries a table: scenario, baseline (base SHA), after (head SHA), delta, runs, spread. A delta inside the spread is "no change", not a win. Run both orders when the device can drift (A then B, B then A). Never change the harness and the code in one PR: a harness change needs a new baseline first.

On a hill climb, keep a log of each attempt with its delta and whether you kept or reverted it. Keep a change only when its delta beats the spread. Revert the rest.

5. Blast radius: one real run per flow

The number shows the target got better, not that nothing else broke. Before changing code, write the flow list into the contract: every user flow that passes through the files you will touch (find them from the callers and screens that import them), each with its steps and the expected result. After the change, run each one end to end on the same build you measured, one row per flow in the proof table. A visual spot check of the target screen is not a flow run. A flow you could not run is its own row marked unverified.

For a change to an API or shared code, add a caller check to the number: list the callers, state what each depends on, and make one real call per caller before and after.

Never

  • Quote a number from another environment (a dev build, a simulator, a different device) as the result.
  • Tune the harness, scenarios or run count after seeing the new numbers.
  • Drop a scenario or a run because it went the wrong way. Report regressions in the same table.

Frequently asked questions

What does the Harness First AI skill do?

Use when a change is meant to move a number: faster, smaller, smoother, cheaper or less flaky (startup, jank, frame drops, bundle size, memory, CI time, API cost, eval scores, any hill climb), or when Peter asks how you know it is faster. Measure a baseline first, then report the change against it. Not for a bug with a repro.

Why use Harness First on TypingMind?

Because you install it once and use it with any model. Harness First is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Harness First in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/peterpme/skills/tree/main/harness-first. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Harness First?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Harness First?

As many as you like. As long as a model supports skills, you can use Harness First with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Harness First AI skill free?

It is published on GitHub by peterpme. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇