context7-aware-coding

Fetch Context7 library documentation before writing external API calls.

2|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/iadr-dev/colab --skill context7-aware-coding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context7-aware-coding
Source: https://github.com/iadr-dev/colab/tree/main/skills/context7-aware-coding
Command: npx skills add https://github.com/iadr-dev/colab --skill context7-aware-coding

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents AI-generated code from using incorrect, outdated, or hallucinated external library APIs by forcing real-time documentation lookup (with cross-session caching) before any external library call is written.

Core Features & Use Cases

  • Doc-first API correctness: Requires identifying the library and exact API, then using fetched signatures instead of memory.
  • Cross-session research cache: Checks .ohc/research/ for hits (reducing re-fetching) and saves Context7 results (including version and payload) on misses.
  • Context7 + research mode: Enables normal Context7 queries first, with an optional research-mode retry (when a Context7 API key is available) and explicit fallbacks when docs can’t be found.

Use case: While building a Next.js feature that calls Prisma with cursor pagination, the agent will look up the correct Prisma method and parameter order, then write the code using the fetched signature instead of guessing.

Quick Start

Ask your agent to: "Use context7 /prisma/prisma to find the exact cursor-pagination API signature and then implement it in my code without guessing parameter names."

Frequently Asked Questions about context7-aware-coding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI hallucinations when writing code with external library APIs?

To prevent AI hallucinations with external library APIs, use a doc-first approach that fetches real documentation before code generation. This enforces accurate method names, parameter order, and version compatibility using actual fetched signatures instead of guessed memory.

How do I ensure correct parameter order and method names for dependencies like Prisma?

Ensure correct parameter order and method names for dependencies like Prisma by fetching exact API signatures via Context7. This doc-first lookup validates required fields and version compatibility before implementation, preventing incorrect code generation.

Does context7-aware-coding work with backend and infrastructure libraries?

Yes, context7-aware-coding works with backend and infrastructure libraries. It applies to implementation tasks across web, backend, AI/LLM, and infrastructure stacks where code correctness depends on precise method names and version compatibility.

How do I cache Context7 fetched API signatures to reduce re-fetching?

Cache Context7 fetched API signatures to reduce re-fetching by checking the `.ohc/research/` directory first. On cache misses or stale hits, fetch fresh signatures, then save them with version and payload metadata for future cross-session lookups.

What happens when documentation is unavailable during a Context7 lookup?

When documentation is unavailable during a Context7 lookup, the system uses explicit fallbacks and never silently guesses. It attempts an optional research-mode retry if an API key is available, ensuring API correctness without hallucinating method signatures.

What is the best way to implement cursor pagination in Next.js without guessing Prisma parameters?

The best way to implement cursor pagination in Next.js without guessing Prisma parameters is to fetch the exact API signature using Context7. This doc-first approach retrieves the correct method and parameter order before writing the implementation code.