| name | codegraph-context-bootstrap |
| description | Build repository context using CodeGraph before starting tasks. |
Use this skill when exploring an unfamiliar project or subsystem, onboarding to a new area, or preparing for significant or cross-module changes. Do not trigger it automatically for every new session or for simple localized tasks.
Goal: Establish a concise, graph-backed context for the current task without scanning the entire repository.
Shared tool policy:
- Follow
../../reference/codegraph-tool-policy.md for common CodeGraph tool selection, fallback and unavailable handling.
Task-specific tools:
- Prefer
codegraph_context, codegraph_search, codegraph_files and codegraph_explore for unfamiliar areas.
Workflow:
- Call
codegraph_status (or codegraph status .) to check if a graph index exists and is fresh. If missing or stale, request the user run codegraph init -i or codegraph sync.
- Use
codegraph_context to build a focused context for the current task (for example, "refactor auth module"), limiting the number of nodes to a manageable size (e.g. 20).
- Supplement with
codegraph_search for specific keywords, classes, functions or services relevant to the task. Disambiguate by module, file path or symbol kind when multiple matches appear.
- For broad unfamiliar areas, use
codegraph_explore after search has identified concrete symbols, filenames or short code terms. Avoid natural-language-only explore queries.
- Use
codegraph_files to understand the repository structure and identify important directories and modules.
- Summarise the context: key files, modules, classes, functions, entry points, external integrations, and potential risks. Use lists or tables for clarity.
- For tasks that trigger this skill, build context before broad file reading or editing.
Rules:
- Do not read large numbers of files without first using CodeGraph to narrow down the scope.
- Keep the main session lightweight: prefer
codegraph_context for focused work and reserve codegraph_explore for genuine surveys.
- Clearly state when the context is incomplete or when CodeGraph analysis is unavailable.