headless-run

headless-run is a skill for Claude Code from bdfinst/agentic-dev-team. It costs 132 tokens per session (1,378 once invoked), scanned C, original, MIT.

A way to run a Claude Code command as a separate, isolated one-time process and collect its result.

In plain words
What is it for?
Use it for scripted command runs, benchmark cases, and isolated checks of commands such as code review.
Why use it?
It prevents the test run from sharing the parent session's identity, settings, or environment.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev-team plugin — 98 skills, 54 agents, 4 hooks shipped together

Good fit Use it for scripted command runs, benchmark cases, and isolated checks of commands such as code review.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add bdfinst/agentic-dev-team
Claude Code
/plugin install dev-team

Made for: Claude Code.

Or install dev-team, the plugin that ships this one along with the rest of its 98 skills, 54 agents, 4 hooks.

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 headless-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/headless-run/github.svg)](https://agentmods.dev/skills/bdfinst/agentic-dev-team/headless-run)
Your own site
<a href="https://agentmods.dev/skills/bdfinst/agentic-dev-team/headless-run"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/headless-run/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 headless-run

Your own site · 80×15
<a href="https://agentmods.dev/skills/bdfinst/agentic-dev-team/headless-run"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/headless-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,378 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00132 $0.01378
Opus 5.5 $0.00053 $0.00551
Sonnet 5.5 $0.00026 $0.00276
Haiku 4.5 $0.00013 $0.00138

Measured 1mo ago against content hash 080af9400a03, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

headless-run scanned grade C with 1 finding 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/isolated_dispatch.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

(`make_cell_home` / `cell_env` / `dispatch`), which does `env = dict(os.environ)`
plugins/dev-team/skills/headless-run/SKILL.md · 108 lines

How it starts

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

Headless Run

Role: worker. This skill runs one Claude Code prompt in a maximally isolated subprocess and returns its JSON result — it does not review, plan, or edit.

When to use it

Use it for scripted, one-shot headless invocations — above all a benchmark harness that shells out to claude -p per case (the #821 harness that runs /code-review once per fixture). A plain nested claude -p launched inside a live Claude Code Remote session inherits the parent's identity and tool surface (see docs/using-plugin-skills-in-the-web-environment.md and issue #842):

  • Reused session_id — the nested run reports the same session id as the parent, so runs are not independent.
  • Remote-injected tool surface — the nested run sees Remote-runtime MCP tools a local CLI session never exposes, changing the tool set under test.

This skill is the reusable workaround for that #842 constraint.

Isolation guarantees

The helper builds each dispatch to leak as little parent state as possible:

  • Fresh session id. A new uuid.uuid4() is passed as --session-id <uuid>, so the nested run cannot reuse the parent session_id. This is the key fix.
  • Clean HOME + config. A throwaway temp HOME and CLAUDE_CONFIG_DIR — no shared config, .claude/memory/, or telemetry state carries over.
  • Scrubbed env. Inherited CLAUDE_* session/Remote identity vars (e.g. CLAUDE_SESSION_ID, CLAUDE_CODE_SESSION_ID, CLAUDE_CODE_ENTRYPOINT, CLAUDE_CODE_REMOTE) are removed, then IS_SANDBOX=1 and DEV_TEAM_TELEMETRY=off are set fresh.
  • No resume. The command never uses --resume/-r or --fork-session.
  • JSON result + timeout. Runs with --output-format json and a hard subprocess timeout; prints the verified session_id, cost, and token usage.

Auth vs. isolation (#957)

The fresh HOME also wipes Claude Code's login state, so a dispatch reports "Not logged in" unless ANTHROPIC_API_KEY is set. ~/.claude.json alone does not fix this — confirmed empirically, twice — something under ~/.claude/ itself gates the login check ahead of Claude Code's actual (Keychain-backed) OAuth token lookup. Pass --preserve-auth to copy ~/.claude.json and most of ~/.claude/ into the cell home first, restoring login for operators who authenticate via claude login rather than an API key. This is a real tradeoff, not free: it carries over settings.json, projects/, sessions/, mcpServers, plugins/, and other app state — copy_auth_state()'s _CLAUDE_DIR_EXCLUDE skips the clearly bulky, clearly-not-auth-related pieces (history.jsonl, file-history/, session-env/, paste-cache/, shell-snapshots/, debug/, telemetry/, downloads/), but everything else rides along since we don't have a confirmed narrower answer for exactly which piece satisfies the login check. Off by default; the code-review-benchmark harness (runner.make_isolated_dispatch_fn()) turns it on unconditionally, since running that harness at all presupposes the operator's own subscription.

Read the full file on GitHub · 108 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 108 lines · 132 tokens per session scan C 080af9400a03

Subscribe to this mod's changes

headless-run is a skill published in the GitHub repository bdfinst/agentic-dev-team (295 stars, last pushed 4d ago), licensed MIT. It adds 132 tokens to every session and 1,378 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens