create-harness
GitHub用于快速搭建可发布的AI Agent Harness,支持Claude Code、Codex等多宿主。通过交互式配置选择模板、内存后端及路由策略,自动生成包含CLI、MCP注册及市场标识的npm包结构,并提供升级与签名证明功能。
触发场景
安装
npx skills add ruvnet/metaharness --skill create-harness -g -y
SKILL.md
Frontmatter
{
"name": "create-harness",
"description": "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\"."
}
create-harness
This skill scaffolds an AI agent harness — your own focused, branded harness with its own npx <name> CLI, MCP server registration, memory namespace, learning loop, and marketplace identity.
When to use this skill
Use this skill when the user wants any of:
- A custom MCP-server-backed AI assistant (legal, trading, support, ops, …)
- A Claude Code plugin that bundles their own agents/skills/prompts
- A Codex skill that wraps a kernel + tools
- A pi.dev extension or Hermes agent runtime config
- A standalone npm package they can
npm publishunder their own scope
How to invoke
/create-harness
The skill asks for:
- Harness name (kebab-case, e.g.
legal-redline) - Description (one line)
- Host(s) — Claude Code, Codex, pi.dev, Hermes (multi-select)
- Template —
minimal(default),vertical:trading,vertical:support,vertical:devops,vertical:legal,vertical:research, oreject-from-ruflo - Memory backend — AgentDB (default), SQLite-only, in-memory
- Routing strategy — 3-tier (default) or single-tier
- Marketplace — independent (no ruflo branding) or powered-by
Under the hood
Calls npx create-agent-harness <name> with the user's choices, copies the chosen template into the current directory, runs the post-generation smoke test, and emits a .harness/manifest.json so future updates can harness upgrade cleanly (copier-style regenerate-diff-merge).
Outputs
| File | Purpose |
|---|---|
package.json |
The harness's npm package, ready to npm publish |
bin/<name>.js |
The CLI binary your users invoke |
.claude/settings.json (if Claude Code host) |
MCP + hooks wiring |
.codex/config.toml (if Codex host) |
MCP table in TOML |
AGENTS.md + SYSTEM.md (if pi.dev host) |
Pi extension instructions |
cli-config.yaml (if Hermes host) |
Hermes runtime config |
.harness/manifest.json |
Generator state — drives drift detection (ADR-008) |
witness.json |
Ed25519-signed provenance manifest (ADR-011) |
After scaffolding
The user can:
cd <name>
npm install
npm test
npm publish # ship their harness to npm
# their users: npx <name> init
Notes for the model
- This is a deterministic operation — defer to
create-agent-harnessfor the actual file creation, do NOT generate harness file contents yourself - The witness manifest is required — do not skip it
- If the user asks for "ruflo for X" or "my own ruflo", recommend
vertical:<X>templates first and offerminimalas the fallback - Multi-host is supported but increases the harness's surface area — recommend single-host for first-time users unless they explicitly need multi-host
版本历史
- 6e1902b 当前 2026-07-05 11:03


