agentleFS
alebgl77alebgl77/claude-inc/skills/context7/SKILL.md

context7

Skill21 starsChanged 4 months agoMITView on GitHub

Anti-hallucination protocol for library APIs — resolves the exact installed version from the lockfile, fetches current official docs (Context7 MCP if installed, web fetch otherwise), quotes the doc before writing any code, and pins the version in output. Use when code touches a fast-moving library (Next.js, React, LangChain, Prisma, Tailwind), when the user says "check the actual docs" or "what's the current API for X", or after any deprecation or breaking-change error.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use mermaid-diagrams, vercel-react-best-practices and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LangChainSkill

    mermaid-diagrams

    Embed Mermaid diagrams in generated wiki pages. Use whenever documenting a runtime or request flow, a call sequence, a state machine or lifecycle, a data model or entity relationships, or non-trivial control flow, since these are clearer as a diagram than as prose. Also use when an update run touches a page that already contains a mermaid fence, or a page that contains a text fence a previous run degraded.

    Also in 3 projects that use this

  • VercelSkill

    vercel-react-best-practices

    React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

    Also in 4 projects that use this

  • OpenAISkill

    writing-skills

    Use when creating new skills, editing existing skills, or verifying skills work before deployment

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 5 projects that use this

  • VercelSkill

    agent-browser

    Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

    Also in 3 projects that use this

  • OpenAISkill

    verification-before-completion

    Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before adding a dependency — verify the current install command and quickstart, not remembered ones

    line 18
  2. Distinctive:

    Write the code against the quoted signature, exactly.

    line 26
  3. Distinctive:

    If lockfile and docs disagree (docs describe a newer API), surface it: ship code for the installed version plus the upgrade path.

    line 28
  4. Distinctive:

    If the doc page covers multiple versions, confirm the version selector matches the installed one before quoting.

    line 29
  5. Distinctive:

    No network at all? Say so loudly, mark the code UNVERIFIED, and list exactly which signatures must be checked before merge.

    line 30
  6. Distinctive:

    Ask: "Add streaming to our LangChain chat endpoint."

    line 58
  7. Very specific:

    Run: lockfile shows langchain==0.3.14.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 24 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

Context7 — Docs Fetcher

"Live library docs"

Trained knowledge ages; your dependencies don't wait. The docs are the source of truth — memory is only a hint.

When to use

  • Writing code against fast movers — Next.js, React, LangChain, Prisma, Tailwind — where trained knowledge is stale by default
  • "Check the actual docs before you write this" / "is this still the right API in v15?"
  • "This worked in v4 but breaks in v5" — any deprecation warning or breaking-change error
  • Choosing between API generations — "app router or pages router way?"
  • Before adding a dependency — verify the current install command and quickstart, not remembered ones

Workflow

  1. List the libraries the task touches and flag fast movers (any project with major releases in the past year).
  2. Resolve the exact installed version from the lockfile — package-lock.json, pnpm-lock.yaml, yarn.lock, poetry.lock, uv.lock, Cargo.lock, go.sum. Grep the lockfile itself; never trust manifest ranges or memory.
  3. Fetch current docs for that version. Optional upgrade: with the Context7 MCP server installed, call resolve-library-id then get-library-docs. Otherwise WebFetch/WebSearch the official docs, changelog, and migration guide — official sources only.
  4. Quote the relevant passage verbatim — signature, options, gotchas — before writing a single line of code.
  5. Write the code against the quoted signature, exactly; no extra parameters from memory.
  6. Pin the library and version in the output header; note any deprecations between installed and latest.
  7. If lockfile and docs disagree (docs describe a newer API), surface it: ship code for the installed version plus the upgrade path.
  8. If the doc page covers multiple versions, confirm the version selector matches the installed one before quoting.
  9. No network at all? Say so loudly, mark the code UNVERIFIED, and list exactly which signatures must be checked before merge.

Output format

Library: <name>@<exact version>   (source: <lockfile>)
Docs: <official URL or Context7 library ID>   (fetched <date>)

Doc quote:
> <verbatim excerpt covering every API surface used below>

Code:
<snippet that matches the quote>

Version notes: <deprecations, breaking changes, upgrade advice — or "none">

Quality bar

  • Version came from a lockfile, not a guess or a ^range
  • Doc passage quoted verbatim before code was written
  • Code uses only the quoted, verified surface — zero from-memory APIs
  • Library and version pinned in the output header
  • Source is official (docs, changelog, repo) with fetch date recorded
  • Docs-vs-lockfile disagreements surfaced with an upgrade path

Example

Ask: "Add streaming to our LangChain chat endpoint."

Run: lockfile shows langchain==0.3.14; 0.3 docs fetched; quoted the astream_events signature and event schema; wrote the endpoint against it; flagged the deprecated alternative and the migration notes.

Library: langchain==0.3.14   (source: uv.lock)
Docs: python.langchain.com/docs/how_to/streaming   (fetched 2026-07-11)
Doc quote: > "astream_events(version='v2') yields event dicts with event, name, data"
Version notes: astream_log deprecated in 0.3; event payload keys renamed in 0.4

Credits

Inspired by Upstash Context7.

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.