Communitygithub.com

documentation-lookup

Context7 MCPを使用して、最新のライブラリやフレームワークのドキュメントを参照します。セットアップ方法、APIリファレンス、コード例など、トレーニングデータに頼らずに正確な情報を提供します。

documentation-lookup とは?

Documentation Lookup (Context7) スキルは、Claude Code、Cursor、CodexなどのAIエージェントが、トレーニングデータに含まれない最新のライブラリ・フレームワークドキュメントを参照できるようにするスキルです。ユーザーがReact、Next.js、Prisma、Supabaseなどのフレームワークに言及した際に、Context7 MCPサーバーが提供する`resolve-library-id`ツールと`query-docs`ツールを利用して、常に最新のAPIリファレンス、セットアップ手順、コード例を取得します。このスキルは、ライブラリの正確で最新の動作に依存する質問に対して必須であり、トレーニングデータに基づく推測を防ぎます。具体的なワークフローは、まずライブラリ名とユーザーのクエリからContext7互換のライブラリID(例:`/vercel/next.js`)を解決し、次にそのIDを使ってドキュメントを取得します。質問あたり最大3回のツール呼び出し制限があり、取得した情報をもとに回答を生成し、必要に応じてコードスニペットを提示します。

対応✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

関連スキル