Harness prompting
Skill danielskiftesvik/agent-collaboration/skills/harness-prompting
How to compose an effective brief for a cross-harness worker or reviewer. Use when delegating a task to codex, agy (Antigravity/Gemini), claude, cursor, grok (Grok Build), opencode, or dsh (DeepSeek Harness) and you want reliable, well-shaped output.From its SKILL.md
npx -y skills add danielskiftesvik/agent-collaboration --skill harness-promptingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.6 KB, as published. Nobody here has run it
Harness Prompting
A delegated worker only sees the brief you send. The biggest quality lever is a tight prompt contract — state the task, the exact end state, the follow-through default, and the few constraints that matter. Prefer a better contract over telling the model to "think harder."
Two paths (mirrors how the runtime works)
- Review-grade work (
/agent-collab:review,/agent-collab:adversarial-review): the companion already supplies a full code-loaded template (prompts/<kind>.md:<attack_surface>,<grounding_rules>, …) and fills{{OUTPUT_CONTRACT}}with the target harness's output contract. You only supply the diff/context (the brief →{{REVIEW_INPUT}}) and optionally--focus. - Free-form work (
/agent-collab:delegate): YOU compose the brief. Use the reusable blocks and the per-harness recipe below.
Compose a free-form brief
Pick the smallest set of blocks that fits (full catalog: references/prompt-blocks.md):
- Worker / fix:
task,action_safety,completeness_contract,verification_loop. - Diagnosis / research:
task,research_mode,missing_context_gating,citation_rules.
The companion appends the harness's output contract automatically — don't hand-write it.
Long write-worker runs: two clauses that belong in every brief
An implementer executing a plan runs for a long time and can be killed mid-flight (hard timeout, idle guard, a breach tripped by another agent). Two clauses make that survivable — put them in the brief, not in your hopes:
1. "Commit early and often." State it explicitly, with the granularity you want (e.g. after every task, and before any long build). A kill leaves uncommitted work at the mercy of whichever tree it landed in; a commit is the only artifact that reliably survives — inspectable, attributable, and independent of the runtime's own record. A run killed after three commits lost nothing; the same run with everything uncommitted looks like it produced nothing at all.
2. Tell it what "slow" looks like on this machine. If builds serialize through a shared lock, or other agents contend for the same resources, say so — otherwise a worker waiting 10 minutes for a build slot may conclude it is stuck and start improvising or bailing. Naming the expected wait converts a scary silence into an expected one.
Size --timeout to the work as well; see companion-runtime § Timeouts. The default is
role-aware (reviewer 20 min / worker 4 h) and is a backstop — the driver supervising the
run is what should actually catch problems.
Pick the harness, then read its guide
| Harness | Best for | Guide |
|---|---|---|
| codex | reviewer / analyst; reliable deep review, quiet on long runs | references/codex.md |
| claude | reviewer and worker; native Agent tool when same-harness | references/claude.md |
| cursor | reviewer and worker; Composer agent loops; native Task tool when same-harness | references/cursor.md |
| agy (Gemini) | reviewer and worker; pinned to latest Gemini Flash for speed (AGENT_COLLAB_AGY_CLASS=Pro for stronger reasoning) | references/agy.md |
| grok (Grok Build / xAI) | reviewer and worker — Grok Build CLI (grok) with grok-4.5. Always explicit (never auto-recommended) | references/grok.md |
| dsh (DeepSeek Harness) | reviewer and worker — dsh CLI, headless --profile headless. Always explicit (never auto-recommended) | references/dsh.md |
| opencode (multi-provider) | reviewer and worker — any model behind the opencode CLI. Always explicit (never auto-recommended). Write safety via worktree isolation + breach detection | references/opencode.md |
| qwen (local) | local-only sensitive review and plan-execution implementation ONLY — always explicit, never in default routing | references/qwen.md |
Each guide has the model-specific style, copy-paste recipes, and anti-patterns.
Universal anti-patterns
- Vague framing; no output contract; mixing unrelated jobs in one run.
- Asking for more reasoning instead of a tighter contract.
- Unsupported certainty — require claims grounded in the provided context.