human-run
Skill4 starsChanged 48 days agoMITView on GitHub
Mandatory handoff when a human (not the agent) must run a script/command. Agent loads this skill, ensure-env, propose.sh --cwd (default --wait until x finishes), then the agent continues follow-up itself. Handoff script bodies must be non-blocking kickoffs (trigger/async ack) — never wait for CI/deploy inside x. Never paste multi-line scripts into chat. Agent self-exec is out of scope. Use when you would otherwise ask the user to paste/run a script, or the command needs TTY / host secrets / out-of-sandbox privileges.
- Reads credentials
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- frontend-designSkill
- web-design-guidelinesSkill
- adversarial-reviewSkill
- brainstormSkill
- cross-repo-delegateSkill
- habit-weeklySkill
- repo-hygieneSkill
- wezdeck-runtime-opsSkill
- worktree-recycleSkill
- yuns-engineerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Do not load: when you can run it with tools, or when the snippet is illustrative only (mark 勿粘贴执行).
- Very specific: line 65
If $WEZDECK_REPO/scripts/runtime/cli lacks them, symlinks from the skill tree (so wezdeck-env PATH and human x work even when that clone’s …
- Distinctive: line 69
If ensure-env fails → fail closed (report the ensure-env stderr).
- Very specific: line 82
Rule: prefer async trigger + exit 0 once accepted.
- Very specific: line 122
Default --timeout for wait should assume a short human action (minutes), not a full pipeline.
- Very specific: line 126
Do not ask the human to sit in x until the pipeline ends.
- Distinctive: line 130
Don't put long waits / CI watches inside the handoff script body
- Distinctive: line 131
Don't paste multi-line runnable scripts into chat
- Very specific: line 132
Don't skip ensure-env.sh / propose.sh and call a guessed wd-run path
- Very specific: line 133
Don't propose work you can run with tools
- Very specific: line 134
Don't omit --cwd
- Very specific: line 135
Don't ask the human to run wd-run as the primary path — that is x
- Very specific: line 136
Don't confuse shell x with WezTerm Alt+x
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
human-run (platform skill — single source)
Who runs the script: the human, via shell command x.
Who prepares it: the agent, via this skill’s ensure-env.sh + propose.sh.
Never paste a multi-line script into chat as the execution channel.
Never wrap agent self-exec through this skill — tools already run those.
Runtime CLI lives in the same wezdeck tree as this skill:
scripts/runtime/cli/{wd-run,x} + agent-run-lib.sh.
Docs: docs/agent-run.md. Profile: agent-profiles → reporting.md.
Who runs what
| Actor | Duty |
| Human | In a real terminal: x (peek → confirm → run in recorded cwd) |
| Any agent | Load skill → ensure-env → propose.sh → tell user only x |
| Agent tools | Self-runnable work — do not call this skill |
When to load (mandatory)
Load whenever any of these is true:
- You are about to ask the human to run / paste / copy a shell script or multi-line command
- The command needs a real TTY, GUI, host secret the agent must not hold, or privileges outside the agent sandbox
- The human must read and approve the exact script before it runs
Do not load when you can run it with tools, or when the snippet is illustrative only (mark 勿粘贴执行).
Resolve TOOL_HOME
1. directory of this SKILL.md (follow symlinks; ~/.agents/skills/human-run → …)
2. $HUMAN_RUN_HOME if set
3. else fail — re-run link-platform-skills.sh from a wezdeck that has human-run
The source checkout may be declared explicitly with `WEZDECK_REPO=/absolute/path`.
Do not use the logical `~/.agents/skills/human-run` path to derive the repo root.Environment check + init (mandatory first step)
Do not hand-roll path guessing in the chat. Always:
TOOL_HOME="$(readlink -f "${HUMAN_RUN_HOME:-$HOME/.agents/skills/human-run}")"
"$TOOL_HOME/ensure-env.sh"ensure-env.sh is idempotent. It:
- Verifies this skill’s wezdeck tree has
wd-run/x/agent-run-lib.sh - If
$WEZDECK_REPO/scripts/runtime/clilacks them, symlinks from the skill tree (sowezdeck-envPATH and humanxwork even when that clone’s HEAD is behind) - Writes/updates
~/.wezterm-x/agent-tools.envwith a workingwd_run= - Smokes the binary; prints the absolute
wd-runpath on stdout
If ensure-env fails → fail closed (report the ensure-env stderr). Do not paste scripts into chat.
Script body contract (non-blocking kickoff)
x only covers the human-gated moment. The script must finish quickly so
wd-run wait returns and you resume ownership of the long tail.
Put in the x script | Keep out of the x script (agent after wait) |
| Trigger / fire-and-forget (start deploy, enqueue job, open privileged CLI that submits then exits) | Poll CI / pipeline / rollout until green |
| Print a clear “triggered” ack + any id/url the agent will need | sleep loops, gh run watch, kubectl rollout status waits |
| Fail fast if trigger rejected | Multi-stage verification the agent can do with tools |
Rule: prefer async trigger + exit 0 once accepted. If a tool has sync vs async
modes, choose async for the handoff body. After propose.sh --wait returns,
the agent polls / verifies / retries with its own tools.
Anti-patterns (do not ship in handoff body):
# BAD — blocks the human and the agent's wait on CI
gh run watch "$id" --exit-status
while ! curl -fsS "$health"; do sleep 5; done# GOOD — trigger only; agent continues after wait
gh workflow run deploy.yml -f ref=…
echo "triggered workflow=deploy.yml" # agent scrapes / lists runs nextAgent procedure
- Decide this is human-only (if you can self-run → do that; skip this skill).
- Split the work: handoff body = non-blocking kickoff; post-wait = agent-owned follow-up.
- Ensure env:
"$TOOL_HOME/ensure-env.sh"(required). - Choose cwd — existing directory; never omit
--cwd. - Tell the human first (one line): 请在本机终端运行
x预览并确认(脚本应很快结束)。Do not paste the script body. Propose + wait — same shape as a normal blocking/background shell task.
propose.shdefaults to--wait(blocks untilxfinishes — which should be seconds, not CI duration). Prefer host background if needed. No attention badge."$TOOL_HOME/propose.sh" \ --cwd "/abs/workdir" \ --actor "${AGENT_NAME:-agent}" \ --summary "short title ≤80" \ --timeout 600 \ --stdin <<'EOF' # non-blocking kickoff only EOFDefault
--timeoutfor wait should assume a short human action (minutes), not a full pipeline. Or split:propose.sh --no-wait …thenwd-run wait --id ….- Continue after wait — with tools, handle CI/status/verification yourself.
Do not ask the human to sit in
xuntil the pipeline ends.
Don't
- Don't put long waits / CI watches inside the handoff script body
- Don't paste multi-line runnable scripts into chat
- Don't skip
ensure-env.sh/propose.shand call a guessedwd-runpath - Don't
proposework you can run with tools - Don't omit
--cwd - Don't ask the human to run
wd-runas the primary path — that isx - Don't confuse shell
xwith WezTermAlt+x
Related
ensure-env.sh,propose.sh,lib/resolve-wd-run.sh(this dir)- Runtime:
scripts/runtime/cli/wd-run,scripts/runtime/cli/x - Docs:
docs/agent-run.md - Install links:
scripts/dev/link-platform-skills.sh
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

