MCP HubMCP Hub
スキル一覧に戻る

context7-usage

majiayu000
更新日 Today
26 閲覧
58
9
58
GitHubで表示
ドキュメントwordmcp

について

このスキルは、正確なライブラリドキュメントを取得するためのContext7 MCPの使用パターンを提供します。ライブラリの特定、正確なソースIDの解決、ターゲットを絞ったガイダンスのクエリ方法を開発者に指南し、必要に応じてMiniMaxへのフォールバックも用意しています。ウェブスクレイピングの代わりに、迅速かつ信頼性の高いドキュメント検索にご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/majiayu000/claude-skill-registry
Git クローン代替
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/context7-usage

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

ultrathink - Take a deep breath. We're not here to write code. We're here to make a dent in the universe.

The Vision

Documentation retrieval should be precise, fast, and authoritative.

Your Work, Step by Step

  1. Identify library: Extract from the user’s request.
  2. Resolve ID: Use Context7 to find the exact source.
  3. Query: Ask for targeted, actionable guidance.
  4. Fallback: Use MiniMax when Context7 lacks coverage.

Ultrathink Principles in Practice

  • Think Different: Prefer indexed docs over scraping.
  • Obsess Over Details: Ensure the right library ID.
  • Plan Like Da Vinci: Define the query before running it.
  • Craft, Don't Code: Return only relevant excerpts.
  • Iterate Relentlessly: Re-query for clarity.
  • Simplify Ruthlessly: Avoid unnecessary searches.

Context7 MCP Usage Patterns

Overview

Context7 MCP provides indexed documentation for popular libraries and frameworks. It's more efficient than web scraping because it uses pre-indexed, structured documentation.

Available Tools

ToolPurposeParameters
mcp__plugin_context7_context7__resolve-library-idFind Context7 library IDlibraryName, query
mcp__plugin_context7_context7__query-docsQuery documentationlibraryId, query

Usage Pattern

# Step 1: Resolve library ID
mcp__plugin_context7_context7__resolve-library-id:
  libraryName: "React"  # Extract from user query
  query: "useTransition hook usage"  # Full query for ranking

# Step 2: Query docs with resolved ID
mcp__plugin_context7_context7__query-docs:
  libraryId: "/vercel/next.js"  # From step 1
  query: "How to use useTransition hook"

Decision Tree

Is this about a library/framework?
|
+-- YES --> Is it in Context7?
|   |
|   +-- YES --> Use Context7 MCP
|   |   1. resolve-library-id
|   |   2. query-docs
|   |
|   +-- NO --> Fallback to MiniMax MCP
|
+-- NO --> Use WebSearch (native) or MiniMax MCP

Supported Libraries (Examples)

Frontend

  • React (/facebook/react)
  • Next.js (/vercel/next.js)
  • Vue.js (/vuejs/vue)
  • Angular (/angular/angular)
  • Svelte (/sveltejs/svelte)

Languages

  • TypeScript (/microsoft/TypeScript)
  • JavaScript (MDN)

Backend

  • Node.js (/nodejs/node)
  • Express (/expressjs/express)
  • Fastify (/fastify/fastify)

CSS/UI

  • Tailwind CSS (/tailwindlabs/tailwindcss)
  • Chakra UI (/chakra-ui/chakra-ui)

Databases

  • PostgreSQL
  • MongoDB (/mongodb/docs)
  • Redis

Cost Optimization

ApproachToken UsageQuality
Context7~50% lessHigh (official docs)
Web SearchBaselineVariable
MiniMaxBaselineHigh

Why Context7 saves tokens:

  • Pre-indexed documentation
  • Structured responses
  • No web scraping overhead
  • Focused, relevant content

Integration with Ralph Loop

# CLI usage
ralph library "React 19 useTransition"
ralph lib "Next.js 15 app router"
ralph docs "TypeScript generics"

# Slash command
/library-docs React hooks best practices

Fallback Strategy

If Context7 doesn't have the library:

  1. Log warning: "Library not found in Context7"
  2. Fallback to mcp__MiniMax__web_search
  3. Return results from MiniMax

Best Practices

  1. Extract library name first - Parse user query to identify the library
  2. Use full query for ranking - Pass complete query to resolve-library-id
  3. Handle not-found gracefully - Always have MiniMax fallback ready
  4. Combine with code examples - Request code snippets in your prompt

GitHub リポジトリ

majiayu000/claude-skill-registry
パス: skills/context7-usage

関連スキル

content-collections

メタ

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

スキルを見る

cloudflare-turnstile

メタ

This skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.

スキルを見る

llamaindex

メタ

LlamaIndex is a data framework for building RAG-powered LLM applications, specializing in document ingestion, indexing, and querying. It provides key features like vector indices, query engines, and agents, and supports over 300 data connectors. Use it for document Q&A, chatbots, and knowledge retrieval when building data-centric applications.

スキルを見る

canvas-design

メタ

The canvas-design skill generates original visual art in PNG and PDF formats for creating posters, designs, and other static artwork. It operates through a two-step process: first creating a design philosophy document, then visually expressing it on a canvas. The skill focuses on original compositions using form, color, and space while avoiding copyright infringement by never copying existing artists' work.

スキルを見る