Skip to main content
skill CX Codex

harness-spec-anatomy — Claude Code skill: hedera-harness recipe

Defines what a hedera-harness recipe is made of: the files, the v3 defaults, the run stages and the blind evaluate-checklist rule. For anyone authoring or auditing recipes.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hedera-dev/hedera-skills --skill harness-spec-anatomy -a claude-code
Open on GitHub

What harness-spec-anatomy does

The skill is the single source of truth for hedera-harness recipe terminology. It targets schemaVersion 3: older recipes hard-fail at load, and there is no migrate command, so you rewrite to v3 or regenerate with hedera-harness init and reapply your edits. The action skills /create-harness-spec and /review-harness-spec come here for vocabulary and keep the workflow themselves.

One layout: a .harness/ directory inside an app scaffolded by hedera-harness init or Scaffold HBAR. Only four things are required in a recipe — schemaVersion, name, description and a baseline block with an install command. Everything else (prd, validators.*, maxAttempts, agent, constraints, forbiddenFiles, secretScan, requiredFiles) is defaulted or detected. Unknown keys are ignored with a warning, so a typo degrades the run instead of crashing it; treat that warning as a finding.

Stages turn on in order, and the default is ASSERT only, which keeps the first run cheap. Then come SMOKE with Playwright, EVALUATE with the checklist, and CHAIN with real transactions. A script at scripts/check-spec.sh runs hedera-harness doctor --recipe-only and adds the cross-file coherence checks doctor skips. If the CLI is unavailable the script still runs its own checks and says so — that is a partial result, not a pass.

What it helps with

  • work out which files a hedera-harness recipe must carry
  • rewrite an older recipe for schemaVersion 3
  • check that routes agree across the checklist, Playwright and the PRD
  • find orphan assertions that match no PRD journey
  • run a mechanical check on a recipe before the generator does

Example prompts for the agent

  • walk me through what a v3 recipe must carry, per harness-spec-anatomy
  • check my .harness/spec.yaml for cross-file coherence
  • which stages are on by default, and how do I enable EVALUATE

How to install harness-spec-anatomy

1Skills CLI (Vercel)

npx skills add hedera-dev/hedera-skills --skill harness-spec-anatomy -a claude-code

2Manually: put the files in place

~/.claude/skills/harness-spec-anatomy/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/harness-spec-anatomy/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about harness-spec-anatomy

How do I install harness-spec-anatomy in Claude?

Run npx skills add hedera-dev/hedera-skills --skill harness-spec-anatomy -a claude-code. The skill lands at ~/.claude/skills/harness-spec-anatomy/SKILL.md.

What does harness-spec-anatomy do?

It supplies the shared vocabulary for hedera-harness recipes: the files, the v3 defaults, the run stages and the blind evaluate-checklist rule. The /create-harness-spec and /review-harness-spec skills reach into it.

What happens to an older recipe?

Recipes older than schemaVersion 3 hard-fail at load. There is no migrate command, so you rewrite to v3 or regenerate with hedera-harness init and reapply your edits.

Source text

SKILL.md · Apache-2.0
---
name: harness-spec-anatomy
description: Shared vocabulary for hedera-harness recipes — the files, the v3 defaults, the stages, and the blind/evaluate-checklist rule. Use when authoring or auditing a harness recipe, or when another skill needs the recipe vocabulary.
---

# Harness Spec Anatomy

Single source of truth for what a hedera-harness **recipe** is. Action skills
(`/create-harness-spec`, `/review-harness-spec`) reach here for vocabulary;
they own workflow. Use the bold terms from [GLOSSARY.md](GLOSSARY.md) exactly.

Targets **hedera-harness schemaVersion 3**. Older recipes hard-fail at load.
There is no `migrate` command — rewrite to v3, or regenerate with
`hedera-harness init` and reapply edits.

**These skills are for authoring — not for generator runs.** Recipes do not
list skills. Each run discovers product plugins from `hedera-skills`
(`native-services-js`, `system-contracts`, `cross-chain`, `dev-intelligence`)
and the generator picks what the PRD needs. Keep authoring skills out of that
set; they stay Cursor / Claude Code marketplace plugins.

## Layout

One layout: `.harness/` inside a scaffolded app (from `hedera-harness init` or
Scaffold HBAR). The workspace is the project itself. Paths in the **recipe
file** are relative to the project root.

| File | Required? | Default path | Consumed by |
|------|-----------|--------------|-------------|
| **Recipe file** | Yes | `.harness/spec.yaml` | Harness CLI |
| PRD | Yes | `.harness/prd.md` (or a `prd:` list) | Generator |
| Static validator | ASSERT | `.harness/validators/static.json` | Static validator |
| Command validator | ASSERT | `.harness/validators/yarn.json` | Command validator |
| Playwright smoke | SMOKE | `.harness/validators/playwright-smoke.yaml` | Playwright stage |
| **Evaluate checklist** | EVALUATE | `.harness/eval.json` (or an `eval:` list) | EVALUATE validator |

Every path above is a **default**. Omit the key and the harness uses it; name a
key only to point somewhere else. Artifacts always land in `.harness/runs/`,
which is not configurable.

Handoff: `yarn harness:run` or `hedera-harness run .harness/spec.yaml`.

## What the recipe file must carry

Only four things are required:

```yaml
schemaVersion: 3
name: my-feature
description: What you want the agent to build in this project.

baseline:
  commands:
    - name: install          # required, and used for install fingerprinting
      command: yarn install
    - name: build
      command: yarn next:build
```

Everything else — `prd`, `validators.*`, `maxAttempts`, `agent`, `constraints`,
`forbiddenFiles`, `secretScan`, `requiredFiles` — is defaulted or detected.
A v3 recipe that sets none of them is complete and correct. Compact bodies and
the full commented template: [references/spec-files.md](references/spec-files.md).

**`baseline` is not `validators.commands`.** Baseline proves the project was
healthy *before* generation; `validators.commands` grades it *after*. A command
named `install` is mandatory in baseline.

## Defaults worth knowing

| Key | Default |
|-----|---------|
| `agent` | `claude` — omit unless the user wants `cursor` |
| `prd` | `.harness/prd.md`; a **list** delivers ordered **increments** |
| `eval` | absent (EVALUATE off). Scalar grades every slice; list must be 1:1 with `prd:` |
| `maxAttempts` | `3` |
| `constraints.packageManager` | detected from `package.json` / lockfiles |
| `constraints.forbiddenCommands` | every package manager that is not the one in use |
| `forbiddenFiles` / `secretScan` | `.env` plus one per workspace |
| `requiredFiles` | empty — the validators are the gate |

Unknown keys are ignored with a warning, so a typo degrades rather than crashes.
Treat any such warning as a finding.

## Stages

Enable in order. Default is **ASSERT only**, so the first run stays cheap.

| Stage | Recipe file fields | What it checks |
|-------|--------------------|----------------|
| **ASSERT** | `validators.static`, `validators.commands`, `requiredFiles`, `forbiddenFiles`, `secretScan` | Files, JSON/text, secrets, install/lint/build |
| **SMOKE** | `validators.playwright` | Dev server boots; routes HTTP OK; console / forbidden text |
| **EVALUATE** | `eval` + `validator.enabled: true` | Agent grades numbered assertions in the **evaluate checklist** |
| **CHAIN** | `chainValidation` (+ EVALUATE) | Ephemeral ECDSA test signer; real txs; mirror verify |

Full enable order, host prerequisites, and YAML blocks:
[references/stage-strategy.md](references/stage-strategy.md).

## Cross-file coherence

The v3 defaults removed most path-level coupling. What still must agree:

| Keep in sync | Why |
|--------------|-----|
| **Evaluate checklist** `routes` ↔ Playwright `routes` ↔ PRD deliverable routes | The validator visits what the PRD promised |
| Every PRD journey ↔ ≥ 1 assertion in the matching checklist | Unverified journeys pass silently |
| Every assertion ↔ a PRD journey | Orphan assertions are scope creep |
| `prd:` list ↔ `eval:` list (when both are lists) | Must be 1:1; only the active pair is vendored per increment |
| `forbiddenFiles` ↔ static `fileAssertions.forbidden` | Two gates, one intent |
| `constraints.packageManager` ↔ static assertion on `package.json` | Only if you override the detected value |
| `eval` ↔ `validator.enabled: true` | Either alone is a misconfigured recipe |
| Assertion `executableWithTestSigner` ↔ `chainValidation.enabled` | Flagged assertions are inert without CHAIN |

`templateMetadata.name` is the host template identity and may differ from the
feature **slug** in `name`. That is not a finding.

## Blind / evaluate-checklist rule

Keep the run **blind**. The PRD carries journeys and outcomes; numbered
assertions live in the **evaluate checklist**. See [GLOSSARY.md](GLOSSARY.md)
and [references/prd-and-journeys.md](references/prd-and-journeys.md).

## Drift-sensitive loader fields

When the harness renames these, update this skill and its evals in the same
change set:

`schemaVersion`, `agent`, `baseline`, `prd`, `eval`, `validators.static`,
`validators.commands`, `validators.playwright`, `validator`,
`chainValidation`, `constraints`, `templateMetadata`, `requiredFiles`,
`forbiddenFiles`, `secretScan`, `executableWithTestSigner`, `maxAttempts`.

Removed — presence hard-fails at load: `contract`, `extend`, `logging`,
`skills`, `seed`, `generator`.

## Mechanical check

```bash
bash <path-to>/harness-spec-anatomy/scripts/check-spec.sh <project-root>
```

Resolve the script path relative to the installed skill. It runs
`hedera-harness doctor --recipe-only` for schema and loader validity, then adds
the cross-file coherence checks doctor does not perform. Exit zero means the
wiring is clean; non-zero prints one finding per line.

If the harness CLI is unavailable the script still runs its coherence checks and
says so — treat that as a partial result, not a pass.

## Additional resources

- [GLOSSARY.md](GLOSSARY.md)
- [references/spec-files.md](references/spec-files.md)
- [references/prd-and-journeys.md](references/prd-and-journeys.md)
- [references/eval-checklist-guide.md](references/eval-checklist-guide.md)
- [references/stage-strategy.md](references/stage-strategy.md)
- [scripts/check-spec.sh](scripts/check-spec.sh)
- 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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set13

Quality Gates This skill wires up automatic code checks: lint and typecheck after every edit, a local CI run before push, and a five-stage deploy checklist. CX Codex +1 536installs Hedera Agent Kit v4 Migration Walks a project from [email protected] to v4: swaps packages, rewrites imports and ports custom tools to BaseTool. CX Codex +1 484installs agent-kit-plugin This skill guides the creation of Hedera Agent Kit plugins and tools. Use it when adding token, account, consensus, smart contract, or custom Hedera functionality. CX Codex +1 463installs create-harness-spec 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. CX Codex +1 465installs x402-payments An agent skill for gating HTTP resources behind HBAR payments with x402: a 402 challenge, a signed transfer, then verify and settle through your own facilitator. CX Codex +1 462installs layerzero-messaging A skill for building LayerZero V2 bridges between Hedera and EVM chains: OFT/OApp setup, Endpoint V2 wiring, ULN, DVN and sends via quoteSend. CX Codex +1 460installs pyth-price-feeds A skill for wiring Pyth pull price feeds into Hedera contracts: Hermes payload updates, max-age reads, and confidence checks. CX Codex +1 444installs supra-push-oracle A skill for reading the Supra push oracle on Hedera: getSvalue(pairId), millisecond timestamps and USDT pairs. Useful when a contract pulls prices from Supra. CX Codex +1 448installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor