Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

exa-code-context

БесплатноЗапускает вложенные скриптыНе проверен

USE WHEN: needing real code examples from GitHub, finding API usage patterns, looking up framework setup, verifying library implementations, eliminating…

mahidalhanот mahidalhan★ 34 звезды на GitHub6 установок в других каталогах

Об этом скилле

Exa Code Context

Overview

Exa Code Context is a powerful tool for finding relevant code snippets and examples from the open source community. It searches over billions of GitHub repos, documentation pages, Stack Overflow posts, and more to find perfect, token-efficient context that helps write correct code.

This skill eliminates hallucinations in coding tasks by providing real, working code examples instead of made-up patterns.

When to Use This Skill

Use this skill when:

  • Looking for real-world usage examples of a library or framework
  • Need correct API syntax for a specific SDK or service
  • Setting up development environments or project configurations
  • Finding authentication, middleware, or architectural patterns
  • Understanding how to use specific programming language features
  • Searching for best practices and common implementations

Example triggers:

  • "How do I use React hooks for state management?"
  • "Show me FastAPI async endpoint examples with dependencies"
  • "What's the correct syntax for pandas dataframe filtering?"
  • "How to set up Next.js 14 app router with TypeScript?"
  • "Express.js middleware patterns for authentication"

Quick Start

The skill provides a Python script that interfaces with the Exa Context API:

from scripts.get_code_context import get_code_context

# Simple usage - automatic token optimization
result = get_code_context("React hooks for state management")
print(result["response"])

# Specify token count for more/less context
result = get_code_context("pandas dataframe filtering", tokens_num=5000)
print(result["response"])

Command-line usage:

python scripts/get_code_context.py "React hooks for state management"
python scripts/get_code_context.py "FastAPI async endpoints" 5000

Common Use Cases

1. Framework Usage

Find practical examples of how frameworks are used in real projects:

Query: "use Exa search in python and make sure content is always livecrawled"

Returns actual code showing:

  • Import statements
  • Configuration setup
  • Real usage patterns from open source projects

2. API Syntax

Get correct syntax for APIs and SDKs:

Query: "use correct syntax for vercel ai sdk to call gpt-5 nano asking it how are you"

Returns:

  • Current API syntax (not outdated)
  • Working code examples
  • Parameter configurations

3. Development Setup

Configure development environments correctly:

Query: "how to set up a reproducible Nix Rust development environment"

Returns:

  • Configuration files
  • Setup instructions with code
  • Working examples from real projects

4. Library Implementation

See how libraries are implemented in practice:

Query: "pandas dataframe filtering and groupby operations"

Returns:

  • Multiple code examples
  • Different approaches
  • Real-world usage patterns

5. Best Practices

Find authentication, security, and architectural patterns:

Query: "authentication patterns in NextJS applications"

Returns:

  • Current best practices
  • Complete implementations
  • Security considerations with code

Usage Examples

Example 1: React State Management

result = get_code_context("React hooks for state management examples")

# Returns formatted code snippets like:
# - useState examples with event handlers
# - Custom hooks for state management
# - Context API patterns
# - Real component implementations

Example 2: FastAPI Patterns

result = get_code_context("FastAPI async endpoints with dependencies", tokens_num=5000)

# Returns:
# - Async route handlers
# - Dependency injection patterns
# - Database session management
# - Authentication dependencies

Example 3: Database Patterns

result = get_code_context("PostgreSQL connection pooling best practices")

# Returns:
# - Connection pool configurations
# - Context manager patterns
# - Error handling examples
# - Performance optimization tips

Token Management

The skill supports flexible token management:

  • "dynamic" (default): Automatically determines optimal response length
  • 5000: Good default for most queries - provides comprehensive context
  • 10000: Use when 5k doesn't provide enough context
  • Custom: Any value between 50-100000

When to adjust tokens:

  • Use "dynamic" for most queries (recommended)
  • Use 5000 when you need a standard amount of context
  • Use 10000 for complex topics requiring more examples
  • Monitor costDollars in responses to track API usage

Best Practices

Writing Effective Queries

Good queries are specific and actionable:

  • ✅ "React hooks for state management"
  • ✅ "FastAPI async endpoints with dependencies"
  • ✅ "pandas dataframe filtering and groupby operations"

Avoid vague queries:

  • ❌ "React"
  • ❌ "Python web framework"
  • ❌ "database"

Query Formulation Tips

  1. Include the technology name: "React hooks" not just "hooks"
  2. Be specific about the task: "filtering and groupby" not just "pandas"
  3. Mention the context:
Полный SKILL.md на GitHub

Установить exa-code-context в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/api_reference.mdscripts/get_code_context.py

FAQ

Что делает скилл exa-code-context?

USE WHEN: needing real code examples from GitHub, finding API usage patterns, looking up framework setup, verifying library implementations, eliminating hallucinations with working code. DO NOT USE WHEN: working on proprietary code, questions about the current codebase, or when local context is sufficient. Requires Exa API key configured in environment.

Как установить скилл exa-code-context?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл exa-code-context запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить exa-code-context с