Communitygithub.com

search-first

コードを書く前に調査を行うワークフロー。既存のツール、ライブラリ、パターンを検索してからカスタムコードを作成します。リサーチャーエージェントを起動します。

search-first とは?

このスキルは、コーディング前に徹底的な調査を実施する「リサーチ・ファースト」のワークフローを提供します。新しい機能開発や依存関係の追加、ユーティリティ作成の前に、npm/PyPI、MCPサーバー、GitHub、スキルディレクトリなどの複数のチャネルを並行検索することで、既存ソリューションの再利用を促進します。Claude Code、Cursor、CodexなどのAIエージェント環境で動作し、`search-first` という名前でリサーチャーエージェントを呼び出します。検索結果は機能性、メンテナンス状況、コミュニティ、ドキュメント、ライセンス、依存関係で評価され、採用/拡張/構成/新規構築の4つの選択肢から最適な判断を下します。これにより、車輪の再発明を防ぎ、プロダクション品質のソリューションを迅速に実装できます。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/search-first

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

/search-first — コードを書く前に調査する

「既存の解決策を探してから実装する」ワークフローを体系化します。

トリガー

以下の場合にこのスキルを使用します:

  • 既存の解決策が存在しそうな新機能を開始する場合
  • 依存関係や統合を追加する場合
  • ユーザーが「X機能を追加して」と依頼し、コードを書き始めようとしている場合
  • 新しいユーティリティ、ヘルパー、抽象化を作成する前

ワークフロー

┌─────────────────────────────────────────────┐
│  0. ツール可用性事前チェック                │
│     検索チャネルが利用可能かを確認          │
│     利用不可なら正直にスキップを報告        │
├─────────────────────────────────────────────┤
│  1. ニーズ分析                              │
│     必要な機能を定義                        │
│     言語/フレームワークの制約を特定          │
├─────────────────────────────────────────────┤
│  2. 並列検索 (リサーチャーエージェント)      │
│     ┌──────────┐ ┌──────────┐ ┌──────────┐  │
│     │ npm /    │ │ MCP /    │ │ GitHub / │  │
│     │ PyPI     │ │ スキル   │ │ Web      │  │
│     └──────────┘ └──────────┘ └──────────┘  │
├─────────────────────────────────────────────┤
│  3. 評価                                    │
│     候補をスコアリング (機能性、メンテナンス、│
│     コミュニティ、ドキュメント、ライセンス、 │
│     依存関係)                               │
├─────────────────────────────────────────────┤
│  4. 判断                                    │
│     ┌─────────┐  ┌──────────┐  ┌─────────┐  │
│     │ そのまま│  │ 拡張/    │  │ カスタム│  │
│     │ 採用    │  │ ラップ   │  │ 構築    │  │
│     └─────────┘  └──────────┘  └─────────┘  │
├─────────────────────────────────────────────┤
│  5. 実装                                    │
│     パッケージのインストール / MCPの設定 /   │
│     最小限のカスタムコードの記述             │
└─────────────────────────────────────────────┘

判断マトリクス

シグナルアクション
完全一致、メンテナンス良好、MIT/Apacheライセンス採用 — そのままインストールして使用
部分一致、良い基盤拡張 — インストール + 薄いラッパーを記述
複数の弱い一致構成 — 2~3つの小さなパッケージを組み合わせ
適切なものが見つからない構築 — 調査結果を参考にカスタムコードを記述

使い方

ステップ 0: ツール可用性事前チェック

これはエージェント向けのガイダンスであり、実行可能なセットアップスクリプトではありません。現在のタスクとプロジェクトに関連するチャネルのみをチェックします。

チャネル確認方法見つからない場合
リポジトリ検索rg --files と対象を絞った rg クエリ目に見えるファイルのみを調査したと報告
パッケージレジストリnpm --version、python -m pip --version、またはプロジェクトのパッケージマネージャーWeb/ドキュメント検索を使用し、レジストリのカバレッジは主張しない
GitHub CLIgh auth status公開Webまたはローカルのgit履歴のみを使用
MCP/ドキュメントツール利用可能なツールリストまたはローカルのMCP設定公式ドキュメント/Web検索にフォールバック
スキルディレクトリ該当する場合 ls ~/.claude/skills ~/.codex/skillsローカルスキルカタログが利用不可だったと報告

クイックモード(インライン)

ユーティリティを作成したり機能を追加する前に、頭の中で以下を実行します:

  1. これはリポジトリに既に存在するか? → まず関連モジュール/テストを rg で検索
  2. これは一般的な問題か? → npm/PyPI を検索
  3. これに対応するMCPはあるか? → ~/.claude/settings.json を確認して検索
  4. これに対応するスキルはあるか? → ~/.claude/skills/ を確認
  5. GitHubの実装/テンプレートはあるか? → 新しいコードを書く前に、メンテナンスされているOSSをGitHubコード検索で確認

フルモード(エージェント)

重要な機能の場合は、リサーチャーエージェントを起動します:

Agent(subagent_type="general-purpose", prompt="
  [説明] に対する既存ツールを調査:
  言語/フレームワーク: [言語]
  制約: [任意]

  検索対象: npm/PyPI、MCPサーバー、Claude Codeスキル、GitHub
  戻り値: 推奨事項付きの構造化比較
")

古いClaude Codeのドキュメントではこれを Task(...) と呼んでいる場合があります。現在のハーネスで公開されているエージェント/サブエージェントツール名を使用してください。

カテゴリ別検索ショートカット

開発ツール

  • リンティング → eslint、ruff、textlint、markdownlint
  • フォーマット → prettier、black、gofmt
  • テスト → jest、pytest、go test
  • プリコミット → husky、lint-staged、pre-commit

AI/LLM統合

  • Claude SDK → 最新ドキュメントはContext7を確認
  • プロンプト管理 → MCPサーバーを確認
  • ドキュメント処理 → unstructured、pdfplumber、mammoth

データとAPI

  • HTTPクライアント → httpx (Python)、ky/undici (Node)
  • バリデーション → zod (TS)、pydantic (Python)
  • データベース → 最初にMCPサーバーを確認

コンテンツと公開

  • Markdown処理 → remark、unified、markdown-it
  • 画像最適化 → sharp、imagemin

統合ポイント

プランナーエージェントとの連携

プランナーはフェーズ1(アーキテクチャレビュー)の前にリサーチャーを起動します:

  • リサーチャーが利用可能なツールを特定
  • プランナーがそれらを実装計画に組み込む
  • 計画における「車輪の再発明」を回避

アーキテクトエージェントとの連携

アーキテクトは以下についてリサーチャーに相談します:

  • 技術スタックの決定
  • 統合パターンの発見
  • 既存のリファレンスアーキテクチャ

反復検索スキルとの連携

プログレッシブな発見のために組み合わせる:

  • サイクル1: 広範な検索 (npm、PyPI、MCP)
  • サイクル2: 上位候補の詳細評価
  • サイクル3: プロジェクト制約との互換性テスト

例

例1: 「デッドリンクチェックを追加」

ニーズ: Markdownファイルの壊れたリンクをチェック
検索: npm "markdown dead link checker"
発見: textlint-rule-no-dead-link (スコア: 9/10)
アクション: 採用 — npm install textlint-rule-no-dead-link
結果: カスタムコードゼロ、実績のあるソリューション

例2: 「HTTPクライアントラッパーを追加」

ニーズ: リトライとタイムアウト処理を備えた堅牢なHTTPクライアント
検索: npm "http client retry"、PyPI "httpx retry"
発見: got (Node) にリトライプラグイン、httpx (Python) に組み込みリトライ
アクション: 採用 — got/httpxをリトライ設定で直接使用
結果: カスタムコードゼロ、プロダクション実績のあるライブラリ

例3: 「設定ファイルリンターを追加」

ニーズ: プロジェクト設定ファイルをスキーマに対して検証
検索: npm "config linter schema"、"json schema validator cli"
発見: ajv-cli (スコア: 8/10)
アクション: 採用 + 拡張 — ajv-cliをインストール、プロジェクト固有のスキーマを記述
結果: 1パッケージ + 1スキーマファイル、カスタム検証ロジックなし

アンチパターン

  • いきなりコードを書く: 既存のものがあるか確認せずにユーティリティを作成する
  • MCPを無視する: MCPサーバーが既に機能を提供しているか確認しない
  • 黙ってスキップする: 検索チャネルが利用不可だったのに「何も見つからなかった」と報告する
  • 過剰カスタマイズ: ライブラリをラップしすぎてメリットを損なう
  • 依存関係の肥大化: 小さな機能一つに巨大なパッケージをインストールする

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

関連スキル