contextkit

Use ContextKit CLI to intelligently select code context for LLM prompts. Use when you need to find relevant code chunks for a query, index a codebase for semantic search, or optimize context for token budgets. Triggers on "find relevant code", "select context", "index codebase", "semantic code search", "optimize context window", or when preparing code context for AI assistants.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "contextkit" with this command: npx skills add milo4jo/contextkit/milo4jo-contextkit-contextkit

ContextKit

Intelligent context selection for LLM applications. Stop dumping your entire codebase into AI prompts.

Install

npm install -g @milo4jo/contextkit

Quick Start

# Initialize in project root
contextkit init

# Add source directories
contextkit source add ./src

# Build the index (creates local embeddings)
contextkit index

# Find relevant context for a query
contextkit select "How does authentication work?"

Commands

init

Initialize ContextKit in current directory. Creates .contextkit/ folder with config and database.

contextkit init

source

Manage source directories to index.

contextkit source add ./src
contextkit source add ./lib --name "Library Code"
contextkit source list
contextkit source remove ./src

index

Build or update the semantic index. Processes files into chunks and generates embeddings locally.

contextkit index
contextkit index --force  # Re-index everything

select

Find relevant code chunks for a query. Returns formatted context ready for LLM prompts.

contextkit select "How does the payment flow work?"
contextkit select "authentication" --budget 4000  # Token budget
contextkit select "database queries" --format markdown

Options:

  • --budget <tokens>: Maximum tokens to return (default: 8000)
  • --format <type>: Output format (markdown|plain|json)
  • --top <n>: Maximum chunks to return

status

Show index status and statistics.

contextkit status

MCP Server

ContextKit includes an MCP server for Claude Desktop integration.

Setup

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "contextkit": {
      "command": "contextkit-mcp"
    }
  }
}

Available Tools

  • contextkit_select: Find relevant context for a query
  • contextkit_index: Rebuild the codebase index
  • contextkit_status: Check index status

Best Practices

  1. Index frequently changed code: Re-run contextkit index after significant changes
  2. Use specific queries: "How does JWT validation work?" beats "authentication"
  3. Adjust token budget: Match your model's context window minus other content
  4. Combine with manual context: Use ContextKit output alongside specific files you know are relevant

Typical Workflow

# Before asking Claude about your codebase:
contextkit select "your question here" | pbcopy

# Then paste into your prompt alongside the question

Or with MCP: Claude automatically calls contextkit_select when it needs code context.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated