codependix-navigate — скилл для Claude Code: граф зависимостей
Скилл codependix-navigate учит агента отвечать на вопросы о зависимостях: как проект A доходит до C, что сломается при правке файла. Через codependix path или графы, уже лежащие в репозитории.
MIT 364 установок обновлён 2026-10-24
npx skills add organizzolini/codebase --skill codependix-navigate -a claude-codeЧто делает codependix-navigate
Скилл подсказывает агенту, какими командами codependix отвечать на вопросы про зависимости в монорепозитории: путь от одного проекта или файла к другому, кто импортирует пакет, что затронет правка. Строит ответ по Nx-проектам, файловым импортам TypeScript и Python, модулям NestJS.
Внутри текст инструкции: какие флаги ставить и когда вместо запуска CLI хватит закоммиченных графов. У каждого пакета они лежат в его README.md, между маркерами <!-- codependix:start name="..." -->, у корня репозитория — граф всего воркспейса. Прогон по всему воркспейсу разбирает Nx-проекты, AST и регистрации контейнеров, поэтому в скилле есть флаги сужения вроде --projects, --tags и --no-nestjs-modules.
Флаг --config <path> обязателен всегда: конфиг не ищется и значения по умолчанию нет, так что без пути к codependix.config.ts команда не отработает. Отсутствие связи — тоже ответ: codependix path печатает, что пути нет, и выходит с кодом 0.
Какие задачи решает
- проследить путь от
project-aдоproject-cв Nx-воркспейсе - оценить, что сломается при смене публичного API пакета
- найти файлы, которые импортируют сдвигаемый модуль
- разобрать, какие модули NestJS связал DI-контейнер
- прочитать готовый граф из
README.md, не запуская CLI
Примеры запросов агенту
- Покажи, как
project-aдоходит доproject-c, и сузь прогон флагами до нужного воркспейса. - Что сломается, если я поменяю публичный API у
project-b? - Посмотри граф файловых импортов в
README.mdпакетаauth— там есть циклы?
Как установить codependix-navigate
1Через Skills CLI (Vercel)
npx skills add organizzolini/codebase --skill codependix-navigate -a claude-code2Вручную: положить файлы
~/.claude/skills/codependix-navigate/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/codependix-navigate/
1Через Skills CLI (Vercel)
npx skills add organizzolini/codebase --skill codependix-navigate -a codex2Вручную: положить файлы
.agents/skills/codependix-navigate/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add organizzolini/codebase --skill codependix-navigate -a cursor2Вручную: положить файлы
.cursor/skills/codependix-navigate/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install organizzolini/codebase projects/ic-suite/codependix/codependix-agents/skills/codependix-navigate2Вручную: положить файлы
.github/skills/codependix-navigate/SKILL.md1Через Skills CLI (Vercel)
npx skills add organizzolini/codebase --skill codependix-navigate -a gemini-cli2Командой платформы
gemini skills install https://github.com/organizzolini/codebase --path projects/ic-suite/codependix/codependix-agents/skills/codependix-navigateВручную: положить файлы
.devin/skills/codependix-navigate/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add organizzolini/codebase --skill codependix-navigate -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о codependix-navigate
Как установить codependix-navigate в Claude Code?
Выполните npx skills add organizzolini/codebase --skill codependix-navigate -a claude-code. Файл скилла окажется по пути ~/.claude/skills/codependix-navigate/SKILL.md.
Что делает codependix-navigate?
Объясняет агенту, как отвечать на вопросы об архитектуре и зависимостях через codependix path или через графы, закоммиченные в README.md пакетов. Покрывает пути между проектами, файлами и модулями NestJS.
Что обязательно указать при запуске codependix path?
Путь к конфигу через --config <path>: команда не ищет конфигурацию сама и без флага не работает. Остальные флаги только сужают область поиска.
Исходный текст
SKILL.md · MIT
--- name: codependix-navigate description: Answer dependency navigation and architecture questions using codependix CLI commands or committed graphs. Use when finding dependency paths between projects, files, or NestJS modules, tracing blast radius, determining what touches or imports a file or package, choosing narrowing flags to minimize run costs, or reading committed README diagrams across packages without running commands. license: MIT --- # Navigating a codebase with codependix Codependix builds and queries dependency graphs across Nx workspaces, NestJS containers, and file-level TypeScript and Python imports. When asking "how does X reach Y?", "what breaks if I change Z?", or "what does this package depend on?", use codependix commands to query relationships directly, or inspect committed graphs already on disk. ## Command first: querying dependency paths Reach for `codependix path` to trace directed dependency paths between two nodes without parsing diagrams or grepping source files by hand. Every invocation names the configuration with `--config <path>` — in this repository `configuration/codependix.config.ts` — because nothing is searched for and there is no default. ```bash # How does project-a reach project-c? codependix path project-a project-c --config configuration/codependix.config.ts # How does one file import another? codependix path src/modules/auth/auth.service.ts src/modules/users/user.entity.ts --config configuration/codependix.config.ts # What NestJS modules connect two modules in a container? codependix path AuthModule DatabaseModule --config configuration/codependix.config.ts ``` ### Path query flags and narrowing Running across a full workspace can be expensive because it parses Nx projects, TypeScript ASTs, and container registrations across the entire monorepo. Use narrowing flags to scope the run and minimize execution time: | Flag | Purpose | | ---- | ------- | | `-f, --format <format>` | Output format: `markdown` (default), `json`, or `mermaid` | | `--nx-projects` / `--no-nx-projects` | Toggle Nx workspace project dependency graph search | | `--file-imports` / `--no-file-imports` | Toggle internal file-level import graph search | | `--nestjs-modules` / `--no-nestjs-modules` | Toggle NestJS container module graph search | | `--projects <names>` | Comma-separated project names or globs to search across | | `-d, --directory <dir>` | Directory whose Nx workspace to read | | `--include <globs>` / `--exclude <globs>` | Override configured project inclusion or exclusion globs | | `--tags <tags>` | Comma-separated Nx project tags to filter by | | `--config <path>` | **Required.** Path to the codependix configuration file; every example here passes it | ### Path results - **Path found**: Prints the shortest directed path connecting `<from>` to `<to>` (for example `project-a → project-b → project-c`). - **No path**: Reports `_No path connects "<from>" to "<to>"._` (or an empty list in JSON) and exits 0. A missing path is an answer, not an error. ## When to read a committed diagram instead of running the CLI Running the CLI builds graph representations from source files. Before running a command, check if the question is already answered by committed artifacts on disk: 1. **Every package in the monorepo commits its own graphs.** Look in any project's `README.md` under the `## 🕸️ Codependix` section or between `<!-- codependix:start name="..." -->` markers. 2. **Immediate blast radius (1 hop):** The project's committed **Nx Neighborhood** diagram lists all immediate `dependencies` (what it reaches) and `dependents` (what breaks if its public API changes). 3. **Internal file structure:** The project's committed **File import graph** lists all file-to-file imports and isolated files within that project. 4. **Container structure:** The project's committed **NestJS module graph** lists wired container modules. 5. **Whole-workspace structure:** The repository root `README.md` carries the committed workspace graph. **Cost rule of thumb:** - **Read README diagrams or JSON** for single-hop dependencies, immediate blast radius, or local file layout (zero build cost, instant answer on disk). - **Run `codependix path`** for multi-hop transitive paths, cross-project reachability, verifying unstaged changes, or generating machine-readable JSON. ## The four graph types and their questions | Graph | Scope | Answers | | ----- | ----- | ------- | | **Nx Neighborhood** | Project | What one project reaches (dependencies) and who breaks if it changes (dependents) | | **Workspace graph** | Workspace | High-level architectural layering and cross-package relationships | | **NestJS module graph** | Container | What modules the DI container wires together at runtime | | **File import graph** | Project files | File-to-file import relationships, cycles, and local refactoring fan-out | ## Interpreting graph artifacts ### Nx Neighborhood: blast radius A Neighborhood covers **one hop in each direction** from the focal project (highlighted in diagrams): - **`dependents` is the blast radius** of a breaking change: every listed project must build against the new shape. For breaking changes spanning deeper layers, walk outward neighborhood by neighborhood or run `codependix path`. - **`dependencies` is the allowed surface:** A project may only import what is declared here. - Edges marked `implicit` are Nx workspace configuration dependencies rather than code imports. ### File import graph: refactoring and moves Edges are strictly **between files inside the same project**: - External packages and cross-project imports are excluded by design (they live in the Nx Neighborhood). - **`isolatedFileNames` is a shortlist to investigate, not dead code.** An isolated file may be an entry point, an external export, or a configuration file. - **Cycles are real:** An import cycle within a project produces runtime `undefined` bindings or initialization order bugs. Walk the cycle edges to locate where to decouple. - Renaming a file? Edges pointing to the old relative path show the exact blast radius. ### NestJS module graph: DI container wiring Built by evaluating container modules: - **Global or ambient modules:** Modules imported by nearly all others (for example core logging or configuration) have individual edges omitted to reduce visual noise; they are listed under `ambientModuleNames` and drawn with rounded corners. - **Dynamic wrapper modules:** Private internal host modules created by `forRoot` or dynamic providers are collapsed into the declaring module. - A missing module was never registered in the container hierarchy, meaning its exported providers are unavailable. ## Confirming freshness before trusting committed graphs A committed graph reflects the repository state at the last `codependix map --write`. To check whether committed graphs are up to date: ```bash # Check if any committed reports are stale without modifying files codependix map --check reports --config configuration/codependix.config.ts # Update all committed graphs across the workspace codependix map --write --config configuration/codependix.config.ts ``` If committed graphs are stale with respect to recent local edits, either re-run `codependix map --write` or use `codependix path` for real-time queries.
© organizzolini · MIT · organizzolini/codebase