/context-engine
Performs hybrid semantic/lexical search with neural reranking for codebase retrieval. Use for finding implementations, Q&A grounded in source code, and cross-session persistent memory.
$ npx -y skills add Context-Engine-AI/Context-Engine --skill context-engine --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/context-engine
Context preview
The summary Claude sees to decide when to auto-load this skill.
Performs hybrid semantic/lexical search with neural reranking for codebase retrieval. Use for finding implementations, Q&A grounded in source code, and cross-session persistent memory.
SKILL.md
context-engine.SKILL.mdname: context-engine
description: Performs hybrid semantic/lexical search with neural reranking for codebase retrieval. Use for finding implementations, Q&A grounded in source code, and cross-session persistent memory.
Context-Engine
Search and retrieve code context from any codebase using hybrid vector search (semantic + lexical) with neural reranking.
Client- or provider-specific wrapper files should stay thin and defer to this document for shared MCP tool-selection and search guidance.
Quickstart
1. Start with `search` for most codebase questions. 2. Use `symbol_graph` first for direct symbol relationships such as callers, definitions, importers, subclasses, and base classes. 3. Use `graph_query` only if that tool is available and you need transitive impact, dependency, or cycle analysis; otherwise combine `symbol_graph` with targeted search. 4. Prefer MCP tools for exploration. Narrow grep/file-open use is still fine for exact literal confirmation, exact file/path confirmation, or opening a file you already identified for editing. 5. Use `cross_repo_search` for multi-repo questions. For public V1 `context_search`, treat `include_memories=true` as compatibility-only: it preserves response shape but keeps results code-only and may add `memory_note`.
Decision Tree: Choosing the Right Tool
What do you need?
|
+-- UNSURE or GENERAL QUERY --> search (RECOMMENDED DEFAULT)
| |
| +-- Auto-detects intent and routes to the best tool
| +-- Handles: code search, Q&A, tests, config, symbols, imports
| +-- Use this when you don't know which specialized tool to pick
|
+-- Find code locations/implementations
| |
| +-- Unsure what tool to use → search (DEFAULT - routes to repo_search if needed)
| +-- Speed-critical or complex filters → repo_search (skip routing overhead)
| +-- Want LLM explanation → context_answer
|
+-- Understand how something works
| |
| +-- Want LLM explanation --> search OR context_answer
| +-- Just code snippets --> search OR repo_search with include_snippet=true
|
+-- Find similar code patterns (retry loops, error handling, etc.)
| |
| +-- Have code example --> pattern_search with code snippet (if enabled)
| +-- Describe pattern --> pattern_search with natural language (if enabled)
|
+-- Find specific file types
| |
| +-- Test files --> search OR search_tests_for
| +-- Config files --> search OR search_config_for
|
+-- Find relationships
| |
| +-- Direct callers/defs/importers/inheritance --> search OR symbol_graph
| +-- Multi-hop callers --> symbol_graph (depth=2+)
| +-- Deep impact/dependencies/cycles --> graph_query (if available) OR symbol_graph + targeted search
|
+-- Git history
| |
| +-- Find commits --> search_commits_for
| +-- Predict co-changing files --> search_commits_for with predict_related=true
|
+-- Store/recall knowledge --> memory_store, memory_find
|
+-- Preserve public search shape while accepting memory flags --> context_search with include_memories=true (compatibility-only in V1)
|
+-- Multiple independent searches at once
|
+-- batch_search (runs N repo_search calls in one invocation, ~75% token savings)Standard Parameters Reference
All SaaS-exposed tools organize parameters into families with consistent naming and behavior.
Family 1: Code Search Tools
**Applies to:** `search`, `repo_search`, `code_search`, `batch_search`, `info_request`, `context_search`
**Standard Parameters:**
| Parameter | Type | Required? | Default | Purpose | |-----------|------|-----------|---------|---------| | `query` | string or string[] | YES | — | Single query OR array of queries for fusion | | `language` | string | optional | (auto-detect) | Filter by language: "python", "typescript", "go", etc. | | `under` | string | optional | (root) | Path prefix filter, e.g., "src/api/" or "tests/" | | `path_glob` | string[] | optional | (all) | Include patterns: `["**/*.ts", "lib/**"]` | | `not_glob` | string[] | optional | (none) | Exclude patterns: `["**/test_*", "**/*_test.*"]` | | `symbol` | string | optional | (all) | Filter by symbol name (function, class, variable) | | `kind` | string | optional | (all) | AST node type: "function", "class", "method", "variable" | | `ext` | string | optional | (all) | File extension: "py", "ts", "go" (alias for language) | | `repo` | string or string[] | optional | (default) | Repository filter: single repo OR list OR "*" for all | | `limit` | int | optional | 10 | Max results to return (1-100) | | `include_snippet` | bool | optional | true | Include code snippets in results | | `compact` | bool | optional | false | Strip verbose fields from response | | `output_format` | string | optional | "json" | "json" (structured) OR "toon" (token-efficient) | | `rerank_enabled` | bool | optional | true | Enable neural reranking (default ON) | | `case` | string | optional | (insensitive) | "sensitive" for case-sensitive matching | | `context_lines` | int | optional | 2 | Lines of context around matches | | `per_path` | int | optional | 2 | Max results per file |
**Standard Constraints:**
- `limit` max 100 (higher values slow queries)
- `query` max 400 characters / 50 words
- `language` must be valid code language or auto-detection will fail silently
- `path_glob` / `not_glob` support glob patterns (*, **, ?)
- Multiple `query` terms are fused via Reciprocal Rank Fusion (RRF) for better recall
Family 2: Symbol Graph Tools
**Applies to:** `symbol_graph`, `batch_symbol_graph`, `graph_query`, `batch_graph_query`
**Standard Parameters:**
| Parameter | Type | Required? | Default | Purpose | |-----------|------|-----------|---------|---------| | `symbol` | string | YES | — | Sym
Read more
name: context-engine description: Performs hybrid semantic/lexical search with neural reranking for codebase retrieval. Use for finding implementations, Q&A grounded in source code, and cross-session persistent memory.
Context-Engine
Search and retrieve code context from any codebase using hybrid vector search (semantic + lexical) with neural reranking.
Client- or provider-specific wrapper files should stay thin and defer to this document for shared MCP tool-selection and search guidance.
Quickstart
1. Start with `search` for most codebase questions. 2. Use `symbol_graph` first for direct symbol relationships such as callers, definitions, importers, subclasses, and base classes. 3. Use `graph_query` only if that tool is available and you need transitive impact, dependency, or cycle analysis; otherwise combine `symbol_graph` with targeted search. 4. Prefer MCP tools for exploration. Narrow grep/file-open use is still fine for exact literal confirmation, exact file/path confirmation, or opening a file you already identified for editing. 5. Use `cross_repo_search` for multi-repo questions. For public V1 `context_search`, treat `include_memories=true` as compatibility-only: it preserves response shape but keeps results code-only and may add `memory_note`.
Decision Tree: Choosing the Right Tool
What do you need?
|
+-- UNSURE or GENERAL QUERY --> search (RECOMMENDED DEFAULT)
| |
| +-- Auto-detects intent and routes to the best tool
| +-- Handles: code search, Q&A, tests, config, symbols, imports
| +-- Use this when you don't know which specialized tool to pick
|
+-- Find code locations/implementations
| |
| +-- Unsure what tool to use → search (DEFAULT - routes to repo_search if needed)
| +-- Speed-critical or complex filters → repo_search (skip routing overhead)
| +-- Want LLM explanation → context_answer
|
+-- Understand how something works
| |
| +-- Want LLM explanation --> search OR context_answer
| +-- Just code snippets --> search OR repo_search with include_snippet=true
|
+-- Find similar code patterns (retry loops, error handling, etc.)
| |
| +-- Have code example --> pattern_search with code snippet (if enabled)
| +-- Describe pattern --> pattern_search with natural language (if enabled)
|
+-- Find specific file types
| |
| +-- Test files --> search OR search_tests_for
| +-- Config files --> search OR search_config_for
|
+-- Find relationships
| |
| +-- Direct callers/defs/importers/inheritance --> search OR symbol_graph
| +-- Multi-hop callers --> symbol_graph (depth=2+)
| +-- Deep impact/dependencies/cycles --> graph_query (if available) OR symbol_graph + targeted search
|
+-- Git history
| |
| +-- Find commits --> search_commits_for
| +-- Predict co-changing files --> search_commits_for with predict_related=true
|
+-- Store/recall knowledge --> memory_store, memory_find
|
+-- Preserve public search shape while accepting memory flags --> context_search with include_memories=true (compatibility-only in V1)
|
+-- Multiple independent searches at once
|
+-- batch_search (runs N repo_search calls in one invocation, ~75% token savings)Standard Parameters Reference
All SaaS-exposed tools organize parameters into families with consistent naming and behavior.
Family 1: Code Search Tools
**Applies to:** `search`, `repo_search`, `code_search`, `batch_search`, `info_request`, `context_search`
**Standard Parameters:**
| Parameter | Type | Required? | Default | Purpose | |-----------|------|-----------|---------|---------| | `query` | string or string[] | YES | — | Single query OR array of queries for fusion | | `language` | string | optional | (auto-detect) | Filter by language: "python", "typescript", "go", etc. | | `under` | string | optional | (root) | Path prefix filter, e.g., "src/api/" or "tests/" | | `path_glob` | string[] | optional | (all) | Include patterns: `["**/*.ts", "lib/**"]` | | `not_glob` | string[] | optional | (none) | Exclude patterns: `["**/test_*", "**/*_test.*"]` | | `symbol` | string | optional | (all) | Filter by symbol name (function, class, variable) | | `kind` | string | optional | (all) | AST node type: "function", "class", "method", "variable" | | `ext` | string | optional | (all) | File extension: "py", "ts", "go" (alias for language) | | `repo` | string or string[] | optional | (default) | Repository filter: single repo OR list OR "*" for all | | `limit` | int | optional | 10 | Max results to return (1-100) | | `include_snippet` | bool | optional | true | Include code snippets in results | | `compact` | bool | optional | false | Strip verbose fields from response | | `output_format` | string | optional | "json" | "json" (structured) OR "toon" (token-efficient) | | `rerank_enabled` | bool | optional | true | Enable neural reranking (default ON) | | `case` | string | optional | (insensitive) | "sensitive" for case-sensitive matching | | `context_lines` | int | optional | 2 | Lines of context around matches | | `per_path` | int | optional | 2 | Max results per file |
**Standard Constraints:**
- `limit` max 100 (higher values slow queries)
- `query` max 400 characters / 50 words
- `language` must be valid code language or auto-detection will fail silently
- `path_glob` / `not_glob` support glob patterns (*, **, ?)
- Multiple `query` terms are fused via Reciprocal Rank Fusion (RRF) for better recall
Family 2: Symbol Graph Tools
**Applies to:** `symbol_graph`, `batch_symbol_graph`, `graph_query`, `batch_graph_query`
**Standard Parameters:**
| Parameter | Type | Required? | Default | Purpose | |-----------|------|-----------|---------|---------| | `symbol` | string | YES | — | Sym

