From popcorn-harness
Instant on-the-fly harness assembler. Discovers available skills, agents, and commands on the current platform, reasons about the optimal combination, and executes with progressive disclosure. Works on Claude Code, Hermes, and OpenClaw. Trigger on: "popcorn", "assemble harness for", or "use your skills to".
How this skill is triggered — by the user, by Claude, or both
Slash command
/popcorn-harness:popcorn-harnessThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Given a task, pop the right capabilities together and execute — no manual tool selection needed.
Given a task, pop the right capabilities together and execute — no manual tool selection needed.
Announce at start: "🍿 Popping harness for: [task summary]"
Supporting files in this skill (load on demand):
Note on SKILL_DIR: When scripts are referenced below, SKILL_DIR refers to the directory containing this SKILL.md. To determine the correct path, check in order:
~/.claude/plugins/popcorn-harness/skills/popcorn-harness/ (plugin install)~/.claude/skills/popcorn-harness/ (manual install).claude/skills/popcorn-harness/ (project-level install)~/.hermes/skills/popcorn-harness/ (Hermes install)Use the first path where SKILL.md exists. Set it before running any script:
SKILL_DIR=<resolved path>
Skip this skill when a single skill clearly covers the task — invoke it directly.
Run the detection script first. It outputs JSON.
bash "$SKILL_DIR/scripts/detect-platform.sh"
# -> {"platform":"claude-code","scope":"project","evidence":[...]}
Windows users: bash scripts require WSL2 or Git Bash. If unavailable, skip the script and use the fallback table directly.
If the script exits non-zero or is not found, use the fallback table:
| Signal | Platform |
|---|---|
claude CLI in PATH + .claude/ dir exists | Claude Code (project) |
claude CLI in PATH, no .claude/ dir | Claude Code (user) |
available_skills in system prompt, no claude CLI | Hermes |
Above + OPENCLAW env var set | OpenClaw |
Ambiguous detection -> default to Hermes (context-based). Never halt.
Note: "Capabilities" in this skill means ALL items from the discovery output: skills[], agents[], and commands[]. Do not treat skills alone as the full capability set.
Run the discovery script:
bash "$SKILL_DIR/scripts/discover-capabilities.sh" --platform claude-code
# -> {"skills":[...],"agents":[...],"commands":[...],"sources":[...],"errors":[...]}
Read the JSON output. The errors field lists what failed — surface it if critical.
Zero results protocol: report "No capabilities found via [sources]. Check installation." and halt. Do not proceed with an empty harness.
Capabilities are already present in available_skills (injected in system prompt). Extract:
Zero results protocol: same as above — report and halt.
Assess task complexity after discovery. For detailed edge cases, load references/tier-decision-tree.md.
Quick reference (exclusive boundaries). Note: significant ambiguity overrides count — see tier-decision-tree.md.
| Condition | Tier |
|---|---|
| Exactly 1 capability, task unambiguous | Tier 1 — Quick Pop |
| 2-3 capabilities, no significant ambiguity | Tier 2 — Standard Pop |
| 4-5 capabilities, OR significant ambiguity at any count | Tier 3 — Full Pop |
Announce, execute immediately. No confirmation.
🍿 Popping harness for: [task summary]
Popping: security-review
[executes]
Show plan. Wait for explicit confirmation before executing.
🍿 Popping harness for: [task summary]
Platform: Claude Code (project) | Tier: 2 — Standard Pop
Assembled harness:
1. research-ops — gather context
2. security-review — audit attack surface
3. deployment-patterns — generate deploy checklist
Proceed? [y / n / adjust]
Show full discovery + plan + pruning rationale. Require explicit confirmation.
🍿 Popping harness for: [task summary]
Platform: Claude Code (project) | Tier: 3 — Full Pop
Discovered:
Skills: security-review, e2e-testing, seo, deployment-patterns, docker-patterns
Agents: security-engineer
Commands: /review
Assembled harness (5 of 7):
Phase 1 (parallel): security-review + e2e-testing + seo
Phase 2 (sequential): deployment-patterns -> docker-patterns
Pruned: security-engineer (overlaps security-review), /review (redundant)
Proceed? [y / n / adjust]
Mid-execution escalation: if a capability output reveals new required capabilities, see references/tier-decision-tree.md § Tier Escalation.
y or cancels with nIf user says "adjust" but provides no specifics: ask "What would you like to change? You can add, remove, or reorder capabilities."
For full graph patterns and parallel dispatch mechanics, load references/assembly-patterns.md.
Quick reference:
SKILL.md into context via file read tool, then follow only its task-specific instructions. Skip the sub-skill's platform detection and tier selection — those are already handled.subagent_type: "general-purpose") with agent .md as system promptskill_view(name="<skill-name>") — load then followdelegate_task(tasks=[...]) — pass ALL context per subagent (no shared memory)--- 🍿 Popcorn Harness: [task summary] ---
Platform: [detected] | Tier: [1/2/3] — [Quick/Standard/Full] Pop
[Phase 1]
<skill>: [findings]
<skill>: [findings]
[Phase 2]
<skill>: [findings]
--- Summary ---
Key findings: [what matters most across all outputs]
Action items: [concrete, specific next steps]
Skipped: [any failures or pruned capabilities, with reason]
--- Plan B (only if budget was exceeded and a second run was proposed) ---
Remaining: [capabilities deferred to next run]
Context to pass: [copy this output block as input to the next /popcorn invocation]
Post-execution review: After any Tier 3 run, or when a capability returned an error, spawn the popcorn-critic agent to evaluate output quality. To invoke:
subagent_type: "general-purpose"[full content of popcorn-critic.md]\n\nOriginal task: [task]\n\nHarness output:\n[full Step 5 output block]~/.claude/agents/popcorn-critic.md or ./agents/popcorn-critic.md)npx claudepluginhub seilk/popcorn-harness --plugin popcorn-harnessGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.