Skip to content

leek/agent-skills / skills/harness-tools

harness-tools

Verified

The tool each agent harness (Claude Code, Codex, Grok, agy) uses to start, follow up with, or stop a sub-agent, and to ask the user a structured question. Use when a skill names one of these moves and points here, or when you are not sure which tool your harness has for it.

FileKindSize
SKILL.mdskill md9.6 KB
agents/openai.yamlconfig245 B
scripts/test-wait-task-output.shexecutablescript2.6 KB
scripts/wait-task-output.shexecutablescript2.0 KB

scripts/wait-task-output.sh

View on GitHub
#!/bin/bash
# Wait in the foreground for a background shell task to finish, by watching the output file
# the shell tool named when it backgrounded the command ("Output is being written to: <file>").
# For a sub-agent that must not end its turn while its own command runs: a named Claude Code
# sub-agent is never woken by that command's completion.
#
# Usage: wait-task-output.sh <output-file> [max-seconds]     (default 100, under the shell tool's
# default 120s timeout, so the wait itself never gets backgrounded; short, so a message from the
# lead is read within two minutes)
# Prints one JSON line and exits 0:
#   {"file":"…","status":"done","exit_code":N}     the command exited
#   {"file":"…","status":"killed"}                 the command was stopped
#   {"file":"…","status":"running","waited":N}     still running at max-seconds: call again
# Exits 1 on bad input (missing file, bad max-seconds).
# Env (tests): WAIT_TASK_POLL_SECONDS sets the poll interval (default 5).

set -e

file=${1:?usage: wait-task-output.sh <output-file> [max-seconds]}
max=${2:-100}
case "$max" in ''|*[!0-9]*) echo "wait-task-output: max-seconds must be a whole number: $max" >&2; exit 1 ;; esac
[ -f "$file" ] || { echo "wait-task-output: no such output file: $file" >&2; exit 1; }
poll=${WAIT_TASK_POLL_SECONDS:-5}

start=$(date +%s)
echo "wait-task-output: waiting up to ${max}s for $file to finish" >&2
while :; do
  code=$(grep -E '^\[exited with code -?[0-9]+\]$' "$file" 2>/dev/null | tail -1 | sed -E 's/^\[exited with code (-?[0-9]+)\]$/\1/')
  if [ -n "$code" ]; then
    jq -cn --arg f "$file" --argjson c "$code" '{file:$f,status:"done",exit_code:$c}'
    exit 0
  fi
  if grep -qxF '[killed]' "$file" 2>/dev/null; then
    jq -cn --arg f "$file" '{file:$f,status:"killed"}'
    exit 0
  fi
  waited=$(( $(date +%s) - start ))
  if [ "$waited" -ge "$max" ]; then
    jq -cn --arg f "$file" --argjson w "$waited" '{file:$f,status:"running",waited:$w}'
    exit 0
  fi
  sleep "$poll"
done
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall