Index of every page on this site: llms.txt
All skills
qoderai avatar

/generate-harness-dsl

@c6240a8
by qoderaiqoderai/better-harness2.5k stars
208
Run it yourself

Generate, revise, or review complete Harness as Code `.harness` files when a coding-agent workflow, agent role, skill, tool contract, MCP connection, runtime, or deployment must be compiler-valid and resolvable with `@qoder-ai/harness`.

Use this Skill: https://skilld.dev/gh/qoderai/better-harness/generate-harness-dsl

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈65 tokens for metadata: the name and description. ≈689 when used: this file. ≈1.2k more on demand in 2 files.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈259 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Generate Harness DSL

Create a standalone Harness as Code v0.3 document and prove the execution contract with the package compiler and resolver.

Workflow

  1. Identify the host, the capabilities it must actually expose, and the real control owner. Use session for one host session. Use state-machine or program only when a selected adapter explicitly implements that mode.
  2. Read the DSL contract. Start from the minimal example; open the standard example when callable tools are required.
  3. Generate one self-contained document unless the user requests a fragment. Include language 0.3, every referenced declaration, a concrete runtime, and a named deployment. Standard tools may remain implicit.
  4. Run scripts/validate.mjs. Fix every compiler or resolution error and rerun. A compile-only state machine is not an executable Qoder or Pi deployment.
  5. Return the DSL or saved file plus the harness id, deployment id, runtime, resolution status, and any execution boundary the selected adapter cannot satisfy.

Authoring Rules

  • State only falsifiable requirements. Do not add permission, setting, degradation, binding, input/output-name, or runtime-execution syntax; v0.3 intentionally has none.
  • Match the requirement verb to its capability: use skill, require tool, or connect mcp.
  • Only the standard tool ids in the contract may be undeclared. Every custom tool declares a stable contract id that the adapter exposure must match.
  • Qoder and Pi descriptors run session workflows only. A session workflow names exactly the one agent role declared by each harness that uses it.
  • State-machine outcomes are typed on agents. Every route emitter, outcome, destination, entry, and stop must exist, and every agent must be reachable.
  • A program <language> <entry> workflow resolves only when the adapter lists the same language in programmaticLanguages.
  • Keep credentials out of source. Prefer env.VARIABLE for MCP endpoints, but remember that declaring an endpoint does not connect it; the adapter must do that.
  • Do not invoke host SDKs, install integrations, or claim native enforcement while generating or validating DSL.

Validate

From this skill directory, run:

node scripts/validate.mjs /path/to/workflow.harness [harness-id ...]

The command prints JSON and exits non-zero when compilation or any selected named deployment fails resolution. A successful exit is required before calling generated DSL executable.

When editing this skill, build the package first so dist/ reflects the current compiler:

npm run harness:build

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts26d3 checks · Risk SAFE
  • Gen Agent Trust Hub26d

    The skill is a developer tool for generating and validating 'Harness as Code' DSL files. It includes a validation script that performs local file reading and dynamic code loading of its own build artifacts. These behaviors are typical for CLI-based development tools but represent a standard attack surface for indirect prompt injection and file access.

  • Socket26d

    No alerts

  • Snyk26d

    Risk: LOW · No issues

Signed by skilld at c6240a8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 3 months ago

README badge

README badge for qoderai/better-harness/generate-harness-dsl