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.
npx skills add takashicompany/headlenss --skill spawn-claudegit clone --depth 1 https://github.com/takashicompany/headlenssWrote 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/takashicompany/headlenss/spawn-claude)<a href="https://agentmods.dev/skills/takashicompany/headlenss/spawn-claude"><img src="https://agentmods.dev/badge/skills/takashicompany/headlenss/spawn-claude/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/takashicompany/headlenss/spawn-claude"><img src="https://agentmods.dev/badge/skills/takashicompany/headlenss/spawn-claude.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.00000 | $0.01387 |
| Opus 5 | $0.00000 | $0.00694 |
| Sonnet 5 | $0.00000 | $0.00277 |
| Haiku 4.5 | $0.00000 | $0.00139 |
Grade A, and why
spawn-claude scanned grade A 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 9d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
description: 新しい Claude Code セッション / 別の開発環境 / サンドボックス / 子セッションを立てる要求があったらこの skill を必ず使う。代表的な指示: 「新しい Claude 立てて」「別の Claude Code 起動して」「もう一つ環境作って」「別環境を building / 構築して」「子セッション spawn して」「別 tmux で claude 動かして」「別ディレクトリで作業させたい How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
spawn-claude
別の tmux 上で新しい Claude Code を起動する。headlenss server (${HEADLENSS_SERVER_URL}、未設定なら http://localhost:3000) の POST /api/sessions を curl で呼ぶ。
必ずこの skill を使う理由 (= 直接 tmux で立ててはいけない)
- Claude Code は初回起動時に trust prompt (
Do you trust this folder?) を出す。 tmux new-session -d -s NAME -c DIR 'claude'のような直接起動だと、誰もこの prompt に応答できず、Claude が起動完了に進まない (= G2 lens / WebView の Claude セッション一覧にも出てこない)。- headlenss server の
POST /api/sessionsには、起動した Claude の pane を polling して trust prompt を検出 → Enter で自動承諾するロジックが組み込まれている (advanceClaudeStartup)。 - したがって、新しい Claude を立てるときは直接 tmux ではなく必ずこの skill (= server 経由) を使う。
入力
<name>(必須): tmux セッション名。server 側の validation は[a-zA-Z0-9_-]{1,40}(= 英数字とハイフン/アンダースコアのみ、最大 40 文字)<cwd>(省略可): 作業ディレクトリ。~/.../ 相対パス / 絶対パスを受け付ける (server 側でホーム基準に解決される)。省略可だが、省略するとユーザの意図と外れた場所で起動する可能性があるので、原則として確定させてから呼ぶ
手順
- ユーザの要求から
<name>を確定する。曖昧なら 1 度確認する。同名の session が既にあると server がエラーを返すので、被らない名前にする (必要なら事前にGET /api/claude/sessionsで確認) <cwd>を確定する:- 「今と同じ場所で」 → 親 tmux の cwd を流用
- 「新しい場所」 →
~/temp/spawn-<name>-<timestamp>のような捨て場を提案、もしくはユーザに確定させる
- server URL を解決:
URL="${HEADLENSS_SERVER_URL:-http://localhost:3000}" - POST で起動要求:
curl -sS -X POST "$URL/api/sessions" \ -H 'content-type: application/json' \ -d '{"name":"<name>","cwd":"<cwd>","startClaude":true}' - 応答 JSON を確認:
{"ok":true}→ 起動要求は受理。実際の Claude Code 起動には数秒かかる{"error":"..."}→ 内容をユーザに伝える (invalid session name/session already exists等)
立てた直後に初期 prompt を送りたい場合
ユーザが「立てて、これをやらせて」のような複合要求をしたら、立てた直後に input API で初期 prompt を流す:
curl -sS -X POST "$URL/api/sessions/<name>/input" \
-H 'content-type: application/json' \
-d '{"text":"<prompt>","submit":true}'
ただし Claude Code の起動完了前に流すと取りこぼす可能性がある。次のいずれかで起動完了を待ってから流す:
GET /api/claude/sessionsを polling してtmuxSessionNameがリストに出るまで待つ- 数秒 (3-5 秒程度) sleep する
注意
- 同名衝突: 既に同じ name の tmux session があると server がエラーを返す。事前に
GET /api/claude/sessionsで確認するか、ユーザに別名を提案する - 乱発防止: ユーザの明示的な要求 1 回につき 1 回だけ実行する。確認なしに連続 spawn しない
- 登録の自動性: 立てた Claude Code は plugin hooks 経由で headlenss server の registry に自動登録される。G2 lens / WebView の Claude セッション一覧に出てきたら起動完了と判断できる
- 権限境界: spawn された Claude Code は親と独立した tmux pane で動く。secrets や conversation context は引き継がれない
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.
- 9d ago First seen · 62 lines · 0 tokens per session scan A 47e4224f2df1
spawn-claude is a skill published in the GitHub repository takashicompany/headlenss (5 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,387 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…