context-engine
Skill3 starsChanged 9 months agoMITView on GitHub
Codebase search and context retrieval for any programming language. Hybrid semantic/lexical search with neural reranking. Use for code lookup, finding implementations, understanding codebases, Q&A grounded in source code, and persistent memory across sessions.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- relote-com/omarchy-context-enginetheir own version, first seen Nov 8, 2026
- Context-Engine-AI/Context-Enginetheir own version, first seen Oct 25, 2026
- teachskillofskills-ai/DigitalMarketingPro-techshutheir own version, first seen Oct 11, 2026
- 2867203296/hermes-agenttheir own version, first seen Aug 19, 2026
- Hassaan146/claude-skillstheir own version, first seen Jul 25, 2026
Used with
Projects with it also use andreessen, business-investment-advisor and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Hussain-ElfalahSkillandreessen
Also in 4 projects that use this
Hussain-ElfalahSkillbusiness-investment-advisor
Also in 4 projects that use this
csiddhant796-blipSkillkarpathy-coder
Use when writing, reviewing, or committing code to enforce Karpathy's 4 coding principles — surface assumptions before coding, keep it simple, make surgical changes, define verifiable goals. Triggers on "review my diff", "check complexity", "am I overcomplicating this", "karpathy check", "before I commit", or any code quality concern where the LLM might be overcoding.
Also in 4 projects that use this
- +9 more from Hussain-Elfalah
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- indranilbanerjee/digital-marketing-pro★ 934same name
- Context-Engine-AI/Context-Engine★ 400same name
- Hassaan146/claude-skills★ 18same name
- relote-com/omarchy-context-engine★ 4same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- mahiunfiltered/claude-code-skills★ 1same name
- 2867203296/hermes-agent★ 0same name
- darkweb19/skills★ 0same name
- teachskillofskills-ai/DigitalMarketingPro-techshu★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 6 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Search and retrieve code context from any codebase using hybrid vector search (semantic + lexical) with neural reranking.
- Very specific: line 50
Use repo_search (or its alias code_search) for most code lookups.
- Very specific: line 96
Use repo: "*" to search all indexed repos.
- Very specific: line 112
Use info_request for natural language queries with minimal parameters:
- Very specific: line 130
Use context_answer when you need an LLM-generated explanation grounded in code:
- Distinctive: line 244
If there are no graph hits, it falls back to semantic search.
- Distinctive: line 246
search_commits_for: - Search git history:
- Very specific: line 258
Use memory_store to persist information for later retrieval:
- Very specific: line 266
Use memory_find to retrieve stored knowledge by similarity:
- Very specific: line 271
Use context_search to blend code results with stored memories:
- Distinctive: line 296
qdrant_prune: - Remove deleted files from index:
- Distinctive: line 301
qdrant_status: - Check index health:
- Distinctive: line 359
Use the primary tools when possible.
- Very specific: line 370
Collection not found: - Run qdrant_index_root to create the index
- Very specific: line 379
Store decisions: - Use memory_store to save architectural decisions and context for later
- Very specific: line 380
Check index health: - Run qdrant_status if searches return unexpected results
- Very specific: line 381
Prune after refactors: - Run qdrant_prune after moving/deleting files
- Very specific: line 382
Index before search: - Always run qdrant_index_root on first use or after cloning a repo
- Very specific: line 383
Use pattern_search for structural matching: - When looking for code with similar control flow (retry loops, error handling), use …
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context-Engine
Search and retrieve code context from any codebase using hybrid vector search (semantic + lexical) with neural reranking.
Decision Tree: Choosing the Right Tool
What do you need?
|
+-- Find code locations/implementations
| |
| +-- Simple query --> info_request
| +-- Need filters/control --> repo_search
|
+-- Understand how something works
| |
| +-- Want LLM explanation --> context_answer
| +-- Just code snippets --> 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_tests_for
| +-- Config files --> search_config_for
|
+-- Find relationships
| |
| +-- Who calls this function --> search_callers_for
| +-- Who imports this module --> search_importers_for
| +-- Symbol graph navigation (callers/defs/importers) --> symbol_graph
|
+-- Git history --> search_commits_for
|
+-- Store/recall knowledge --> memory_store, memory_find
|
+-- Blend code + notes --> context_search with include_memories=truePrimary Search: repo_search
Use repo_search (or its alias code_search) for most code lookups. Reranking is ON by default.
{
"query": "database connection handling",
"limit": 10,
"include_snippet": true,
"context_lines": 3
}Returns:
{
"results": [
{"score": 3.2, "path": "src/db/pool.py", "symbol": "ConnectionPool", "start_line": 45, "end_line": 78, "snippet": "..."}
],
"total": 8,
"used_rerank": true
}Multi-query for better recall - pass a list to fuse results:
{
"query": ["auth middleware", "authentication handler", "login validation"]
}Apply filters to narrow results:
{
"query": "error handling",
"language": "python",
"under": "src/api/",
"not_glob": ["**/test_*", "**/*_test.*"]
}Search across repos:
{
"query": "shared types",
"repo": ["frontend", "backend"]
}Use repo: "*" to search all indexed repos.
Available Filters
language- Filter by programming languageunder- Path prefix (e.g., "src/api/")path_glob- Include patterns (e.g., ["/*.ts", "lib/"])not_glob- Exclude patterns (e.g., ["**/test_*"])symbol- Symbol name matchkind- AST node type (function, class, etc.)ext- File extensionrepo- Repository filter for multi-repo setupscase- Case-sensitive matching
Simple Lookup: info_request
Use info_request for natural language queries with minimal parameters:
{
"info_request": "how does user authentication work"
}Add explanations:
{
"info_request": "database connection pooling",
"include_explanation": true
}Q&A with Citations: context_answer
Use context_answer when you need an LLM-generated explanation grounded in code:
{
"query": "How does the caching layer invalidate entries?",
"budget_tokens": 2000
}Returns an answer with file/line citations. Use expand: true to generate query variations for better retrieval.
Pattern Search: pattern_search (Optional)
Note: This tool may not be available in all deployments. If pattern detection is disabled, calls return
{"ok": false, "error": "Pattern search module not available"}.
Find structurally similar code patterns across all languages. Accepts either code examples or natural language descriptions—auto-detects which.
Code example query - find similar control flow:
{
"query": "for i in range(3): try: ... except: time.sleep(2**i)",
"limit": 10,
"include_snippet": true
}Natural language query - describe the pattern:
{
"query": "retry with exponential backoff",
"limit": 10,
"include_snippet": true
}Cross-language search - Python pattern finds Go/Rust/Java equivalents:
{
"query": "if err != nil { return err }",
"language": "go",
"limit": 10
}Explicit mode override - force code or description mode:
{
"query": "error handling",
"query_mode": "description",
"limit": 10
}Key parameters:
query- Code snippet OR natural language descriptionquery_mode-"code","description", or"auto"(default)language- Language hint for code examples (python, go, rust, etc.)limit- Max results (default 10)min_score- Minimum similarity threshold (default 0.3)include_snippet- Include code snippets in resultscontext_lines- Lines of context around matchesaroma_rerank- Enable AROMA structural reranking (default true)aroma_alpha- Weight for AROMA vs original score (default 0.6)target_languages- Filter results to specific languages
Returns:
{
"ok": true,
"results": [...],
"total": 5,
"query_signature": "L2_2_B0_T2_M0",
"query_mode": "code",
"search_mode": "aroma"
}The query_signature encodes control flow: L (loops), B (branches), T (try/except), M (match).
Specialized Search Tools
search_tests_for - Find test files:
{"query": "UserService", "limit": 10}search_config_for - Find config files:
{"query": "database connection", "limit": 5}search_callers_for - Find callers of a symbol:
{"query": "processPayment", "language": "typescript"}search_importers_for - Find importers:
{"query": "utils/helpers", "limit": 10}symbol_graph - Symbol graph navigation (callers / definition / importers):
{"symbol": "ASTAnalyzer", "query_type": "definition", "limit": 10}{"symbol": "get_embedding_model", "query_type": "callers", "under": "scripts/", "limit": 10}{"symbol": "qdrant_client", "query_type": "importers", "limit": 10}Notes:
- Uses indexed metadata fields (
metadata.calls,metadata.imports,metadata.symbol,metadata.symbol_path). - Supports
language,under, andoutput_formatlike other tools. - If there are no graph hits, it falls back to semantic search.
search_commits_for - Search git history:
{"query": "fixed authentication bug", "limit": 10}change_history_for_path - File change summary:
{"path": "src/api/auth.py", "include_commits": true}Memory: Store and Recall Knowledge
Use memory_store to persist information for later retrieval:
{
"information": "Auth service uses JWT tokens with 24h expiry. Refresh tokens last 7 days.",
"metadata": {"topic": "auth", "date": "2024-01"}
}Use memory_find to retrieve stored knowledge by similarity:
{"query": "token expiration", "limit": 5}Use context_search to blend code results with stored memories:
{
"query": "authentication flow",
"include_memories": true,
"per_source_limits": {"code": 6, "memory": 3}
}Index Management
qdrant_index_root - First-time setup or full reindex:
{}With recreate (drops existing data):
{"recreate": true}qdrant_index - Index only a subdirectory:
{"subdir": "src/"}qdrant_prune - Remove deleted files from index:
{}qdrant_status - Check index health:
{}qdrant_list - List all collections:
{}Workspace Tools
workspace_info - Get current workspace and collection:
{}list_workspaces - List all indexed workspaces:
{}collection_map - View collection-to-repo mappings:
{"include_samples": true}set_session_defaults - Set defaults for session:
{"collection": "my-project", "language": "python"}Query Expansion
expand_query - Generate query variations for better recall:
{"query": "auth flow", "max_new": 2}Output Formats
json(default) - Structured outputtoon- Token-efficient compressed format
Set via output_format parameter.
Aliases and Compat Wrappers
Aliases:
code_search=repo_search(identical behavior)
Cross-server tools:
memory_store/memory_find— Memory server tools for persistent knowledge
Compat wrappers accept alternate parameter names:
repo_search_compat- Acceptsq,text,top_kas aliasescontext_answer_compat- Acceptsq,textas aliases
Use the primary tools when possible. Compat wrappers exist for legacy clients.
Error Handling
Tools return structured errors, typically via error field and sometimes ok: false:
{"ok": false, "error": "Collection not found. Run qdrant_index_root first."}
{"error": "Timeout during rerank"}Common issues:
- Collection not found - Run
qdrant_index_rootto create the index - Empty results - Broaden query, check filters, verify index exists
- Timeout on rerank - Set
rerank_enabled: falseor reducelimit
Best Practices
- Start broad, then filter - Begin with a semantic query, add filters if too many results
- Use multi-query - Pass 2-3 query variations for better recall on complex searches
- Include snippets - Set
include_snippet: trueto see code context in results - Store decisions - Use
memory_storeto save architectural decisions and context for later - Check index health - Run
qdrant_statusif searches return unexpected results - Prune after refactors - Run
qdrant_pruneafter moving/deleting files - Index before search - Always run
qdrant_index_rooton first use or after cloning a repo - Use pattern_search for structural matching - When looking for code with similar control flow (retry loops, error handling), use
pattern_searchinstead ofrepo_search(if enabled) - Describe patterns in natural language -
pattern_searchunderstands "retry with backoff" just as well as actual code examples (if enabled)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

