codebase-management
Set up, index, and manage SocratiCode codebase indexing. Use when the user wants to index a project, check infrastructure health, start/stop file watching,…
Explore and understand codebases using SocratiCode semantic search, dependency graphs, and context artifacts. Use when exploring code, understanding architecture, finding functions/types, analysing dependencies, searching database schemas or API specs, or when
$ npx -y skills add giancarloerra/SocratiCode --skill codebase-exploration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/codebase-explorationContext preview
The summary Claude sees to decide when to auto-load this skill.
Explore and understand codebases using SocratiCode semantic search, dependency graphs, and context artifacts. Use when exploring code, understanding architecture, finding functions/types, analysing dependencies, searching database schemas or API specs, or when
name: codebase-exploration description: >- Explore and understand codebases using SocratiCode semantic search, dependency graphs, and context artifacts. Use when exploring code, understanding architecture, finding functions/types, analysing dependencies, searching database schemas or API specs, or when socraticode/codebase_search tools are available. Activates when the user asks about code structure, wants to find where a feature lives, or needs to understand how code is organised.
Use SocratiCode MCP tools to explore codebases efficiently. The core principle: **search before reading** — the index gives you a map of the codebase in milliseconds; raw file reading is expensive and context-consuming.
Hybrid semantic + keyword search (vector + BM25, RRF-fused) runs in a single call.
**When to use grep instead**: If you already know the exact identifier, error string, or regex pattern, grep/ripgrep is faster and more precise — no semantic gap to bridge. Use `codebase_search` when exploring, asking conceptual questions, or when you don't know which files to look in.
Use `codebase_graph_query` to see what a file imports and what depends on it **before** diving into its contents. This prevents unnecessary reading of transitive dependencies.
The graph is auto-built after indexing. Use `codebase_graph_status` to check if the graph is ready. In `SOCRATICODE_WATCHER=manual` or `off`, graph queries do not create a missing graph; run `codebase_graph_build` explicitly when requested.
Once search results clearly point to 1-3 files, read only the relevant sections. **Never read a file just to find out if it's relevant** — search first.
A single `codebase_search` call returns ranked, deduplicated snippets from across the entire codebase in milliseconds. This gives you a broad map at negligible token cost — far cheaper than opening files speculatively.
Projects can define a `.socraticodecontextartifacts.json` config to expose database schemas, API specs, infrastructure configs, architecture docs, and other project knowledge that lives outside source code.
Run `codebase_context` early to see what's available. Use `codebase_context_search` before asking about database structure, API contracts, or infrastructure.
| Goal | Tool | |------|------| | Understand what a codebase does / where a feature lives | `codebase_search` (broad query) | | Find a specific function, constant, or type | `codebase_search` (exact name) or grep | | Find exact error messages, log strings, or regex patterns | grep / ripgrep | | See what a file imports or what depends on it | `codebase_graph_query` | | Get architecture overview (files, edges, most connected) | `codebase_graph_stats` | | Spot circular dependencies | `codebase_graph_circular` | | Visualise module structure (text / Mermaid) | `codebase_graph_visualize` | | User asks for a visual / interactive / shareable graph | `codebase_graph_visualize mode="interactive"` | | Check graph build status | `codebase_graph_status` | | Verify index is up to date | `codebase_status` | | Discover available schemas, specs, configs | `codebase_context` | | Find database tables, API endpoints, infra configs | `codebase_context_search` | | Quick overview of all tools | `codebase_about` |
For full parameter details on every tool, see [references/tool-reference.md](references/tool-reference.md).
= 18.17"> "There is only one good, knowledge, and one evil, ignorance." — Socrates Your AI reads code. SocratiCode understands it.
Repo: giancarloerra/SocratiCode
Set up, index, and manage SocratiCode codebase indexing. Use when the user wants to index a project, check infrastructure health, start/stop file watching,…