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, 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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-11
- Stars
- ★ 1.6k
- Forks
- 474
01 前言 Front Matter
- name
- codebase-management
- description
- 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.
02 资源文件 1
- 参考文档references/tool-reference.md9.3 KB
03 SKILL.md 正文
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.
04 同仓库更多 Skills
migrate-to-e2e
Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.
e2e
Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.
create-verification-skill
Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.
deja-search
deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.
deja-reflect
End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.
revid
Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.