Context7 driven development

From VenTheZone/pi-dots · View interactive version

Context7 driven development is an AI agent skill from the GitHub repository VenTheZone/pi-dots. Use when implementing features or debugging issues that involve external libraries, frameworks, or APIs. Always verify with Context7 before writing code.

How to use this skill

Skill file

Context7-Driven Development

Overview

Never assume you know the API. Always verify before writing code.

Tool Priority Order

Use tools in this order based on what's available locally:

1. Local Files (Fastest - use when code exists on disk)

read /path/to/file          # Read specific files
grep -rn "pattern" dir/     # Search code patterns
find . -name "*.ts"         # Find files by name
bash "ls -la dir/"          # Quick directory listing

Use when: Repo is cloned, you're working in a project, or files are in /tmp

2. Exa Web Search (For discovery & solutions)

exa_web_search_exa    → General web/code search
exa_crawling_exa      → Read specific URLs
exa_get_code_context_exa → Code examples & docs

Use when: Finding solutions, discovering repos, searching for error fixes, general web queries

3. Context7 (For official library documentation)

context7_resolve-library-id → Find library
context7_query-docs → Query specific docs

Use when: You need authoritative API docs for a known library

4. jcodemunch (For deep code analysis)

jcodemunch_index_repo → Index a repo for analysis
jcodemunch_search_symbols → Find symbols across codebase
jcodemunch_find_references → Find all usages
jcodemunch_get_dependency_graph → Analyze dependencies

Use when: Complex cross-reference analysis, find dead code, symbol importance

When to Use

Use Context7-Driven Development when:

Core Workflow

Implementation Workflow

  1. Check Local First
  1. Identify Dependencies
  1. Resolve Library IDs or Documentation Sources

```

context7_resolve-library-id(libraryName, query)

```

  1. Query Documentation

```

context7_query-docs(libraryId, "How to [specific operation]")

```

  1. Apply to Implementation

Debugging Workflow

  1. Reproduce & Isolate
  1. Search for Solutions
  1. Verify Fix

Clone-and-Explore Pattern

For deep inspection of external repos:

# Clone to /tmp for temporary analysis
git clone --depth 1 https://github.com/org/repo /tmp/repo

# Then use local tools
read /tmp/repo/src/important.ts
grep -rn "pattern" /tmp/repo/
find /tmp/repo -name "*.test.ts"

Clean up after: rm -rf /tmp/repo

Query Best Practices

| Bad Query | Good Query |

|-----------|------------|

| "auth" | "How to authenticate users with JWT in Express.js" |

| "hooks" | "React useEffect cleanup function examples" |

| "database" | "How to connect to PostgreSQL with Prisma ORM" |

| "error" | "Fix ECONNREFUSED in node-fetch retry logic" |

Red Flags - STOP and Query

Verification Checklist

Before submitting code:

Maximum Queries

Examples

Before (Hallucination Risk)

// Assuming API from memory - WRONG
const client = new SomeClient({ apiKey: process.env.KEY });
await client.doSomething({ option: "value" }); // Might not exist!

After (Docs-Driven)

// After querying Context7 for SomeClient API
// Learned: v2.0 changed constructor signature
const client = SomeClient.create({
  apiKey: process.env.KEY,
  region: "us-east-1" // Required in v2.0+
});
await client.executeAction({ option: "value" }); // Correct method name
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.