Agi Terminal Helper
by @liuwujijay
A practical runbook for using OpenClaw exec safely (sandbox-first, explicit confirmations, and debugging playbooks).
clawhub install agi-terminal-helper📖 About This Skill
name: terminal-helper description: A practical runbook for using OpenClaw exec safely (sandbox-first, explicit confirmations, and debugging playbooks). user-invocable: true disable-model-invocation: false metadata: { "openclaw": { "emoji": "🖥️", "os": ["darwin","linux","win32"] } }
Terminal Helper — a runbook for OpenClaw exec
This skill is not a “generic terminal tips” template.
It’s a concrete runbook for how to use OpenClaw’s exec tool effectively in a real workspace (like your /Users/.../clawd workspace), with attention to:
OpenClaw skills are loaded from bundled skills, ~/.openclaw/skills, and with workspace taking precedence. :contentReference[oaicite:12]{index=12}
Operating principles (what I will do every time)
1) State the intent + the exact command before running it
Before callingexec, I will say:
2) Default to read-only exploration
When debugging or orienting:pwd, ls -la, git status, rg, cat, head, tail3) Prefer sandboxed execution for untrusted or high-churn work
Use the sandbox for:Important nuance:
If a session is sandboxed, the sandbox does not inherit host process.env.
Global env and skills.entries. apply to host runs only; sandbox env must be set separately. :contentReference[oaicite:13]{index=13}
4) Explicit confirmation for anything risky
I will require the user to confirm before:~/.ssh, keychains, browser profilessudo, launchctl changes)Execution patterns (the “how”)
A) Choose a working directory deliberately
When diagnosing OpenClaw itself, I’ll work inside your workspace (example:/Users/proman/clawd) and be explicit about it.Typical commands:
ls -la ./skills
- find ./skills -maxdepth 2 -name SKILL.md -print
git status (if the workspace is a git repo)
which peekaboo || echo "peekaboo not on PATH"B) Keep commands single-purpose
Prefer multiple small commands over one “do everything” pipeline. This makes it easier to review and safer to approve.C) Long-running commands: background + poll
When supported, run with a short yield and then poll a process session.Examples you can adapt:
exec: make test (with a short yield)
process: poll (using the returned session id)(Exact parameter names depend on your tool surface, but the pattern is: yield → poll.)
Practical playbooks
Playbook 1: “My skill isn’t loading”
1) Confirm skill location/precedence: - OpenClaw loads/skills and that wins precedence. :contentReference[oaicite:14]{index=14}
2) Verify the skill folder has SKILL.md and valid frontmatter.
3) If you changed files, ensure watcher is enabled:
- skills.load.watch: true is the default pattern. :contentReference[oaicite:15]{index=15}Playbook 2: “Peekaboo works in Terminal but fails in OpenClaw”
This is usually macOS TCC context + daemon behavior. A common fix is enabling PeekabooBridge in OpenClaw.app:Then validate:
peekaboo bridge status --verbose should select a host (OpenClaw.app) rather than local (in-process). :contentReference[oaicite:17]{index=17}Playbook 3: “ClawHub sync rejects my skill docs”
ClawHub has a quality gate (language-aware word counting and heuristics) that rejects docs that are too thin/templated. :contentReference[oaicite:18]{index=18} Fix by adding:What I will NOT do
curl | sh) without explicit user request and review.Quick commands I often start with
pwdls -lagit statusrg -n "error|warn|TODO" .uname -anode -v && python -VIf you want raw, direct execution (no model involvement), use /term.