# Delegate X Research

> >

- **Type:** Skill
- **Install:** `agentstack add skill-oubakiou-delegate-skills-delegate-x-research`
- **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-x-research

## Install

```sh
agentstack add skill-oubakiou-delegate-skills-delegate-x-research
```

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

## About

# delegate-x-research

x.com / X の調査を、X 調査 capability を持つ子プロセスへ委譲する。task_type=`xresearch`、既定モデル `grok-build`。他 delegate と同じ request/response protocol v1 を使う。現在の実装バックエンドは Grok CLI で、`grok -p -m` へリクエストを渡す。

## スクリプトパス

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

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

## モデル価格参照

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

## 委譲する前に

この skill は、X 上の投稿・アカウント・スレッド・検索結果・直近の反応・コミュニティノートなど、Grok の X 調査能力を使う必要がある場合に使う。通常の Web ページ、リポジトリ内ドキュメント、コード調査だけで足りる場合は、main が直接処理するか `delegate-explore` を使う。

リクエストには、調査対象、期間、言語、地域、確認したい主張、必要な粒度、引用してよいソース種別を明記する。特に「最新」「今日」「昨日」などの相対日付は、request 作成時点の具体的な日付も併記する。

## 実行フロー

1. **準備**: Objective / Scope / Context / Acceptance criteria / Verification / Constraints の Markdown を stdin で渡す。exit 3=前提不足 / exit 4=委譲サイクルなら中止。
   - `out="$(printf '%s' "$req_md" | bash .claude/skills/delegate-x-research/scripts/prepare.sh xresearch DELEGATE_X_RESEARCH_MODEL grok-build "$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-x-research/scripts/delegate-x-research-grok.sh "$model" "$request_file" "$response_file" "$run_dir" "$observe_file"` で Grok CLI を起動する。Grok CLI は X / network access とローカルセッション状態を使うため、sandboxed requester では権限付き実行（Codex では `sandbox_permissions=require_escalated`）で起動する。非対話モードの親（`claude -p` 等）では子プロセス起動を必ずフォアグラウンドで実行し、委譲所要時間より長い 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-x-research/scripts/read-response.sh "$response_file" auto`。`auto` が大きな response と判定した場合は status + index + Summary section を返すので、Findings / Sources / Limitations / Blockers など必要 section だけ `... "$response_file" ` で追加取得する。読了後、worker の本文を再要約しない。main のユーザー向け応答は、必要な結論と参照すべき section を短く示す。
4. **検証フェーズ**: 重要な主張について、Sources に投稿URL・アカウント・投稿日時・確認時刻が含まれるか確認する。根拠が弱い箇所や Grok 側のアクセス制限は Limitations / Blockers として扱い、断定しない。

## Worker report

worker の report Markdown は次の見出しを基本にする。

- `Summary`: 結論の短い要約
- `Findings`: 主な発見。事実、推測、未確認情報を分ける
- `Sources`: x.com URL、投稿者、投稿日時、確認時刻、関連検索語
- `Method`: 検索語、確認した範囲、除外した情報
- `Limitations`: 非公開投稿、削除済み投稿、検索結果の偏り、取得不能、時点依存
- `Blockers`: Grok CLI 不在、ログイン不備、X へのアクセス不可、入力不足

## 制約

- `DELEGATE_X_RESEARCH_MODEL` → `grok-build` の順でモデル解決する
- Grok CLI が指定モデルを公開しておらず `grok-build` が利用可能な場合は、実行時に `grok-build` へフォールバックする
- `GROK_DELEGATE_SANDBOX` が設定された場合のみ Grok CLI に `--sandbox` を渡す
- 現在の実行バックエンドは Grok CLI。将来別バックエンドに差し替える場合も、skill 名と env 名は X 調査という用途に合わせる
- x.com / X の調査に集中する。Web 一般やコード調査へ広がる場合は、request の Scope に必要な範囲だけを書く
- 直近情報は確認日時を明記し、削除・編集・非公開化で変わり得ることを Limitations に残す
- task_type_chain 内種別への再委譲はしない（別種別 delegate は可）
- main は worker の探索ログを echo / 再要約しない。必要な結論と参照 section だけを返す

## 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-x-research
- 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%.
