MCP HubMCP Hub
スキル一覧に戻る

context7-skill

majiayu000
更新日 Yesterday
24 閲覧
58
9
58
GitHubで表示
メタwordai

について

Context7スキルは、Context7のデータベースから直接、バージョン固有のドキュメントとコード例を提供し、開発者がライブラリやフレームワークの詳細を確認できるようにします。主なアクセス方法は、`resolve_library_id`や`query_docs`などのMCPツールを介して行われ、直接ツールが利用できない場合にはCLIフォールバックスクリプトが用意されています。このスキルを使用して、サードパーティ依存関係に対する正確なAPI構文と使用パターンをコードが参照していることを確認してください。

クイックインストール

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-skill

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

ドキュメント

Context7 Skill

Overview

The Context7 skill connects you to accurate, version-specific documentation and code examples directly from the source. Use this skill to verify syntax, API details, and usage patterns for third-party libraries and frameworks, ensuring your code is based on the correct version.

Access Methods:

  1. MCP Tools (Primary): Direct calls to resolve_library_id and query_docs.
  2. CLI Fallback (Secondary): A Python script (scripts/context7_cli.py) using the FastMCP v2 client, intended for use when direct MCP tools are unavailable.

Prerequisites

  • Context7 API Key: Must be set as the environment variable CONTEXT7_API_KEY.
  • Python Manager (uv): Required only if using the CLI fallback script.

Available Tools

1. Library Resolver (resolve-library-id)

Resolves a package or library name to a Context7-compatible library ID and returns a list of matches.

  • MCP Call: resolve_library_id(query="...", libraryName="...")
  • CLI Command: uv run scripts/context7_cli.py resolve-library-id <name>

2. Documentation Query (query-docs)

Retrieves documentation and code examples using a specific library ID.

  • MCP Call: query_docs(libraryId="/org/project/version", query="...")
  • CLI Command: uv run scripts/context7_cli.py query-docs <library_id> <query>

IMPORTANT: Tool names may have prefixes (e.g., context7_resolve_library_id) depending on the runtime environment. Always check available tools first.

Usage Guidelines

  1. Resolve First: Always obtain a valid library ID via resolve_library_id before querying, unless the user provides a full ID (e.g., /org/project/version).
  2. Limit Attempts: Do not retry a tool call more than three times for the same query. If unsuccessful, proceed with the best available information.

Workflow

Step 1: Check Availability

Determine if the resolve_library_id and query_docs tools are directly available in your environment. If not, default to the CLI fallback commands.

Step 2: Resolve Library ID

Use resolve-library-id to identify the correct library.

Selection Criteria:

  • Exact Match: Prioritize names that exactly match the user's request.
  • Relevance: Ensure the description aligns with the user's intent.
  • Quality: Look for high documentation coverage (snippet counts), reputation, and benchmark scores.

Action:

  • If ambiguous, ask the user for clarification.
  • Briefly explain the selected library to the user.
  • If no good match is found, clearly state this and suggest query refinements.

Step 3: Query Documentation

Use query-docs with the resolved libraryId.

Handling Results:

  • The tool returns a snippet or summary.
  • Example Output:
    Source: https://github.com/context7/react_dev/blob/main/learn.md
    ... (content) ...
    
  • Insufficient Info? If the returned text is incomplete, use a web fetch tool (if available) to retrieve the full content from the provided source URL.

Configuration

VariableDescriptionRequired
CONTEXT7_API_KEYAPI key for authenticating with Context7.Yes

Resources

  • scripts/context7_cli.py: Unified CLI entry point for fallback access.
  • references/troubleshooting.md: Solutions for common integration issues.

GitHub リポジトリ

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

関連スキル

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.

スキルを見る

evaluating-llms-harness

テスト

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

スキルを見る

sglang

メタ

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

スキルを見る

langchain

メタ

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

スキルを見る