obsidian-architect — команда для Claude Code
Команда obsidian-architect сканирует проект и генерирует набор архитектурных заметок в хранилище: обзор, заметки по модулям, ключевые решения. Переустановка обновит документацию без потери ваших правок.
MIT ★ 5 412 обновлён 2026-10-24
/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brainЧто делает obsidian-architect
obsidian-architect превращает кодовый проект в поддерживаемый набор архитектурных заметок, так чтобы вы (и будущий агент) мог ответить «как этот проект устроен и зачем» без повторного чтения кода.
Команда работает в два слоя. Сначала Python-скрипт детерминированно сканирует проект, вытаскивая структуру: языки, модули, зависимости, точки входа, сигналы (Dockerfile, Makefile, CI). Затем вы синтезируете текст — описания, обоснование, диаграммы. Команда не выдумывает структуру, которой нет в коде.
На выходе — три типа заметок: обзор архитектуры с диаграммой Mermaid и персонами, отдельная заметка для каждого основного модуля, заметки о ключевых решениях. При переустановке команда обновляет только сгенерированные блоки (помечены <!-- @generated -->), оставляя ваши правки нетронутыми.
Какие задачи решает
- понять архитектуру незнакомого проекта без погружения в исходник
- документировать проект так, чтобы будущий агент мог его разбирать
- освежить архитектурную документацию после значительных изменений в коде
- отследить ключевые решения, которые объясняют устройство проекта
Примеры запросов агенту
- Сканируй
/obsidian-architect ./srcи напиши архитектуру в хранилище - Обнови архитектурные заметки для проекта в папке
../backend - Создай архитектурные заметки этого проекта, включая диаграмму и модули
Как установить obsidian-architect
1Через маркетплейс плагинов
/plugin marketplace add eugeniughelbur/obsidian-second-brain/plugin install obsidian-second-brain@obsidian-second-brain2Вручную: положить файлы
.claude/commands/obsidian-architect.mdВызов — /obsidian-architect. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/obsidian-architect.mdВызов — /prompts:obsidian-architect. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/obsidian-architect.prompt.mdВручную: положить файлы
.gemini/commands/obsidian-architect.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы об obsidian-architect
Как установить obsidian-architect в Claude Code?
Запусти /plugin marketplace add eugeniughelbur/obsidian-second-brain, потом /plugin install obsidian-second-brain@obsidian-second-brain. Команда будет доступна после загрузки плагина.
Что делает obsidian-architect?
Сканирует проект, извлекает модули, зависимости и сигналы (вроде конфигов DevOps), затем создаёт в Obsidian набор заметок: обзор с диаграммой, заметку для каждого модуля и историю ключевых решений.
Правда ли, что переустановка не потрёт мои правки?
Да. Команда помечает сгенерированное содержимое блокам <!-- @generated:start/end -->. При следующей переустановке обновляются только эти блоки; остальное, включая ваши комментарии, остаётся без изменений.
Исходный текст
obsidian-architect.md · MIT
--- description: Scan a codebase and write a maintained set of architecture notes into the vault - overview, per-module notes, key decisions. Re-run to refresh without clobbering your edits category: meta triggers_en: ["document this codebase", "architect this project", "map this code into my vault", "generate architecture notes", "refresh architecture docs"] triggers_de: ["diese Codebasis dokumentieren", "dieses Projekt architektonisch erfassen", "diesen Code in meinem Vault abbilden", "Architekturnotizen erstellen", "Architekturdokumentation aktualisieren"] triggers_es: ["documenta este código", "analiza la arquitectura de este proyecto", "lleva este código a mi vault", "genera notas de arquitectura", "actualiza la documentación de arquitectura", "pon la arquitectura en el vault"] triggers_pt: ["documente este código", "arquitete este projeto", "mapeie este código no vault", "gere notas de arquitetura", "atualize a documentação de arquitetura"] triggers_zh: ["给这个代码库写架构文档", "分析这个项目的架构", "把代码结构整理进知识库", "生成架构笔记", "更新架构文档"] --- Use the obsidian-second-brain skill. Execute `/obsidian-architect [path-to-codebase]`: Turns a software project into a maintained set of architecture notes in the vault, so future-you (and future agent) can answer "how does this project work and why" without re-reading the code. Re-running refreshes the notes in place. This is a hybrid command: a deterministic Python scan produces the facts, then YOU synthesize the prose, rationale, and diagram. Never invent structure the scan did not find (see the anti-fabrication rule). 1. **Resolve the codebase path.** Use the argument if given. Otherwise infer from the active project note's `local-path`, or ask. Confirm it is a directory. 2. **Run the scan** from the skill root (its absolute path was given at session start as **Skill root**; substitute it for `SKILL_ROOT`): ```bash uv run --directory "SKILL_ROOT" scripts/architect_scan.py --path <codebase> ``` It returns JSON: `name`, `kind`, `languages` (with file counts), `modules` (proposed top-level parts with a `core`/`support` hint), `dependencies`, `entry_points`, `signals` (dockerfile/makefile/ci), and `git` (commit). It writes nothing and calls no LLM - the synthesis is yours. 3. **Optionally pull decision history** for the "Key decisions" note: ```bash uv run --directory "SKILL_ROOT" scripts/mine_commit_decisions.py --repo <codebase> --json ``` 4. **Pick the destination.** Write under the project's hub: `<projects folder>/<name>/Architecture/`, with the projects folder resolved per `references/folder-map.md` (wiki-style `wiki/projects/`, Obsidian-style `Projects/`); create it if missing. If the vault has no project note for this codebase yet, offer to create one via `/obsidian-project` first so the architecture links into it. 5. **Synthesize and write these notes**, each AI-first compliant: - **`Architecture - Overview.md`** (`type: architecture-overview`): what the project is, its stack (from `languages`/`kind`/`dependencies`), how the parts fit together, and ONE Mermaid diagram of the modules and their main flow. Include a short **Personas** section (2-4 likely user types, marked `confidence: speculation` unless a README states them). Link to each module note. - **One note per `core` module** (`type: architecture-module`): `Architecture - <Module>.md` - what it does, what it depends on, and its role in the whole. Keep `support` modules to a single line in the overview unless they are substantial. - **`Architecture - Key decisions.md`** (`type: adr` entries or a decisions list): write up the candidates from the commit-decisions miner, each as a real decision with context. Mark anything inferred as `confidence: speculation`. 6. **Sentinel-safe writing (so refresh never destroys your edits).** Wrap every machine-generated section between markers: ``` <!-- @generated:start --> ...synthesized content... <!-- @generated:end --> ``` Anything a human adds should go in a `<!-- @user:start -->` ... `<!-- @user:end -->` block, or simply outside the generated markers. **On a re-run, replace ONLY the content inside `@generated` blocks; never touch `@user` blocks or anything outside the markers.** If a note has no markers yet (first run), add them around what you generate. 7. **Refresh behavior.** If the architecture notes already exist, this is a refresh: re-scan, then update only the generated blocks whose underlying facts changed (new module, dropped dependency, etc.). Note in the overview's frontmatter the `scanned-commit` so a reader knows how current the docs are. Report what changed. 8. Link the overview from the project note and from today's daily note. Append a one-line entry to the operation log. --- **AI-first rule:** Every note created or updated by this command MUST follow `references/ai-first-rules.md` - `## For future agent` preamble, rich frontmatter (`type`, `date`, `tags`, `ai-first: true`, plus type-specific fields), recency markers per external claim, mandatory `[[wikilinks]]` for every person/project/concept referenced, sources preserved verbatim with URLs inline, and confidence levels where applicable. If that path does not resolve from your working directory, search upward for it; if you still cannot read it, say so before writing rather than producing a note that silently skips the rule. The vault is for future agent retrieval - not human reading. **Anti-fabrication:** Describe only what the scan and the code actually show - never invent a module, a dependency, a data flow, or a decision that is not grounded in the manifest or the source. If the scan is thin (small project, no manifest), say so and keep the notes short rather than padding. Mark inferred rationale and personas as `confidence: speculation`. See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.
© Eugeniu Ghelbur · MIT · eugeniughelbur/obsidian-second-brain