Codebase Manager
Index, organize, and manage your codebase with search and code graph infrastructure.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/codebase-management-giancarloerra/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Set up, index, and manage SocratiCode codebase indexing. Use when the user wants to index a project, check infrastructure health, start/stop file watching, configure context artifacts, troubleshoot indexing issues, manage the code graph, or any SocratiCode administrative task. Activates when the user mentions indexing, setting up search, SocratiCode infrastructure, or managing the codebase index.
What this skill does
SocratiCode Management
Set up, index, and manage SocratiCode codebase indexing, file watching, code graphs, and context artifacts.
First-Time Setup
- Check infrastructure:
codebase_healthβ verifies Docker, Qdrant, Ollama/embedding provider, and embedding model - Start indexing:
codebase_indexβ runs in background, returns immediately - Poll progress:
codebase_statusβ call every ~60 seconds until 100% complete- This also keeps the MCP connection alive (some hosts disconnect idle connections)
- Done: Graph auto-builds after indexing. File watcher auto-starts. Ready to search.
On first use, SocratiCode automatically pulls Docker images, starts containers, and downloads the embedding model (~5 min one-time setup).
Incremental Updates & File Watching
The file watcher keeps the index automatically updated. It auto-starts after indexing.
codebase_watch { action: "start" }β start the watcher (runs catch-up update first)codebase_watch { action: "stop" }β stop the watchercodebase_watch { action: "status" }β list watched projects (including cross-process)codebase_updateβ manual incremental update (only changed files, synchronous). Usually not needed if watcher is active.
Managing Indexes
codebase_stopβ gracefully pause in-progress indexing. Current batch finishes and checkpoints. All progress preserved. Resume withcodebase_index.codebase_removeβ delete entire index (destructive). Safely stops watcher, cancels indexing, waits for graph builds.codebase_list_projectsβ list all indexed projects with metadata, graph info, and artifact status.
Managing the Code Graph
The dependency graph is auto-built after indexing. Manual management is rarely needed.
codebase_graph_buildβ manually rebuild (background, async). Poll withcodebase_graph_status.codebase_graph_removeβ delete graph (auto-rebuilds on nextcodebase_index)codebase_graph_statusβ check build progress or graph readiness
Context Artifacts Setup
To index non-code knowledge, create .socraticodecontextartifacts.json in the project root:
{
"artifacts": [
{
"name": "database-schema",
"path": "./docs/schema.sql",
"description": "PostgreSQL schema β all tables, indexes, constraints, foreign keys."
}
]
}
Supported types: SQL schemas, OpenAPI/Protobuf API specs, Terraform/CloudFormation configs, Kubernetes manifests, architecture docs, environment configs β any text-based file or directory.
codebase_context_indexβ manually index/re-index all artifacts (usually auto-triggered)codebase_context_removeβ remove all indexed artifacts (blocked during indexing)
Troubleshooting
| Problem | Solution |
|---|---|
| Docker not available | Install Docker Desktop from https://docker.com, ensure it's running |
| Slow indexing on macOS/Windows | Docker can't use GPU. Install native Ollama from https://ollama.com/download for Metal/CUDA acceleration. Or use cloud embeddings. |
| Want cloud embeddings instead | Set EMBEDDING_PROVIDER=openai + OPENAI_API_KEY, or EMBEDDING_PROVIDER=google + GOOGLE_API_KEY |
| Search returns no results | Check codebase_status β project may not be indexed. Run codebase_index. |
| Stale results | Check if watcher is active (codebase_status). Run codebase_update or codebase_watch { action: "start" }. |
| Indexing was interrupted | Run codebase_index again β it resumes from the last checkpoint automatically. |
| Another process is indexing | codebase_status detects cross-process indexing. Wait for it, or use codebase_stop. |
Key Environment Variables
| Variable | Default | Description |
|---|---|---|
QDRANT_MODE | managed | managed (Docker) or external (remote/cloud Qdrant) |
QDRANT_URL | β | Full URL for remote Qdrant (e.g. https://xyz.cloud.qdrant.io:6333) |
QDRANT_API_KEY | β | API key for remote Qdrant |
EMBEDDING_PROVIDER | ollama | ollama, openai, or google |
OPENAI_API_KEY | β | Required when EMBEDDING_PROVIDER=openai |
GOOGLE_API_KEY | β | Required when EMBEDDING_PROVIDER=google |
OLLAMA_MODE | auto | auto (detect native, fallback Docker), docker, external |
EMBEDDING_MODEL | nomic-embed-text | Model name (provider-specific) |
SEARCH_DEFAULT_LIMIT | 10 | Default result limit for codebase_search (1-50) |
SEARCH_MIN_SCORE | 0.10 | Default minimum RRF score threshold (0-1) |
MAX_FILE_SIZE_MB | 5 | Maximum file size for indexing in MB |
EXTRA_EXTENSIONS | β | Additional file extensions to index (e.g. .tpl,.blade,.hbs) |
For full parameter details on every tool, see references/tool-reference.md.
Related skills
Generative Code Art
anthropics
Create algorithmic art with p5.js using randomness and interactive parameters.
Poster & Visual Design
anthropics
Create original posters and visual art in PNG and PDF formats.
Claude API Helper
anthropics
Build, debug, and optimize Claude API applications with caching and model migration support.
MCP Server Builder
anthropics
Build protocol servers that connect language models to external APIs and services.