claude-exec

Featured

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.

AI & Automation 458 stars 44 forks Updated 5 days ago Apache-2.0

Install

View on GitHub

Quality Score: 97/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 `orchestrate`. Flags match `claude --help` for Claude Code 2.1.309, re-checked on 2026-10-25; recheck it on other versions. It worked when the run drops inherited settings, names its tools and permission mode, stays inside one deadline, and the result is judged by exit status and `is_error` with `permission_denials` reported. ## Failure modes of a quick `claude -p` 1. **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. 2. **Renewed time.** One deadline, fixed once by the caller: `$SECS` is the time left before it, so a retry spends it instead of renewing it. Make one attempt; any other is the caller's decision. 3. **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. 4. **Silent fallback.** With no `claude`, login or...

Details

Author
boshu2
Repository
boshu2/agentops
Created
1 years ago
Last Updated
5 days ago
Language
Go
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category