Claude Context Local enables coding agents to search and reference an entire codebase as context. Operations teams benefit from faster code generation and reduced API costs. It integrates with Python-based workflows and supports Claude agents.
git clone https://github.com/FarhanAliRaza/claude-context-local.gitClaude Context Local is a semantic code search system that runs entirely on your machine using Google's EmbeddingGemma model. It integrates with Claude Code via MCP, allowing you to find code by meaning rather than string matching across Python, JavaScript, TypeScript, Go, Java, Rust, C, C++, and C# codebases. The tool uses intelligent AST-based and tree-sitter parsing to create semantically meaningful code chunks, then indexes them with FAISS for fast local similarity search. By keeping all embeddings and processing local, it eliminates API calls, reduces token usage in Claude prompts, and ensures your codebase never leaves your machine. This is especially valuable for teams managing large codebases who want to reduce API costs while maintaining code privacy.
["Identify the specific task or problem you need to solve in your codebase (e.g., 'Implement a caching layer for API responses').","Use the claude-context-local tool to search for relevant files, functions, or classes by specifying keywords or patterns (e.g., 'cache', 'memoization', 'Redis').","Review the tool's output to understand existing patterns, dependencies, or gaps in the codebase related to your task.","Refine your search if needed by adjusting keywords or adding constraints (e.g., 'Python', 'FastAPI', 'Django').","Use the insights to draft a solution, ensuring you reference specific files or functions for context.","Test your solution in a development environment and iterate based on feedback or errors."]
Reducing token costs for Claude Code workflows on large projects
Searching codebases by semantic meaning without sending code to cloud APIs
Maintaining code privacy while using AI-assisted coding agents
Accelerating code generation by providing faster context retrieval
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/FarhanAliRaza/claude-context-localCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a coding agent with access to the local codebase. Use the claude-context-local tool to search for [TARGET_FILES_OR_FUNCTIONS] related to [SPECIFIC_TASK]. Analyze the codebase to identify patterns, dependencies, or best practices for [TASK_DESCRIPTION]. Provide a concise summary of findings and suggest a high-level approach to implement [SOLUTION]. Reference specific files, classes, or functions where relevant.
After invoking the claude-context-local tool, I analyzed the codebase for files related to user authentication, specifically focusing on JWT token handling. The search revealed three key files: `auth/jwt.py`, `services/auth_service.py`, and `models/user.py`. In `jwt.py`, I found a utility function `generate_token()` that creates JWT tokens with a 1-hour expiration, while `auth_service.py` contains `validate_token()` which checks token validity and refreshes expired tokens. The `user.py` model includes a `last_login` field that isn't currently updated during token validation. Based on this, I recommend implementing a feature to update the `last_login` timestamp whenever `validate_token()` is called. This would require modifying `auth_service.py` to include a call to `user.update_last_login()` after successful validation. The existing token generation logic in `jwt.py` appears robust and aligns with security best practices, so no changes are needed there. This approach would enhance user activity tracking without introducing new dependencies.
AI assistant built for thoughtful, nuanced conversation
AI sales agent for lead generation and follow-up
AI-assisted web application security testing
Enterprise workflow automation and service management platform
Get more done every day with Microsoft Teams – powered by AI
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan