boshu2/agentops/claude-exec
Claude Code and agent skill by boshu2/agentops
- community
Checking that the SKILL.md file is still in the repository.
Run one prompt through headless Claude with scoped permissions and a time bound. Use when: scripting or automating a `claude -p` call, even a simple one.
Install
npx vskill@latest install boshu2/agentops/claude-execSKILL.md
Claude Exec — one-shot runtime adapter
Run one caller-supplied prompt through Claude Code print mode and capture the result, only when the caller selects Claude: the native agent stays the default and batches belong to agent-native. Flags match claude --help for 2.1.309; recheck it on other versions. Re-checked on 2026-10-25 against Claude Code 2.1.309, codex-cli 0.163.0, AGY 1.4.7, gc edge 97503b2 (with Gas City v1.5.1 docs and source), bd 1.3.1 and ao 3.11.0.
Failure modes of a quick claude -p
- Inherited posture. A plain run loads the user's settings, hooks,
plugins, MCP servers and CLAUDE.md; a settings bypassPermissions default held even under --safe-mode. Use the clean flags below and set --tools and --permission-mode to the task's effects. They drop settings files, MCP servers, skills and commands and keep file tools in the working directory; --bare also skips CLAUDE.md, auto-memory and plugin hooks.
- Renewed time. One deadline, fixed once by the caller:
$SECSis the
time left before it, so a retry spends it instead of renewing it. Make one attempt; any other is the caller's decision.
- Exit 0 as proof. A denied call still exits 0 with
is_error: false
and "done" (not re-run since 2.1.282). Name targets by path, check effects there, and leave acceptance to a fresh validator.
- Silent fallback. With no
claude, login or model, report and stop
instead of switching runtimes or passing --fallback-model.
- Self-review. Review in a new session, never by
--resumeor
--continue of the author's.
Run
Redirect the prompt from a file, or pass it as the argument with </dev/null, because print mode reads stdin to EOF: a pipe left open hangs until the bound kills it (not re-run since 2.1.282). Stock macOS lacks timeout: use GNU timeout or Homebrew's gtimeout, and launch nothing without one. This script body makes one launch; the caller supplies $POSTURE, $MODEL, $BUDGET_USD, $DEADLINE_EPOCH, $ALLOWED for test, an absolute $WORKDIR, and absolute $PROMPT_FILE, $OUT and $ERR paths outside it.
Unapproved calls are denied and listed in permission_denials. test adds Bash only for the authorized commands $ALLOWED names, e.g. ALLOWED="Bash(go test *)"; with settings hooks dropped, that list is the guard. --max-budget-usd stops after the call that crosses it. --max-turns <n> caps agentic turns in print mode and exits with an error when it is reached: 2.1.309 accepts it although --help omits it, and the CLI reference documents it. Time, budget and an optional turn cap are the bounds. --no-session-persistence keeps no transcript. --bare signs in only with ANTHROPIC_API_KEY or an apiKeyHelper passed with --settings, never an OAuth login.
A host shell tool may kill a call before $SECS, leaving $OUT empty since JSON is written only at exit. When its cap is under $SECS plus the 10 s grace, start the command as a host background job and wait on its completion notice; a run the host killed was the one attempt. A quiet run is working.
Result
JSON carries result, is_error, terminal_reason, api_error_status, session_id, permission_denials, and modelUsage keyed by the models billed; identity evidence needs stream-json --verbose per the model-dispatch recipe. Judge by exit status and is_error: an unknown model exited 1 with subtype: "success", terminal_reason: "api_error" and api_error_status: 404. Exit 1 also covers a spent budget or missing input (not re-run since 2.1.282); timeout gives 124, or 137 when KILL follows 10 seconds later. Read the fields before the byte cap, since a cut JSON file no longer parses:
Return this, and stop:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/claude-exec/SKILL.md
Popularity
- Repository stars
- 450
- Repository forks
- 43
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/boshu2/agentops/claude-exec)