create-harness-spec — Claude Code skill: author hedera-harness recipes
Turns a Hedera feature idea into a runnable hedera-harness recipe: PRD, spec file and validators. Useful when you need a spec you can actually run.
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a claude-codeWhat create-harness-spec does
The skill walks through authoring in order. It locates the .harness/ folder inside a scaffolded app, grills you about the idea, then writes .harness/prd.md, .harness/spec.yaml and the validators static.json and yarn.json. The target is schemaVersion: 3.
Before anything else it loads the shared vocabulary from ../harness-spec-anatomy/SKILL.md and GLOSSARY.md so the terms line up. If the /grilling skill is installed it uses that; otherwise it falls back to an inline protocol, which is the usual path in Claude. No files get written until you confirm you and the agent mean the same thing.
One hard limit: recipes at version 1 or 2 are not treated as loadable. If .harness/spec.yaml carries schemaVersion 1 or 2, you rewrite it for v3 — hedera-harness migrate is gone. You are done when check-spec.sh exits clean; it runs doctor itself, so a separate pass only matters when the CLI is missing.
What it helps with
- turn a Hedera feature idea into a runnable spec
- build a PRD and spec.yaml against schema v3
- write validators for the feature deliverables
- port an old v1 or v2 recipe to schemaVersion 3
- check recipe coherence across files before a run
Example prompts for the agent
- Create a hedera-harness recipe for an HBAR payment feature
- Grill my idea and write
.harness/spec.yaml - Rewrite my
.harness/spec.yamlfrom schemaVersion 2 to v3
How to install create-harness-spec
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a claude-code2Manually: put the files in place
~/.claude/skills/create-harness-spec/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/create-harness-spec/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a codex2Manually: put the files in place
.agents/skills/create-harness-spec/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a cursor2Manually: put the files in place
.cursor/skills/create-harness-spec/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install hedera-dev/hedera-skills create-harness-spec2Manually: put the files in place
.github/skills/create-harness-spec/SKILL.md1Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a gemini-cli2Platform CLI
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/hedera-harness/skills/create-harness-specManually: put the files in place
.devin/skills/create-harness-spec/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about create-harness-spec
How do I install create-harness-spec in Claude?
Run npx skills add hedera-dev/hedera-skills --skill create-harness-spec -a claude-code. The skill lands at ~/.claude/skills/create-harness-spec/SKILL.md.
What does create-harness-spec do?
It grills a Hedera feature idea and turns it into a hedera-harness recipe: a PRD, the spec file and validators. It can also add SMOKE, EVALUATE and CHAIN stages if you opt in.
Which schema version does it target?
Only schemaVersion: 3. Recipes at version 1 or 2 will not load, and hedera-harness migrate no longer exists — you rewrite the file or regenerate it with init.
Source text
SKILL.md · Apache-2.0
--- name: create-harness-spec description: Create a hedera-harness recipe — PRD, recipe file, validators, and optional stages — by grilling an idea into a runnable feature spec. Use when the user wants to turn a Hedera feature idea into harness inputs. --- # Create Harness Spec Grill a Hedera feature idea into a complete **recipe** for [hedera-harness](https://github.com/hedera-dev/hedera-harness). Load the shared vocabulary first: read [`../harness-spec-anatomy/SKILL.md`](../harness-spec-anatomy/SKILL.md) and its [GLOSSARY.md](../harness-spec-anatomy/GLOSSARY.md). Use those terms exactly. Targets **hedera-harness schemaVersion 3**. These skills are for authoring. Recipes do not list skills — product plugins from `hedera-skills` are discovered per run and the generator picks. Keep the run **blind**: the PRD carries journeys and outcomes; numbered assertions live in the **evaluate checklist**. Works in **Claude Code** (marketplace plugin) and Cursor / other agents that load SKILL.md. Prefer `/grilling` when that skill is installed; otherwise use the inline protocol — Claude Code typically takes the inline path. ## Step 1: Locate the target A recipe lives at `.harness/` inside a scaffolded app. There is no other layout. | Situation | What to do | |-----------|------------| | Cwd is a scaffolded app (Scaffold HBAR or `hedera-harness init`) | Author into its `.harness/` | | Cwd is an app without `.harness/` | `hedera-harness init` adopts the harness in place | | No app yet | `hedera-harness init <dir>` (optionally `--template <name>`) | | Cwd already has `.harness/spec.yaml` | Check `schemaVersion`. If absent, `1`, or `2`, rewrite to v3 (or regenerate with `init` and reapply edits). `hedera-harness migrate` is gone. | Never treat a v1/v2 recipe as loadable. `contract:` → `eval:`, drop `skills:`, set `schemaVersion: 3`. Paths in the **recipe file** are relative to the project root. ## Step 2: Grill Follow [references/grilling.md](references/grilling.md). Prefer `/grilling` if available; otherwise use the inline protocol there. Do **not** write files until the user confirms shared understanding. ## Step 3: Emit the recipe Prefer copying the shipped skeleton — it is always current: ```bash cp -r "$(npm root -g)/hedera-harness/skeletons/project-harness/." .harness/ ``` Then: 1. Write `.harness/prd.md` (or one file per **increment** under `.harness/prds/`) from the grill. Product-facing only — keep the run **blind**. 2. Fill `.harness/spec.yaml`. Required: `schemaVersion: 3`, `name`, `description`, and `baseline` with a command literally named `install`. **Leave every default commented out.** A four-key recipe is complete. Omit `agent:` unless the user wants Cursor (default is Claude). 3. Write `.harness/validators/static.json` and `.harness/validators/yarn.json` against the feature deliverables. Do not assert on `template.json` — create-scaffold-hbar removes it when scaffolding. 4. Do **not** add a `skills:` list. Mention relevant Hedera services in the PRD so the generator can pick product skills. 5. Add SMOKE / EVALUATE / CHAIN only if the user opted in during the grill — see `harness-spec-anatomy` → [references/stage-strategy.md](../harness-spec-anatomy/references/stage-strategy.md). If `prd:` is a list and EVALUATE is on, write a matching `eval:` list. 6. Install the SMOKE host package if you just enabled it — at the **project root**, not only inside a workspace. Doctor imports `playwright` from next to `hedera-harness`, and Yarn `nmHoistingLimits: workspaces` hides `packages/nextjs` installs. - SMOKE → `yarn add -D playwright` (or npm/pnpm equivalent) Skip the add if the root `package.json` already lists it. Do this as part of emit, not as a follow-up after `doctor` fails. CHAIN does **not** need a project install: `@hiero-ledger/sdk` ships with `hedera-harness`. Only the operator env vars are host-provided. Reconstruct bodies by hand only when the skeleton is unavailable: `harness-spec-anatomy` → [references/spec-files.md](../harness-spec-anatomy/references/spec-files.md). ## Step 4: Completion criterion Two checks, in order: ```bash # 1. Does the recipe load? (authoritative — schema, defaults, baseline, network) hedera-harness doctor .harness/spec.yaml --recipe-only # 2. Is it coherent across files? (traceability, stage pairing, blind rule) bash <path-to>/harness-spec-anatomy/scripts/check-spec.sh <project-root> ``` `check-spec.sh` runs `doctor` itself, so running it alone is enough when the harness CLI is installed. If it reports that the schema was **not** validated, that is a partial result — install or upgrade the harness and rerun. **Done when `check-spec.sh` exits clean.** Then hand off: ```bash # Prefer /review-harness-spec next, then: hedera-harness run .harness/spec.yaml --max-attempts 3 # or: yarn harness:run ``` Point at the harness README for install, agent auth, and stage host prerequisites. `hedera-harness doctor` (without `--recipe-only`) checks those. Do not expand CLI teaching beyond these next commands. ## Additional resources - [references/grilling.md](references/grilling.md) - Companion: `/review-harness-spec` - Vocabulary: `/harness-spec-anatomy` - Upstream: [docs/authoring-a-recipe.md](https://github.com/hedera-dev/hedera-harness/blob/dev/docs/authoring-a-recipe.md)
© hedera-dev · Apache-2.0 · hedera-dev/hedera-skills