agentleFS
valtterimelkkovaltterimelkko/agent-workflow-skills/skills/context7-docs/SKILL.md

context7-docs

Skill2 starsChanged 43 days agoMITView on GitHub

Fetch up-to-date documentation from Context7 for a library. Use when you need current API syntax, code examples, or official documentation for any library or framework.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 12
  2. Very specific:

    Use context7-search to find the correct library ID

    line 155
  3. Very specific:

    Verify CONTEXT7_API_KEY is available in your environment or shell startup file

    line 163
  4. Distinctive:

    Check key is valid

    line 164
  5. Very specific:

    Try code first: - Default --type code gives practical examples

    line 169
  6. Very specific:

    Check versions: - Use --version for version-specific syntax

    line 171

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fetch Library Documentation from Context7

Fetch real-time, version-specific documentation and code examples for libraries.

When to Use

Use this skill when:

  • User needs current API documentation for a library
  • You need up-to-date syntax examples (your training data may be outdated)
  • User asks "show me how to use X" or "what's the latest syntax for Y"
  • Implementing features with a specific library
  • Troubleshooting library usage issues

Prerequisites

  1. Context7 API key available via CONTEXT7_API_KEY in the environment or a shell startup file such as ~/.bashrc (the bundled scripts can read either)
  2. Library ID in owner/repo format (use context7-search first if unknown)

How to Execute

Fetch Code Examples (Default)

python3 ./scripts/fetch_docs.py --library "owner/repo"

Fetch Topic-Focused Documentation

python3 ./scripts/fetch_docs.py --library "owner/repo" --topic "TOPIC"

Fetch Documentation Info (Instead of Code)

python3 ./scripts/fetch_docs.py --library "owner/repo" --type info

Fetch Specific Version

python3 ./scripts/fetch_docs.py --library "owner/repo" --version "v15.1.8"

Parameters

ParameterRequiredDefaultDescription
--libraryYes-Library in owner/repo format
--topicNo-Focus on specific feature/topic
--typeNocodecode for snippets, info for docs
--versionNolatestSpecific version tag
--pageNo1Page number for pagination

Examples

Fetch Next.js Routing Examples

python3 ./scripts/fetch_docs.py \
  --library "vercel/next.js" \
  --topic "routing"

Fetch Prisma PostgreSQL Setup

python3 ./scripts/fetch_docs.py \
  --library "prisma/prisma" \
  --topic "postgresql connection"

Fetch React Hooks Documentation

python3 ./scripts/fetch_docs.py \
  --library "facebook/react" \
  --topic "hooks" \
  --type info

Fetch Specific Version

python3 ./scripts/fetch_docs.py \
  --library "vercel/next.js" \
  --version "v14.3.0" \
  --topic "app router"

Response Format

{
  "success": true,
  "data": {
    "library": "vercel/next.js",
    "topic": "routing",
    "type": "code",
    "content": {
      "content": "### Dynamic Route Handler\n\nSource: ...\n\n```typescript\nexport async function GET(...) {...}\n```\n\n---\n\n### Another Example\n..."
    }
  }
}

Common Library IDs

LibraryIDCommon Topics
Next.jsvercel/next.jsrouting, server components, api routes
Reactfacebook/reacthooks, state, context, suspense
Prismaprisma/prismasetup, queries, relations, migrations
Supabasesupabase/supabaseauth, realtime, row level security
FastAPIfastapi/fastapirouting, validation, dependencies
Expressexpressjs/expressmiddleware, routing, error handling
Tailwindtailwindlabs/tailwindcssconfiguration, utilities, plugins

Workflow Examples

Example 1: Unknown Library

User: "How do I set up authentication with Supabase?"

1. Search for library (if ID unknown):
   python3 ./scripts/resolve_library.py --query "supabase"
   → Returns supabase/supabase

2. Fetch focused documentation:
   python3 ./scripts/fetch_docs.py \
     --library "supabase/supabase" \
     --topic "authentication"

Example 2: Known Library

User: "Show me the latest Next.js routing API"

Fetch directly (skip search):
   python3 ./scripts/fetch_docs.py \
     --library "vercel/next.js" \
     --topic "app router"

Error Handling

Library not found (404):

  • Use context7-search to find the correct library ID
  • Format must be owner/repo (e.g., vercel/next.js)

Topic not matched:

  • Try broader topic keywords
  • Omit topic entirely to get general documentation

Authentication error:

  • Verify CONTEXT7_API_KEY is available in your environment or shell startup file
  • Check key is valid

Best Practices

  1. Use specific topics - Get focused results with --topic
  2. Try code first - Default --type code gives practical examples
  3. Use info for concepts - --type info for documentation/explanations
  4. Check versions - Use --version for version-specific syntax

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.