К основному содержанию
команда CX Codex

create-command · eugeniughelbur — команда для Claude Code: что делает и как установить

Команда create-command для Claude Code пошагово опрашивает пользователя и создаёт готовый файл слэш-команды для Obsidian без ручной правки Markdown и фронтметтера.

MIT ★ 5 412 обновлён 2026-10-24

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brain
Открыть на GitHub

Что делает create-command

Команда автоматизирует создание новых сценариев внутри obsidian-second-brain. Вместо копирования чужих файлов или ручного заполнения шаблонов она задаёт вопросы строго по одному через AskUserQuestion. Если в вызов сразу передано подробное описание задачи, запускается быстрый сценарий: агент составляет черновик спецификации и просит лишь подтвердить результат.

В ходе интервью задаётся имя по шаблону ^[a-z][a-z0-9-]*$, выбирается категория (vault, thinking, research или meta), триггерные фразы и план из трёх-пяти шагов. При сохранении заметок в хранилище к файлу обязательно добавляются правила AI-first из references/ai-first-rules.md. Для работы внешних сервисов вроде Perplexity Sonar или xAI Grok в теле команды прописываются ссылки на переменные из ~/.config/obsidian-second-brain/.env. Без инструмента AskUserQuestion интерактивный опрос работать не сможет.

Какие задачи решает

  • Создать каркас новой слэш-команды без ручной вёрстки Markdown
  • Настроить триггерные фразы и категорию для сценария Obsidian
  • Проверить уникальность имени команды перед созданием файла
  • Встроить правила AI-first при сохранении заметок в хранилище

Примеры запросов агенту

  • /create-command
  • /create-command суммируй страницы Notion и сохраняй в хранилище как заметки

Как установить create-command

1Через маркетплейс плагинов

/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brain

2Вручную: положить файлы

.claude/commands/create-command.md

Вызов — /create-command. Для всех проектов — ~/.claude/commands/

Вопросы о create-command

Как установить create-command в Claude Code?

Сначала добавьте репозиторий через /plugin marketplace add eugeniughelbur/obsidian-second-brain, затем выполните /plugin install obsidian-second-brain@obsidian-second-brain.

Что делает команда create-command?

Она проводит диалог в терминале и генерирует готовый Markdown-файл команды в папке commands/ с нужными заголовками и инструкциями.

Как работает быстрый путь fast path?

Если в аргументе сразу указаны задача, имя и категория, подробный опрос пропускается. Агент формирует черновик и ждёт только одного подтверждения.

Исходный текст

create-command.md · MIT
---
description: Create a new obsidian-second-brain command via interview - zero markdown editing required
category: meta
triggers_en: ["create command", "new command", "add a command", "scaffold a command"]
triggers_de: ["erstelle einen Befehl", "neuer Befehl", "Befehl hinzufügen", "Befehl-Gerüst erstellen"]
triggers_es: ["crea un comando", "nuevo comando", "añade un comando", "hazme un comando nuevo", "arma un comando"]
triggers_pt: ["crie um comando", "novo comando", "adicione um comando", "gere um comando"]
triggers_zh: ["创建一个新命令", "新增 Obsidian 命令", "帮我写个命令", "生成命令模板"]
---

Use the obsidian-second-brain skill. Execute `/create-command $ARGUMENTS`:

This command runs a short interview, then writes a new `commands/<name>.md` file that the build pipeline picks up automatically. The user never touches frontmatter, never edits a template, and never copies an existing command file.

**Hard rule:** You MUST use the AskUserQuestion tool for every question in this flow. ONE question per call. Wait for the answer before the next question. Do not batch.

The optional argument is a free-text seed describing what the command should do (e.g., `summarize my notion pages and save to vault`). If given, use it to pre-fill suggestions in the interview. If empty, the first question opens with "what problem do you want to solve?".

### Fast path (skip the interview when the seed already answers it)

If the seed argument is detailed enough to fill every field yourself - the intent is clear AND you can confidently derive a name, category, trigger phrases, the step outline, and whether it writes to the vault - do NOT run the six-question interview. Instead:

1. Draft the complete spec (name, category, triggers, 3-5 steps, vault-write yes/no) from the seed.
2. Present it in ONE AskUserQuestion tool call as a single confirm-or-adjust gate: option A "Create it as specced" (show the name + one-line behaviour), option B "Let me adjust" (falls back to the full interview). Include the proposed name in the option label so the user sees it.
3. On "Create it as specced", validate the name (Phase 2 checks: regex `^[a-z][a-z0-9-]*$`, and `commands/<name>.md` does not already exist), then jump straight to Phase 8 (generate the file) and Phase 9 (confirm).

Only the truly under-specified seeds need the full interview. A seed like "summarize my notion pages and save to vault as AI-first notes, call it obsidian-notion, research category" is enough to fast-path. When in doubt, run the interview - one confirmation is fine, but never invent behaviour the seed did not state (see the anti-fabrication rule).

---

## Phase 1 - Intent

Ask ONE question via the AskUserQuestion tool:

> "What problem do you want this new command to solve?" (free text)

Read the answer. Confirm understanding back in one sentence before proceeding.

---

## Phase 2 - Naming

From the intent, propose 3 candidate kebab-case names. Names should be lowercase, hyphenated, and start with `obsidian-` (vault-management commands) OR a topic prefix (research toolkit uses `research-*`, social uses `x-*`/`brand-*`) OR just a verb (`create-*`, `import-*`).

Use the AskUserQuestion tool (single-select) with 3 options plus "Other" implicit:

> "Which name should I use?"
> - `<candidate-1>`
> - `<candidate-2>`
> - `<candidate-3>`

After the user picks, validate:
1. Check that `commands/<name>.md` does NOT already exist (use Read; if it succeeds, the name is taken - go back and re-ask)
2. Confirm the name passes the regex `^[a-z][a-z0-9-]*$`

---

## Phase 3 - Category

Ask via the AskUserQuestion tool (single-select, 4 options):

> "Which category does this command belong to?"
> - `vault` - daily writing, capture, find (note creation, retrieval, kanban)
> - `thinking` - synthesis, decisions, learning, reviews
> - `research` - bring external sources into the vault
> - `meta` - vault setup, health, structure, tooling

---

## Phase 4 - Trigger phrases

Generate 3-5 natural-language trigger phrases the user might say to invoke this command (not slash-form). Examples from existing commands: `"save this"`, `"deep research"`, `"weekly review"`. Avoid duplicating triggers already used by other commands (read all `commands/*.md` frontmatter `triggers_en:` once and warn on collisions).

Ask via the AskUserQuestion tool (free text, default to your suggested set):

> "Trigger phrases the user might say to fire this command, comma-separated:"
> Default: `<suggestion-1>, <suggestion-2>, <suggestion-3>`

---

## Phase 5 - Behavior outline

Ask via the AskUserQuestion tool (free text):

> "Describe what the command does in 3-5 numbered steps. Plain English, no code."

Use the answer as the spine of the command body.

---

## Phase 6 - Vault writes? (AI-first compliance gate)

Ask via the AskUserQuestion tool (single-select):

> "Does this command write notes to the user's Obsidian vault?"
> - `yes` - output must apply the AI-first rule (frontmatter, preamble, wikilinks)
> - `no` - read-only, informational, or external-write only

If `yes`: the generated command body MUST end with the AI-first rule footer (see Phase 8).

---

## Phase 7 - External APIs?

Ask via the AskUserQuestion tool (multi-select):

> "Does this command call any external APIs?"
> - Perplexity Sonar (web research)
> - xAI Grok (X posts, x_search tool)
> - YouTube Data API
> - Other (free text)
> - None - purely operates on the vault and conversation

If any are selected, the generated body should include a setup line referencing `~/.config/obsidian-second-brain/.env` and the relevant key (e.g., `PERPLEXITY_API_KEY`).

---

## Phase 8 - Generate the file

Build the new command file. The exact format MUST be:

```
---
description: <one-line, sentence-case, ends without period>
category: <vault | thinking | research | meta>
triggers_en: ["<trigger 1>", "<trigger 2>", "<trigger 3>"]
triggers_es: ["<disparador 1>", "<disparador 2>"]
---

Use the obsidian-second-brain skill. Execute `/<name> $ARGUMENTS`:

<one-sentence framing tying the user's intent (Phase 1) to the action>

1. Read `_CLAUDE.md` first if it exists in the vault root
2. <step from Phase 5, step 1>
3. <step from Phase 5, step 2>
4. <step from Phase 5, step 3>
5. <step from Phase 5, step 4 if present>
6. <step from Phase 5, step 5 if present>

<closing one-liner explaining why this matters>

---

<AI-first footer ONLY if Phase 6 = yes>
**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.
```

Write the file to `commands/<name>.md` using the Write tool.

---

## Phase 9 - Confirm + next steps

Show the user the absolute path of the file you just wrote. Then surface the three follow-up actions:

1. **Build** - `bash scripts/build.sh` will recompile every platform (`dist/claude-code/commands/<name>.md`, plus the per-platform outputs: native Agent Skills + `AGENTS.md` trigger reference for Codex, routing tables in `GEMINI.md` / OpenCode's `AGENTS.md`)
2. **Install** - for Claude Code users who symlink, the new command appears automatically on next session. For other platforms, copy `dist/<platform>/` into the vault.
3. **Iterate** - open the file, refine steps, commit. Or rerun `/create-command` to add a sibling command.

If the new command writes to the vault and the user has the validate-ai-first hook installed, remind them that the validator will warn on missing preamble/frontmatter - that's expected; just follow the AI-first rule in the command's own logic.

---

**Why this matters:** Most "no-code" frameworks fail because they make the user fill out a form. This command treats the conversation itself as the form. Six questions, one file, zero markdown editing. Lowers the contribution bar so anyone can extend the skill - and every command added through this flow lands AI-first-compliant by construction.

---

**Note for future agent:** This is a command that creates commands. Do not run it recursively on itself. Do not rewrite this file when invoked - write a NEW `commands/<name>.md` based on the interview.

**Anti-fabrication:** Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as `TBD`). See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.

© Eugeniu Ghelbur · MIT · eugeniughelbur/obsidian-second-brain

Похожие слэш-команды

Все слэш-команды по теме «Настройка агента: память, контекст, субагенты» →

Сначала — create-command от других авторов.

create-command carlrannaberg Команда create-command помогает собрать новую слэш-команду Claude Code: уточняет её назначение, готовит файл и показывает, как вызвать результат. CX Codex +1 ★ 763звёзд репо obsidian-headless obsidianmd Скилл obsidian-headless для Claude Code запускает синхронизацию и публикацию хранилищ Obsidian через терминал без графического приложения. Он выполняется на сервере, в CI и в песочнице. CX Codex +1 1 200установок wiki-narrate Ar9av Скилл wiki-narrate для Claude Code собирает сводки, объяснения и лекции строго по заметкам Obsidian со ссылками на источники. Готовит отчёты без домыслов и выхода за рамки базы знаний. CX Codex +1 403установок obsidian-cli kepano Скилл obsidian-cli для Claude Code управляет заметками и поиском в хранилище Obsidian через CLI. Также помогает разрабатывать и отлаживать плагины и темы. CX Codex +1 83 700установок obsidian-organizer Agents365-ai Скилл obsidian-organizer для Claude Code и Codex. Раскладывает заметки по папкам хранилища Obsidian и наводит порядок в структуре, когда входящие копятся в корне и нельзя ломать связи между файлами. CX Codex +1 1 900установок llm-wiki Ar9av Скилл llm-wiki для Claude Code задаёт устройство личной вики в Obsidian: слои источников, категории, проекты и шаблон страницы. Определяет структуру хранения знаний, а не загрузку файлов. CX Codex +1 4 200установок moc-agent davila7 Создаёт и обновляет карты контента (MOC) в хранилище Obsidian. Строит навигацию по папкам без карты контента. CX Codex 666установок

Из того же набора51

Весь набор →
obsidian-distill Команда obsidian-distill сжимает длинную заметку или статью до списка тезисов, каждый с отметкой, откуда он взят — параграф, секция или timestamp. CX Codex +1 ★ 5 412звёзд репо obsidian-merge Команда obsidian-merge объединяет дублирующиеся заметки в Obsidian без удаления файлов. Сохраняет канонический текст, переносит связи и превращает старую заметку в ссылку-перенаправление. CX Codex +1 ★ 5 412звёзд репо obsidian-checkin Команда obsidian-checkin сверяет старые заметки с ответами владельца хранилища и сохраняет обновления. Она пригодится, когда сведения о людях или проектах могли измениться. CX Codex +1 ★ 5 412звёзд репо research-deep Команда research-deep сканирует ваше хранилище Obsidian, выявляет пробелы в информации и заполняет их через Perplexity или Grok, потом синтезирует результат и автоматически обновляет заметки о людях, проектах и идеях. CX Codex +1 ★ 5 412звёзд репо obsidian-init Команда obsidian-init сканирует хранилище Obsidian и создаёт _CLAUDE.md, index.md и файлы журнала. Помогает подготовить навигацию и рабочие правила для ИИ. CX Codex +1 ★ 5 412звёзд репо obsidian-health Команда obsidian-health сканирует Obsidian-хранилище, ищет противоречия, пробелы в концепциях, устаревшие данные и проблемы структуры. Выводит результаты по уровню серьёзности. CX Codex +1 ★ 5 412звёзд репо obsidian-calendar Команда obsidian-calendar связывает заметки Obsidian с Google Calendar через четыре режима: просмотр расписания, поиск расхождений с хранилищем, оформление встреч и создание событий. CX Codex +1 ★ 5 412звёзд репо obsidian-ingest Команда obsidian-ingest для Claude Code добавляет источники или папки в Obsidian vault, обновляет сущности и сводит противоречия. Обрабатывает материалы пакетно. CX Codex +1 ★ 5 412звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой