Skip to main content
ClaudeWave
Skill119 repo starsupdated today

upgrade-harness

The upgrade-harness skill detects and applies changes from an updated generator template to an existing scaffolded harness. It compares the current harness against a fresh template render using original variables, identifies added, removed, and changed files, classifies changes as clean or conflicting, and optionally applies updates with Git-style conflict markers or rejection files. Use this when the generator version has evolved and you need to sync a harness forward while preserving local edits.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/ruvnet/agent-harness-generator /tmp/upgrade-harness && cp -r /tmp/upgrade-harness/.claude-plugin/skills/upgrade-harness ~/.claude/skills/upgrade-harness
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# upgrade-harness

> Codex skill: drift detection + apply for a scaffolded harness.

## What it does

Re-renders the template that produced the harness against the current generator version, using the same `vars` the original scaffold used. Computes a 3-bucket plan:

| Bucket | Meaning |
|---|---|
| **added** | upstream template now has files the harness doesn't |
| **removed** | upstream template no longer has files the harness does |
| **changed** | upstream and harness differ; sub-classified `clean` vs `conflict` |

A **clean** change means the harness's version equals the original generation — apply safely. A **conflict** means the user edited the file post-scaffold; the apply step writes either Git-style inline markers or a `.rej` sidecar for manual merge.

## Usage from Codex

```
/upgrade-harness                                       # dry-run on cwd
/upgrade-harness path=./my-harness
/upgrade-harness path=./my-harness apply=true
/upgrade-harness path=./my-harness apply=true conflict=rej
```

## Equivalent CLI

```bash
harness upgrade ./my-harness                           # dry-run
harness upgrade ./my-harness --apply                   # apply, inline conflicts
harness upgrade ./my-harness --apply --conflict=rej    # apply, .rej sidecars
```

## Lifecycle position

```
scaffold (create-agent-harness)
    ↓
 edit (you)
    ↓
 upgrade (this skill)   <- catches up to the latest template
    ↓
 sign / verify / publish
```

## Exit codes

| Code | Meaning |
|---|---|
| 0 | No drift OR clean apply (no conflicts) |
| 1 | Unresolved conflicts after apply, OR not a generated harness, OR template missing |
| 2 | Bad `--conflict=` value |

CI workflows can gate on exit 1 to flag unresolved conflicts.
compare-harnessesSkill

Diff two scaffolded harnesses (ADR-031). Reports manifest meta drift + host list + per-file fingerprint changes (added/removed/changed). Exits 0 IDENTICAL, 1 DRIFT, 2 missing manifest. Use --bundle for the ADR-031 schema-1 JSON envelope.

create-harnessSkill

Scaffold your own focused AI agent harness — pick host (Claude Code, Codex, pi.dev, Hermes), template, agents, skills, and ship a npm-publishable harness with its own npx CLI. Use when a user asks to "create my own agent harness", "scaffold a harness", "make a custom Claude Code plugin like ruflo", or "build a vertical AI assistant for X".

diag-harnessSkill

Kernel-version skew check (ADR-027). Reports manifest surface + manifest kernel + installed kernel + verdict (match/patch-diff/minor-diff/major-diff). Exits 1 on minor/major skew with a copy-pasteable `npm install @metaharness/kernel@X.Y.Z` next step. Exits 2 if no .harness/manifest.json at path.

example-harnessSkill

Scaffold a ready-made AI agent harness in one command from the 19 published @metaharness/* example packages — 9 host integrations (Claude Code, Codex, Hermes, pi.dev, OpenClaw, RVM, Copilot, OpenCode, GitHub Actions) + 10 vertical pods (devops, research, trading, support, legal, coding, education, sales, gaming, repo-maintainer).

harness-secretsSkill

GCP Secret Manager integration: validate setup, fetch values, or confirm an NPM_TOKEN is non-revoked via `npm whoami`. Used for publish-time token rotation without long-lived keys in CI.

list-templatesSkill

List the available harness templates and what each one ships with. Use when the user asks "what templates are available", "what verticals does the harness generator support", or "show me what I can scaffold".

oia-manifestSkill

Emit .harness/oia-manifest.json declaring layer alignment with the OIA v0.1 9-layer reference architecture. Self-describes the harness's MCP wiring, witness signing, audit log, identity posture (always 'none' at v0.1). --check verifies an existing manifest, --dry-run prints without writing, --json emits to stdout.

publish-harnessSkill

Publish a generated harness to npm — runs the smoke test, signs the witness manifest, and dispatches `npm publish --provenance` from your tagged release.