Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/dorukardahan/headless-relaynpx agentmods add skills/dorukardahan/headless-relay/headless-relayWrote 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.
[](https://agentmods.dev/skills/dorukardahan/headless-relay/headless-relay)<a href="https://agentmods.dev/skills/dorukardahan/headless-relay/headless-relay"><img src="https://agentmods.dev/badge/skills/dorukardahan/headless-relay/headless-relay/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.
<a href="https://agentmods.dev/skills/dorukardahan/headless-relay/headless-relay"><img src="https://agentmods.dev/badge/skills/dorukardahan/headless-relay/headless-relay.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00252 | $0.31091 |
| Opus 5.5 | $0.00101 | $0.12436 |
| Sonnet 5.5 | $0.00050 | $0.06218 |
| Haiku 4.5 | $0.00025 | $0.03109 |
Grade D, and why
headless-relay scanned grade D with 3 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
`~/.codex/config.toml` (`sandbox_mode`, `approval_policy`, reviewer features), so headless Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
trap 'rm -rf "$base" "${sbx:-}" 2>/dev/null' EXIT # armed BEFORE sandbox exists: nothing can leak Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
res = subprocess.run([PS, "-A", "-o", "pid=,pgid=,stat="], stdin=subprocess.DEVNULL, How it starts
The opening of the file, as written. The whole thing — 1,386 lines — stays where its author put it; the contents beside it link to each section on GitHub.
headless-relay
This skill provides instructions for delegating a task to another AI model without leaving the current agent session. The user says "ask Codex", "get GLM's opinion", "run this by Kimi"; the orchestrating agent (Claude Code, Codex CLI, or another harness) writes the prompt, runs the target model's headless CLI through its shell tool, reads the model's stdout, and summarizes the answer back. Follow these patterns exactly.
The six targets
| Target | CLI | Headless entry point | Auth / plan |
|---|---|---|---|
| GPT | codex (OpenAI Codex CLI) |
codex exec |
ChatGPT plan or OpenAI API key (codex login) |
| GLM | opencode, or zcode (ships inside the ZCode desktop app) |
opencode run / zcode --prompt |
Z.ai Coding Plan (API key or ZCode app login) |
| Kimi K3 | kimi (Kimi Code CLI) |
kimi -p |
Kimi membership through native device-code OAuth (kimi login) |
| Grok | grok (xAI Grok Build) |
grok -p — via the grok_relay helper (empty HOME + clean temp GROK_HOME so it can't read your other tools' config or grok's own global rules; see the next section) |
SuperGrok (grok login) or XAI_API_KEY |
| Gemini | agy (Google Antigravity CLI; the standalone Gemini CLI is not a drop-in lane, see references/cli-reference.md) |
agy -p / --print |
Google account via the Antigravity app/CLI |
| Claude | claude (Claude Code) |
claude -p, or the harness's native subagent |
Anthropic auth of the current session |
Kimi text relay — isolate the working directory
Kimi print mode is agentic: it starts in the current directory, uses auto permissions, and
cannot be combined with --plan. A text-only review therefore runs from a fresh empty non-git
directory with an empty skills directory. This reduces accidental project access; it is neither
full context isolation nor an OS sandbox. Opt-in required before the first call: tell the
user that global instructions ($KIMI_CODE_HOME/AGENTS.md and ~/.agents/AGENTS.md), global MCP
servers and hooks, inherited environment/endpoint overrides, and native session/log retention
remain active. Hooks can execute commands; MCP can spawn processes or send context elsewhere.
Real-home session history may retain prompts after the temporary cwd is deleted. Review those
settings with the user and obtain explicit consent to this agentic exposure; if unsuitable,
skip Kimi. Never read credential files as part of this review. Give native Kimi a real repository
cwd only for an explicitly requested agentic task.
What ships with it
18 files 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.
- references/anthropic-terms.md 15 KB
- references/cli-reference.md 101 KB
- references/custom-targets.md 3.5 KB
- references/party-mode.md 13 KB
- references/reprompter-relay.md 1.6 KB
- references/role-routing.md 6.5 KB
- scripts/catalog_watchdog.py 4.4 KB runs code
- scripts/kimi_relay.py 8.6 KB runs code
- scripts/print-model-catalog.sh 8.9 KB runs code
- scripts/regression-claude-target.sh 188 B runs code
- scripts/regression-grok-safety.sh 7.6 KB runs code
- scripts/regression-kimi-target.sh 5.3 KB runs code
- scripts/regression-model-pins.sh 6.8 KB runs code
- scripts/regression-party-mode.sh 314 B runs code
- scripts/test-claude-target.py 8.3 KB runs code
- scripts/test-grok-runtime.sh 76 KB runs code
- scripts/test-kimi-runtime.py 21 KB runs code
- scripts/test-party-contract.py 14 KB runs code
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.
- 10d ago Changed · +78 lines 7d836f508ec4
- 12d ago Changed · +1 lines d8d77136a2af
- 28d ago Changed · +188 lines fd8c6e591d1f
- 29d ago Changed · +174 lines · +74 tokens per session 60dcc7bb4d62
- 1mo ago Changed · +39 lines · +13 tokens per session 7ecb93b5082e
- 1mo ago Changed · +10 lines 5217fec99064
- 1mo ago Changed · +4 lines 988dbad26bb8
- 1mo ago Changed · +2 lines 66739ffd27f7
- 2mo ago First seen · 890 lines · 165 tokens per session scan D 93a7044587dd
headless-relay is a skill published in the GitHub repository dorukardahan/headless-relay (1 stars, last pushed 10d ago), licensed MIT. It adds 252 tokens to every session and 31,091 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it D with 3 findings (reads agent configuration directories, recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
headless-relay compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| headless-relaydorukardahan/headless-relay | Skill | 1 | 10d ago | MIT | D | 252 | Claude Code, Codex |
| claude-md-improveranthropics/claude-plugins-official | Skill | 47k | today | Apache-2.0 | A | 82 | Claude Code |
| agent-platform-model-registrygoogle/skills | Skill | 24k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| gke-workload-securitygoogle/skills | Skill | 24k | yesterday | Apache-2.0 | A | 171 | Claude Code, Codex |
| gke-reliabilitygoogle/skills | Skill | 24k | yesterday | Apache-2.0 | A | 85 | Claude Code, Codex |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 24k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| glance-canonical-layoutsandroid/skills | Skill | 10k | yesterday | Apache-2.0 | A | 56 | Claude Code |