# Search Strategy

> 本事業所のソース（freee MCP・gh CLI・Discord Chrome自動操作）を対象とした検索戦略。クエリをソース別に分解し、並列実行して結果を統合する。

- Skill: `hikaruegashira/search-strategy` (Agent Skill)
- Install (CLI): `npx skillmds@latest add hikaruegashira/search-strategy`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hikaruegashira/search-strategy/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: HikaruEgashira (https://skillmd.com/u/hikaruegashira)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hikaruegashira/search-strategy

---


# Search Strategy（検索戦略）

本事業所で利用可能なソースは **freee**（MCP）・**GitHub**（gh CLI）・**Discord**（Chrome自動操作）の3系統。

## クエリタイプ別ソース選択

| クエリタイプ | 例 | 優先ソース |
|-----------|---|---------|
| **会計・経費** |「2月の売上は？」「未払経費は？」 | freee → GitHub Issue |
| **開発費・工数** | 「先月のPR数は？」「マイルストーン進捗は？」 | GitHub → freee |
| **経費申請状況** | 「承認待ちの経費は？」 | freee |
| **請求・入金** | 「未入金の請求書は？」 | freee |
| **タスク・Issue** | 「バックオフィスのオープンIssueは？」 | GitHub |
| **コミュニティ** | 「Discordのメンバー数は？」「チャンネルの最新投稿は？」 | Discord（Chrome自動操作） |

## ソース別クエリ変換

### freee

```
# 日付範囲の取引
mcp__freee__freee_api_get path="/api/1/deals"
  company_id=<id>
  start_issue_date=YYYY-MM-DD
  end_issue_date=YYYY-MM-DD

# 勘定科目で絞り込み（試算表）
mcp__freee__freee_api_get path="/api/1/trial_balance"
  company_id=<id>
  fiscal_year=YYYY
  start_month=M
  end_month=M

# 承認待ち経費
mcp__freee__freee_api_get path="/api/1/expense_applications"
  company_id=<id>
  status=in_progress

# 未入金請求書
mcp__freee__freee_api_get path="/api/1/invoices"
  company_id=<id>
  payment_status=unsettled
```

### GitHub（gh CLI）

```bash
# キーワード検索
gh issue list --repo Nat-bee/accounting --search "<keyword>" --json number,title,state,labels,assignees

# ラベルで絞り込み
gh issue list --repo Nat-bee/accounting --label "backoffice" --json number,title,state

# PR一覧（マージ済み含む）
gh pr list --repo Nat-bee/accounting --state all --json number,title,state,mergedAt,author

# マイルストーン進捗
gh api repos/Nat-bee/accounting/milestones --jq '.[] | {title, open_issues, closed_issues}'

# Issue詳細（コメント含む）
gh issue view <number> --repo Nat-bee/accounting --json title,body,comments,labels
```

### Discord（Chrome自動操作）

```
# 事前準備
1. mcp__claude-in-chrome__tabs_context_mcp でタブ確認
2. discord.com が開いていなければ mcp__claude-in-chrome__navigate で開く

# チャンネル読み取り
mcp__claude-in-chrome__navigate  url="https://discord.com/channels/<guild_id>/<channel_id>"
mcp__claude-in-chrome__get_page_text  → テキスト全文取得

# キーワード検索
mcp__claude-in-chrome__navigate  url="https://discord.com/channels/<guild_id>"
mcp__claude-in-chrome__find      query="search bar"
mcp__claude-in-chrome__computer  action=type  text="<keyword>"
mcp__claude-in-chrome__read_page → 検索結果取得
```

## 並列実行

freee・GitHub・Discordは独立しているため、可能な限り並列で検索する。

```
[ユーザークエリ]
       ↓ 分解
[freee クエリ]  [GitHub クエリ]  [Discord クエリ]
       ↓              ↓                ↓
              （並列実行）
                    ↓
       [結果マージ・重複排除・統合回答]
```

※ Discord Chrome操作はブラウザ起動が必要。未起動の場合はfreee/GitHubのみ先行して返答し、Discordは後続で取得する。

## 結果なしの場合のフォールバック

1. freeeで結果なし → 検索期間を広げる / 勘定科目の絞り込みを外す
2. GitHubで結果なし → `--state all` でクローズ済みIssueも対象にする
3. Discordで結果なし → 別チャンネルを確認 / 検索キーワードを変える
4. 全て結果なし → クエリをユーザーに確認し言い換えを提案

