claude-exec

claude-exec is a skill for Claude Code from boshu2/agentops. It costs 41 tokens per session (1,981 once invoked), scanned A, original, Apache-2.0.

A runtime adapter that sends one prompt to Claude Code in headless mode and captures the result. It controls permissions, tools, settings, and a time limit for that run.

In plain words
What is it for?
It is for scripting one Claude Code invocation, limiting its effects, handling missing runtimes or credentials, and checking the resulting files separately.
Why use it?
It reduces the risk of an automated Claude call using unintended settings or reporting success without checking where its changes went.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions Codex.

Part of the agentops plugin — 25 skills shipped together

Good fit It is for scripting one Claude Code invocation, limiting its effects, handling missing runtimes or credentials, and checking the resulting files separately.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/boshu2/agentops/claude-exec
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add boshu2/agentops --skill claude-exec
Clone the repo
git clone --depth 1 https://github.com/boshu2/agentops

Made for: Claude Code.

Or install agentops, the plugin that ships this one along with the rest of its 25 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-exec

README.md
[![agentmods](https://agentmods.dev/badge/skills/boshu2/agentops/claude-exec/github.svg)](https://agentmods.dev/skills/boshu2/agentops/claude-exec)
Your own site
<a href="https://agentmods.dev/skills/boshu2/agentops/claude-exec"><img src="https://agentmods.dev/badge/skills/boshu2/agentops/claude-exec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-exec

Your own site · 80×15
<a href="https://agentmods.dev/skills/boshu2/agentops/claude-exec"><img src="https://agentmods.dev/badge/skills/boshu2/agentops/claude-exec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,981 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01981
Opus 5.5 $0.00016 $0.00792
Sonnet 5.5 $0.00008 $0.00396
Haiku 4.5 $0.00004 $0.00198

Measured 19d ago against content hash db3c9aa304a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-exec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/claude-exec/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 model, report and stop instead of switching runtimes or passing --fallback-model.
  5. Self-review. Review in a new session, never by --resume or --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.

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago Changed · +1 lines db3c9aa304a1
  2. 29d ago Changed · +6 lines 8d5462b3959a
  3. 1mo ago Changed · +12 lines 200c2de4c240
  4. 1mo ago Changed · +6 lines 1d44559f75a4
  5. 1mo ago Changed · +8 lines 2f9c3a8db348
  6. 1mo ago First seen · 97 lines · 41 tokens per session scan A d44dbd5226fd

Subscribe to this mod's changes

claude-exec is a skill published in the GitHub repository boshu2/agentops (464 stars, last pushed yesterday), licensed Apache-2.0. It adds 41 tokens to every session and 1,981 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-06.

Related

claude-exec compared with skills from other repositories

claude-exec next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-execboshu2/agentopsSkill464yesterdayApache-2.0A41Claude Code
brainstormOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A85Claude Code, Codex
audit-projectOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A50Claude Code, Codex
commit-push-prOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A46Claude Code, Codex
commitOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A46Claude Code, Codex
duetOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A28Claude Code, Codex
prototypeOutlineDriven/odin-claude-pluginSkill402mo agoApache-2.0A36Claude Code, Codex