Логотип Harness First

Harness First

Спільнота
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.

Огляд

Видавецьpeterpme
Репозиторійskills
Назва навичкиharness-first
Зірки
28
Форки
0
Файли в пакеті
Лише інструкції
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем peterpme. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Harness First у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/peterpme/skills/tree/main/harness-first
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Harness First в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Harness First, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Harness First не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

Поширені запитання

Що робить навичка ШІ 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.

Навіщо використовувати Harness First у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Harness First — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Harness First у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/peterpme/skills/tree/main/harness-first. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Harness First?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Harness First?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Harness First — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Harness First?

Навичку опубліковано на GitHub: peterpme. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇