feat: update tools with better skill/agent format prompt

This commit is contained in:
Fahreddin Özcan
2026-01-14 19:03:43 +03:00
parent 24cec23cf1
commit 32f2cdbe0c
4 changed files with 142 additions and 137 deletions

View File

@@ -1,28 +1,45 @@
---
description: Fetch up-to-date documentation and code examples for any library
description: Look up documentation for any library
argument-hint: <library> [query]
---
# Context7 Documentation Lookup
# /context7:docs
Fetch current, version-specific documentation from source repositories.
Fetches up-to-date documentation and code examples for a library.
## Arguments
## Usage
`$ARGUMENTS` = `<library> [query]`
```
/context7:docs <library> [query]
```
- First word: library name (or direct library ID starting with `/`)
- Remaining: your specific question or topic
- **library**: The library name, or a Context7 ID starting with `/`
- **query**: What you're looking for (optional but recommended)
Examples:
- `react hooks`
- `next.js authentication`
- `/vercel/next.js/v15.1.8 app router`
## Examples
## Steps
```
/context7:docs react hooks
/context7:docs next.js authentication
/context7:docs prisma relations
/context7:docs /vercel/next.js/v15.1.8 app router
/context7:docs /supabase/supabase row level security
```
1. Parse arguments: first word = library, remaining = query
2. If library starts with `/`, use it directly as library ID
3. Otherwise, call `resolve-library-id` with library name and query
4. Call `query-docs` with the library ID and query
5. Present documentation with code examples
## How It Works
1. If the library starts with `/`, it's used directly as the Context7 ID
2. Otherwise, `resolve-library-id` finds the best matching library
3. `query-docs` fetches documentation relevant to your query
4. Results include code examples and explanations
## Version-Specific Lookups
Include the version in the library ID for pinned documentation:
```
/context7:docs /vercel/next.js/v15.1.8 middleware
/context7:docs /facebook/react/v19.0.0 use hook
```
This is useful when you're working with a specific version and want docs that match exactly.