Communitygithub.com

ドキュメントルックアップ (Context7)

Context7 MCPを使って、トレーニングデータではなく最新のライブラリ・フレームワークのドキュメントを参照します。セットアップの質問、APIリファレンス、コード例、フレームワーク名(例:React, Next.js, Prisma)がユーザーから出た際に有効化されます。

ドキュメントルックアップ (Context7) とは?

このスキルは、Context7 MCPサーバーを介してライブラリ、フレームワーク、APIの最新ドキュメントを動的に取得することで、AIエージェントがトレーニングデータに依存せず正確な回答を提供できるようにします。主に `resolve-library-id` と `query-docs` の2つのツールで構成され、まずライブラリ名とユーザーの質問からContext7互換のライブラリIDを解決し、次にそのIDを使って具体的な質問に対するドキュメントやコードスニペットを取得します。このスキルは、Claude Code、Cursor、CodexなどContext7 MCPが設定されているすべての環境で動作し、セットアップ手順、APIリファレンス、ライブラリに依存するコード例など、最新の挙動が求められる質問に特に有効です。また、一度の質問につき最大3回のツール呼び出しに制限されており、バージョン指定や公式ソースの優先、機密データの除去といったベストプラクティスに従うことで、信頼性の高い最新情報を提供します。

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

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

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

ドキュメント

ドキュメントルックアップ (Context7) は何をしますか?

ユーザーがライブラリ、フレームワーク、APIについて質問した場合、トレーニングデータに頼らず、Context7 MCP(ツール resolve-library-id と query-docs)を介して最新のドキュメントを取得します。

コアコンセプト

  • Context7: ライブドキュメントを公開するMCPサーバーです。ライブラリやAPIについてはトレーニングデータの代わりにこれを使用します。
  • resolve-library-id: ライブラリ名とクエリから、Context7互換のライブラリID(例:/vercel/next.js)を返します。
  • query-docs: 指定されたライブラリIDと質問に対して、ドキュメントとコードスニペットを取得します。有効なライブラリIDを取得するため、必ず最初にresolve-library-idを呼び出してください。

いつ使うか

以下の場合に有効化します:

  • ユーザーがセットアップや設定に関する質問をする(例:「Next.jsのミドルウェアを設定するには?」)
  • ライブラリに依存するコードを要求する(「Prismaで○○のクエリを書いて」)
  • APIやリファレンス情報が必要である(「Supabaseの認証メソッドは何ですか?」)
  • 特定のフレームワークやライブラリに言及する(React, Vue, Svelte, Express, Tailwind, Prisma, Supabase など)

このスキルは、リクエストがライブラリ、フレームワーク、APIの正確で最新の動作に依存する場合に使用してください。Context7 MCPが設定されているすべての環境(例:Claude Code、Cursor、Codex)で適用されます。

仕組み

ステップ 1:ライブラリIDを解決する

resolve-library-id MCPツールを以下のパラメータで呼び出します:

  • libraryName: ユーザーの質問から抽出したライブラリまたは製品名(例:Next.js、Prisma、Supabase)。
  • query: ユーザーの質問全体。これにより結果の関連性ランキングが向上します。

ドキュメントを問い合わせる前に、Context7互換のライブラリID(形式:/org/project または /org/project/version)を取得する必要があります。このステップで有効なライブラリIDを取得せずにquery-docsを呼び出さないでください。

ステップ 2:最適な一致を選択する

解決結果から、以下の基準で1つの結果を選びます:

  • 名前の一致: ユーザーが尋ねたものと完全一致または最も近いものを優先します。
  • ベンチマークスコア: スコアが高いほどドキュメント品質が良いことを示します(100が最高)。
  • ソースの評判: 可能であれば評判がHighまたはMediumのソースを優先します。
  • バージョン: ユーザーがバージョンを指定した場合(例:「React 19」「Next.js 15」)、バージョン固有のライブラリID(例:/org/project/v1.2.0)がリストにあればそれを優先します。

ステップ 3:ドキュメントを取得する

query-docs MCPツールを以下のパラメータで呼び出します:

  • libraryId: ステップ2で選択したContext7ライブラリID(例:/vercel/next.js)。
  • query: ユーザーの具体的な質問やタスク。関連性の高いスニペットを得るために具体的にしてください。

制限:1つの質問につき、query-docs(またはresolve-library-id)を3回以上呼び出さないでください。3回の呼び出し後も答えが不明確な場合は、その不確実性を述べ、推測するのではなく持っている最良の情報を使用してください。

ステップ 4:ドキュメントを活用する

  • 取得した最新情報を使ってユーザーの質問に回答します。
  • 役立つ場合は、ドキュメントから関連するコード例を含めます。
  • 重要な場合はライブラリやバージョンを引用します(例:「Next.js 15では...」)。

例

例:Next.js ミドルウェア

  1. resolve-library-id を libraryName: "Next.js"、query: "Next.js ミドルウェアを設定するには?" で呼び出します。
  2. 結果から、名前とベンチマークスコアに基づいて最適な一致(例:/vercel/next.js)を選びます。
  3. query-docs を libraryId: "/vercel/next.js"、query: "Next.js ミドルウェアを設定するには?" で呼び出します。
  4. 返されたスニペットとテキストを使って回答します。関連性があれば、ドキュメントの最小限の middleware.ts の例を含めます。

例:Prisma クエリ

  1. resolve-library-id を libraryName: "Prisma"、query: "リレーションを使ってクエリするには?" で呼び出します。
  2. 公式の Prisma ライブラリID(例:/prisma/prisma)を選択します。
  3. その libraryId とクエリで query-docs を呼び出します。
  4. ドキュメントの短いコードスニペットと共に、Prisma Client のパターン(例:include や select)を返します。

例:Supabase 認証メソッド

  1. resolve-library-id を libraryName: "Supabase"、query: "認証メソッドは何ですか?" で呼び出します。
  2. Supabase ドキュメントのライブラリIDを選びます。
  3. query-docs を呼び出します。取得したドキュメントから認証メソッドを要約し、最小限の例を示します。

ベストプラクティス

  • 具体的に: 可能な限りユーザーの質問全体をクエリとして使用し、関連性を高めます。
  • バージョン認識: ユーザーがバージョンに言及した場合、解決ステップでバージョン固有のライブラリIDが利用可能であればそれを使用します。
  • 公式ソースを優先: 複数の一致がある場合、コミュニティフォークよりも公式またはプライマリパッケージを優先します。
  • 機密データを含めない: Context7 に送信するクエリから API キー、パスワード、トークン、その他のシークレットを編集します。resolve-library-id や query-docs に渡す前に、ユーザーの質問にシークレットが含まれている可能性があるものとして扱います。

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.

関連スキル