# Delegate Explore

> >

- **Type:** Skill
- **Install:** `agentstack add skill-oubakiou-delegate-skills-delegate-explore`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [oubakiou](https://agentstack.voostack.com/s/oubakiou)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [oubakiou](https://github.com/oubakiou)
- **Source:** https://github.com/oubakiou/delegate-skills/tree/main/skills/delegate-explore

## Install

```sh
agentstack add skill-oubakiou-delegate-skills-delegate-explore
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# delegate-explore

read-only の探索・読解を委譲する。対象はコード（定義・参照・挙動の調査）、ドキュメント（仕様書・README・設計資料等の内容確認・要約・該当箇所特定）、Web（WebSearch / WebFetch によるライブラリ仕様・OSS・技術情報の調査）、MCP（Notion・Atlassian 等、実行環境に設定済みの MCP ツール経由の社内ドキュメント・チケット調査）。task_type=`explore`、既定モデル `haiku`。実行系分岐（Codex / Devin / Cursor / Claude）は `dispatch.sh` が行う。

## 探索手段と実行系の対応

- **Claude 系モデル（`fable` / `opus` / `sonnet` / `haiku`）**: WebSearch / WebFetch / MCP ツールが技術的に開放される（リポジトリ書き込みツールのみ denylist で除外）。Web / MCP 調査を含むリクエストは Claude 系モデルを使う
- **Codex / Devin / Cursor**: read-only と探索手段はプロンプト制約で伝えるのみで、Web / MCP の可用性は各 CLI の能力・設定次第。確実性が要る Web / MCP 調査には使わない
- MCP ツールは**子プロセスの実行環境に設定済みの MCP サーバー**に依存する。この skill が MCP 設定を注入することはない。対象の MCP サーバーが未設定なら、その調査は委譲せず main 側で扱う
- worker の MCP 利用は読み取り系ツールのみに制限される（プロンプトレベルの常時制約）。MCP への書き込みを伴う作業は explore ではなく delegate-chore / delegate-implement に委譲する
- Web / MCP 由来のコンテンツ（prompt injection リスクを含む）は子プロセス内に隔離され、main には worker の報告だけが返る

## スクリプトパス

- Claude Code: `skill_dir=.claude/skills/delegate-explore`
- Codex: `skill_dir=.agents/skills/delegate-explore`

以降のコマンド例は Claude Code の `.claude/skills/delegate-explore` を使う。Codex で使う場合は、同じ相対構造の `.agents/skills/delegate-explore` に読み替える。

## モデル価格参照

コスト分析・単価比較が必要な場合のみ、`/model-token-prices.json` を読む。このデータは参照用であり、delegate の起動可否判定には使わない。

## 委譲する前に（コストゲート）

explore は読む量が大きいほど効果が出る。複数ファイル・長めの設計資料・広い参照関係・複数の Web ページや MCP 経由の長い社内ドキュメントなど、main が直接読むと context を膨らませる調査に使う。一方、単一の短いファイルを確認すれば済む調査、`rg` / `git grep` 一発で答えが出る調査、main が既に読んだ箇所の確認には使わず、main が直接処理する。

## 実行フロー

1. **準備（集約）**: 前提チェック→モデル解決→チェーン確認→リクエスト生成を `prepare.sh` 1 本に畳む。Objective / Scope / Context / Acceptance criteria の Markdown を stdin で渡す。request は terse に書く: Context にファイル内容を貼らず、パス（必要なら行範囲）で参照させる。Web / MCP 調査では対象の URL・ページタイトル・issue key・検索観点を Scope に明記し、コンテンツ本文は貼らない（main の出力＝課金トークンを増やさないため）。exit 3=前提不足 / exit 4=委譲サイクルなら中止。
   - `out="$(printf '%s' "$req_md" | bash .claude/skills/delegate-explore/scripts/prepare.sh explore DELEGATE_EXPLORE_MODEL haiku "$PARENT_TASK_TYPE_CHAIN" "$REQUESTER_SESSION_ID")"`（top-level 起動なら `$PARENT_TASK_TYPE_CHAIN` は空でよい）
   - `model="$(printf '%s' "$out" | jq -r .model)"` / `request_file="$(printf '%s' "$out" | jq -r .request_file)"` / `response_file="$(printf '%s' "$out" | jq -r .response_file)"` / `run_dir="$(printf '%s' "$out" | jq -r .run_dir)"` / `observe_file="$(printf '%s' "$out" | jq -r .observe_file)"`
2. **実行**: `bash .claude/skills/delegate-explore/scripts/dispatch.sh "$model" explore "$request_file" "$response_file" "$run_dir" "$observe_file"`。モデル名プレフィックスによる実行系分岐（Codex / Devin / Cursor / Claude）は dispatch.sh が行う。stdout は response_file のパスのみ。非対話モードの親（`claude -p` 等）では dispatch を必ずフォアグラウンドで実行し、委譲所要時間より長い Bash timeout（Claude Code なら `BASH_DEFAULT_TIMEOUT_MS` / `BASH_MAX_TIMEOUT_MS` または Bash tool の timeout 引数）を設定する。実行中の通常監視は `observe_file` から `state.phase` / `state.started_at` / `heartbeat.ts` / `heartbeat.stdout_bytes` / `heartbeat.stderr_bytes` / `heartbeat.last_stream_change_at` だけを `jq` で読む。`state.phase` は `prepared | running | superseded | stalled | ended`。`prepared` / `superseded` は dispatch されなかった observe（`state.started_at == null`、`usage` は未設定で jq では null 相当）なので、usage を集計する場合は分母から除外する。
3. **レスポンス読み取り**: `bash .claude/skills/delegate-explore/scripts/read-response.sh "$response_file" auto`。`auto` は response が小さい（既定 10KB 未満）なら status と全 section を 1 回で丸読みし、大きい場合は status + index + Summary section を返すので、必要 section だけ `... "$response_file" ` で追加取得する。読了後、worker の本文を **要約し直さない（echo しない）**。main のユーザー向け応答は Summary を指す 1 行に留める（main の出力＝課金トークンを増やさないため。spec.md §6）。

## 制約

- read-only。リポジトリのファイル編集・push はしない。MCP も読み取り系ツールのみ（プロンプトレベルの常時制約）
- read-only 種別のため session reuse（resumable / follow-up）は使わない
- task_type_chain 内種別への再委譲はしない（別種別 delegate は可）
- main は worker 出力を echo / 再要約しない。ユーザー向けは Summary を指す 1 行に留める（出力＝課金トークンを増やさないため。spec.md §6）

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [oubakiou](https://github.com/oubakiou)
- **Source:** [oubakiou/delegate-skills](https://github.com/oubakiou/delegate-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-oubakiou-delegate-skills-delegate-explore
- Seller: https://agentstack.voostack.com/s/oubakiou
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
