본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구DockerOpenAI
설치 방법 보기

포함된 파일(2)

  • SKILL.md7.0 KB
  • references/tool-reference.md13.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

SocratiCode Management

Set up, index, and manage SocratiCode codebase indexing, file watching, code graphs, and context artifacts.

First-Time Setup

  1. Check infrastructure: codebase_health — verifies Docker, Qdrant, Ollama/embedding provider, and embedding model
  2. Start indexing: codebase_index — runs in background, returns immediately
  3. Poll progress: codebase_status — call every ~60 seconds until 100% complete
    • This also keeps the MCP connection alive (some hosts disconnect idle connections)
  4. Done: Graph auto-builds after indexing. In the default watcher mode, the 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 in the default SOCRATICODE_WATCHER=auto mode.

  • codebase_watch { action: "start" } — start the watcher (runs catch-up update first)
  • codebase_watch { action: "stop" } — stop the watcher
  • codebase_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.

For a deliberate code-index snapshot, configure every MCP process that uses the checkout with SOCRATICODE_WATCHER=off and SOCRATICODE_AUTO_RESUME=off. Search and graph tools keep reading the existing index and graph; run codebase_update and codebase_graph_build only when a refresh is wanted. Use watcher mode manual instead when explicit codebase_watch { action: "start" } should remain available. Never try to restart a watcher whose status says disabled.

With SOCRATICODE_WATCHER=git, active indexed checkouts refresh on checked-out ref/HEAD changes, checked every 10 seconds and on search/status/graph requests. No native file watcher starts. Pending or failed refreshes are not current results. Git triggers the update, but the working tree is indexed, including uncommitted edits. Use codebase_update for file saves that do not change ref/HEAD. Selecting Git mode does not create a first index. SOCRATICODE_AUTO_RESUME=off suppresses startup catch-up, not later Git-triggered updates. A Git diagnostic must not be bypassed by starting a watcher.

Managing Indexes

  • codebase_stop — gracefully pause in-progress indexing. Current batch finishes and checkpoints. All progress preserved. Resume with codebase_index.
  • codebase_remove — delete entire index (destructive). Safely stops watcher, cancels indexing, waits for graph builds.
  • codebase_prune — inventory stored identities; delete one by exact identity, fresh confirmation token and shared-store acknowledgement. Path absence is advisory, never a candidate set.
  • 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. In watcher modes manual and off, graph queries read an existing graph but will ask for an explicit build instead of creating a missing graph as a side effect.

  • codebase_graph_build — manually rebuild (background, async). Poll with codebase_graph_status.
  • codebase_graph_remove — delete graph (auto-rebuilds on next codebase_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

ProblemSolution
Docker not availableInstall Docker Desktop from https://docker.com, ensure it's running
Slow indexing on macOS/WindowsDocker can't use GPU. Install native Ollama from https://ollama.com/download for Metal/CUDA acceleration. Or use cloud embeddings.
Want cloud embeddings insteadSet EMBEDDING_PROVIDER=openai + OPENAI_API_KEY, or EMBEDDING_PROVIDER=google + GOOGLE_API_KEY
Search returns no resultsCheck codebase_status — project may not be indexed. Run codebase_index.
Stale resultsCheck codebase_status. Run codebase_update; start the watcher only when status does not say it is disabled.
Indexing was interruptedRun codebase_index again — it resumes from the last checkpoint automatically.
Another process is indexingcodebase_status detects cross-process indexing. Wait for it, or use codebase_stop.

Key Environment Variables

VariableDefaultDescription
QDRANT_MODEmanagedmanaged (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_PROVIDERollamaollama, openai, or google
OPENAI_API_KEY—Required when EMBEDDING_PROVIDER=openai
GOOGLE_API_KEY—Required when EMBEDDING_PROVIDER=google
OLLAMA_MODEautoauto (detect native, fallback Docker), docker, external
EMBEDDING_MODELnomic-embed-textModel name (provider-specific)
SEARCH_DEFAULT_LIMIT10Default result limit for codebase_search (1-50)
SEARCH_MIN_SCORE0.10Default minimum RRF score threshold (0-1)
MAX_FILE_SIZE_MB5Maximum file size for indexing in MB; must be a complete finite number
EXTRA_EXTENSIONS—Additional file extensions to index (e.g. .tpl,.blade,.hbs)
SOCRATICODE_WATCHERautoauto, manual (explicit start only), off (no watcher), or git (ref/HEAD-triggered refresh, no native watcher)
SOCRATICODE_AUTO_RESUME—all resumes all stored projects; off disables startup catch-up and interrupted-index recovery

For full parameter details on every tool, see references/tool-reference.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

giancarloerra/SocratiCode3.3천2026년 10월 16일 업데이트

giancarloerra의 스킬 모두 보기

이 스킬의 문제 신고