Context7

Use MCP Context7 to access up-to-date library documentation before adding dependencies.

11 stars

Best use case

Context7 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use MCP Context7 to access up-to-date library documentation before adding dependencies.

Teams using Context7 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/context7/SKILL.md --create-dirs "https://raw.githubusercontent.com/hivellm/rulebook/main/templates/skills/modules/context7/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/context7/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Context7 Compares

Feature / AgentContext7Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use MCP Context7 to access up-to-date library documentation before adding dependencies.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

<!-- CONTEXT7:START -->
# Context7 Instructions

**CRITICAL**: Use MCP Context7 to access up-to-date library documentation before adding dependencies.

## Core Functions

### 1. resolve-library-id
Resolve a package name to Context7-compatible library ID:
```
resolve-library-id("tokio") → "/tokio-rs/tokio"
resolve-library-id("react") → "/facebook/react"
```

### 2. get-library-docs
Fetch documentation with optional topic filter:
```
get-library-docs("/tokio-rs/tokio", topic="async")
```

## Workflow

**Before adding ANY dependency:**
```
1. resolve-library-id(library_name)
2. get-library-docs(library_id) 
3. Check latest version and security
4. Add dependency with correct version
5. Document choice in commit
```

**Before updating major version:**
```
1. get-library-docs for current version
2. get-library-docs for target version
3. Review breaking changes
4. Plan migration
```

## Best Practices

✅ **DO:**
- Always check Context7 before adding dependencies
- Use topic parameter for specific info
- Document version choices
- Review security advisories

❌ **DON'T:**
- Add dependencies without checking latest version
- Skip migration guides on major updates
- Ignore security warnings

<!-- CONTEXT7:END -->