一键导入
harness-setup
Initializes and configures Harness in a project — CI, memory, duo workflow, Codex. Use when setting up a new project or adding Harness configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initializes and configures Harness in a project — CI, memory, duo workflow, Codex. Use when setting up a new project or adding Harness configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrates the full powerball-harness plugin release with build, validation, version bump, CHANGELOG, tag, and GitHub Release. Use when releasing this plugin.
Generates product demo videos and release walkthroughs via Remotion. Use when creating video documentation or animated demos.
Plans and tracks tasks in .claude/harness/plans.json. Use when creating plans, adding tasks, updating markers, checking progress, or brainstorming an idea into tasks.
Executes plans.json tasks — solo, parallel, or breezing team mode. Use when implementing tasks or running the work loop.
Periodic housekeeping and session lifecycle management. Use when performing cleanup, pruning, or session commands.
Use when running the full team/breezing flow end-to-end — all tasks with parallel workers. Do NOT load for: single-task implementation, planning, review, release, or setup.
| name | harness-setup |
| description | Initializes and configures Harness in a project — CI, memory, duo workflow, Codex. Use when setting up a new project or adding Harness configuration. |
| when_to_use | initialize project, setup harness, configure CI, setup memory, duo workflow, gitignore |
| allowed-tools | ["Read","Write","Edit","Grep","Glob","Bash"] |
| argument-hint | [init|codex|opencode|duo|cleanup|gitignore] |
| effort | medium |
| model | sonnet |
| User Input | Subcommand | Behavior |
|---|---|---|
harness-setup (no args) | init | Runs gitignore → project initialization (CLAUDE.md + plans.json + settings.json) |
harness-setup init | init | New project initialization: gitignore → CLAUDE.md + plans.json + settings.json |
harness-setup gitignore | gitignore | Merge harness-managed block into .gitignore (runs scripts/merge-gitignore.sh) |
harness-setup cleanup | cleanup | Periodic maintenance: delete old logs, archive completed phases (harness plan-cli archive), trim traces |
harness-setup codex | codex | Set up Codex CLI: copy config, rules, and skills to project .codex/ |
harness-setup opencode | opencode | Set up OpenCode: copy config, commands, and skills to project .opencode/ |
harness-setup duo | duo | Set up both Codex and OpenCode in one step |
Introduce Harness to a new project.
Generated files (user's project):
project/
├── CLAUDE.md # Project configuration
├── .gitignore # Standard ignore rules (harness-managed block appended)
└── .claude/
├── settings.json # Claude Code permissions/sandbox/env
├── harness/plans.json # Task tracking (auto-created by harness plan-cli)
├── memory/ # Trace archive + schemas (archive/, schemas/)
├── output-styles/ # Custom output styles (if any)
├── rules/ # Custom rules (if any)
├── scripts/ # Custom scripts (if any)
└── skills/ # Custom skills (if any)
└── settings.local.json # Local custom settings (gitignored) for user overrides
Note: Neither
hooks/norharness.tomlis generated into a user's project.
- Hooks ship inside the installed plugin (
.claude-plugin/hooks.json) — Claude Code loads them from there automatically.harness.toml+harness syncis a plugin-author workflow for regenerating.claude-plugin/*files from a single TOML SSOT. User projects have no.claude-plugin/to regenerate, so the TOML would be an orphaned file. Users who want unified TOML authoring for their own.claude/settings.jsoncan opt in later via a dedicated subcommand (future work).
Flow:
gitignore subcommand (idempotent — calls scripts/merge-gitignore.sh).claude/harness/ directory (plans.json is auto-created on first harness plan-cli add-phase call).claude/settings.json (permissions/sandbox/env — safe defaults)Merges the harness-managed block into the project's .gitignore. Safe to run multiple times — skips if the marker is already present.
Implementation: scripts/merge-gitignore.sh
bash "${CLAUDE_SKILL_DIR}/scripts/merge-gitignore.sh"
# Or with an explicit target path:
bash "${CLAUDE_SKILL_DIR}/scripts/merge-gitignore.sh path/to/.gitignore"
The block ignores .claude/sessions/, logs/, settings.local.json, and states/,
while force-tracking .claude/memory/, .claude/output-styles/, .claude/rules/,
.claude/scripts/, .claude/skills/, and .claude/settings.json.
Sets up the project for Codex CLI by copying Harness config templates and skills. See Codex CLI Setup Reference for full file layout and troubleshooting.
Prerequisites: Codex CLI installed (npm install -g @openai/codex)
What it does:
codex is installed; prints install instructions if nottemplates/codex/* → .codex/ (config.toml, rules/harness.rules, .codexignore)AGENTS.md to the project rootskills/ → .codex/skills/ with disable-model-invocation: true patched into each SKILL.md frontmattertemplates/codex-skills/ → .codex/skills/ (codex-native variants of breezing and harness-work override the generic copies)bash "${CLAUDE_SKILL_DIR}/scripts/setup-codex.sh"
Note: Excluded from the no-args
initrun — requires an external@openai/codexinstall that should be explicit opt-in.
Sets up the project for OpenCode by copying Harness config templates, commands, and skills.
Prerequisites: OpenCode installed (see https://opencode.ai/)
What it does:
opencode is installed; prints install instructions if nottemplates/opencode/opencode.json → .opencode/opencode.jsontemplates/opencode/commands/ → .opencode/commands/AGENTS.md to the project rootskills/ → .opencode/skills/ as-is (opencode ignores unknown frontmatter fields)bash "${CLAUDE_SKILL_DIR}/scripts/setup-opencode.sh"
Note: Excluded from the no-args
initrun — requires OpenCode to be installed explicitly.
Runs both codex and opencode setup subcommands in sequence.
bash "${CLAUDE_SKILL_DIR}/scripts/setup-codex.sh"
bash "${CLAUDE_SKILL_DIR}/scripts/setup-opencode.sh"
Periodic maintenance tasks:
| Task | Command |
|---|---|
| Delete old logs | find .claude/logs -mtime +30 -delete |
| Archive completed phases | harness plan-cli archive |
| Delete old traces | tail -1000 .claude/state/agent-trace.jsonl > /tmp/trace && mv /tmp/trace .claude/state/agent-trace.jsonl |
harness-plan — Create project plans after setupharness-work — Execute tasks after setupharness-review — Review setup configuration