claude-exec

claude-exec is a skill for Claude Code from boshu2/agentops. It costs 41 tokens per session (1,194 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,194 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.01194
Opus 5.5 $0.00016 $0.00478
Sonnet 5.5 $0.00008 $0.00239
Haiku 4.5 $0.00004 $0.00119

Measured 10d ago against content hash d44dbd5226fd, 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 10d 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 · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 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 agent-native. Flags match claude --help for 2.1.282; recheck it on other versions.

Failure modes of a quick claude -p

  1. Inherited posture. A bare 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.
  2. Renewed time. One bound, from the caller's remaining time: 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", and a bare file name once landed in the run's scratchpad, not $WORKDIR. 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 runs as a separate session, never 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. Stock macOS lacks timeout: use GNU timeout or Homebrew's gtimeout, and launch nothing without one.

TO=$(command -v timeout || command -v gtimeout) || { echo "no timeout: not launching" >&2; exit 2; }
cd "$WORKDIR" || exit 2
# Read-only: review, research, questions.
"$TO" -k 10 "$SECS" claude -p --model "$MODEL" --output-format json \
  --setting-sources "" --strict-mcp-config --disable-slash-commands \
  --tools "Read,Grep,Glob" --permission-mode dontAsk \
  <"$PROMPT_FILE" >"$OUT" 2>"$ERR"; echo "exit=$?"
# Edit-capable: authorized file changes under $WORKDIR.
"$TO" -k 10 "$SECS" claude -p --model "$MODEL" --output-format json \
  --setting-sources "" --strict-mcp-config --disable-slash-commands \
  --tools "Read,Grep,Glob,Edit,Write" --permission-mode acceptEdits \
  <"$PROMPT_FILE" >"$OUT" 2>"$ERR"; echo "exit=$?"

Read the full file on GitHub · 97 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. 10d 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 (448 stars, last pushed today), licensed Apache-2.0. It adds 41 tokens to every session and 1,194 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

Other skills, from other repositories

brainstorm

Explore vague or ambitious ideas into a right-sized requirements-only plan. Use when the user wants to brainstorm, think through scope, decide what to build, or needs collaborative product framing before planning, not for a decisive verdict on whether to adopt or switch to a specific external technology, library, or…

OutlineDriven/odin-claude-plugin · 85 tokens

commit-push-pr

Use when asked to commit and push a feature branch, with or without a pull request. Its no-PR mode publishes without a PR. Not for a PR body alone: use create-pull-request.

OutlineDriven/odin-claude-plugin · 46 tokens

audit-project

Run an iterative multi-agent code audit until critical and high findings are resolved. Use when the user says "audit my code", "find all the bugs", "deep code audit", "iterative review", or "review until clean".

OutlineDriven/odin-claude-plugin · 50 tokens

commit

Use when asked to commit changes, create a typed branch, format history for a changelog, or rewrite messages of HEAD or an unpushed range. Not for pushing or a PR: use commit-push-pr.

OutlineDriven/odin-claude-plugin · 46 tokens

drift-detect

Use when the user says "plan drift", asks whether the roadmap, plans, or docs still match the code, or is deciding what to rebuild when restarting a stalled project. For doc-vs-code drift inside a specific diff, use sync-docs.

OutlineDriven/odin-claude-plugin · 56 tokens

duet

Use when the user invokes /duet, says "pair with me", or faces aesthetic, architectural, or irreversible decisions.

OutlineDriven/odin-claude-plugin · 28 tokens