/h2t-core:scaffold-projectfrom h2t-core
Create and register a new project in h2t ecosystem via interactive wizard. Triggers on "/scaffold-project", "scaffold", "новый проект", "new project". After creation: calls docs-init with explicit --repo-root, writes docs-lint template config, writes a machine-readable setup report, installs on-stop hook into .claude/settings.json. After GitHub creation: syncs labels via docs-sync-labels. Handles all states: new repo, existing dir without git (--merge), existing git repo (registration only). init-project is for automated session-start hook use only.
Ships in h2t-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the wizard. Ask the user questions in natural conversation, then run the scaffolding. No UI framework — just Claude asking questions and acting on answers.
Run this before any other command of this skill:
h2t-ops version --expect 4.1.3 --json
Act on the result, in this order:
"ok": true — continue."ok": false — show the user error.hint as it is and stop this skill until
it is resolved. Do not run anything the hint names unless the user asks you to: on
reason: path it is a command for the user to decide on. error.details.reason names the
case: not_installed, version or path.command not found — read ~/.h2t/run/install.env
(grep -E '^(STATE|H2T_HOOK)=' ~/.h2t/run/install.env). With STATE=ready the install
is fine and PATH does not reach it: show the directory of the H2T_HOOK= path, ask the
user to restart the harness, and offer uv tool update-shell for them to run. Without
it there is no install: give the user uvx --isolated --python 3.12.11 --managed-python -c "https://github.com/lichtpfad/h2t-skills/releases/download/v4.1.3/constraints.txt" --from "h2t-ops @ https://github.com/lichtpfad/h2t-skills/releases/download/v4.1.3/h2t_ops-4.1.3-py3-none-any.whl" h2t-setup sync.uvx --isolated --python 3.12.11 --managed-python -c "https://github.com/lichtpfad/h2t-skills/releases/download/v4.1.3/constraints.txt" --from "h2t-ops @ https://github.com/lichtpfad/h2t-skills/releases/download/v4.1.3/h2t_ops-4.1.3-py3-none-any.whl" h2t-setup sync.for _cmd in h2t-scaffold-project h2t-project-register h2t-hook; do
command -v "$_cmd" >/dev/null 2>&1 || { echo "ERROR: $_cmd not found. Run /h2t-core:setup"; exit 1; }
done
Ask in a single prompt (user can answer inline or line-by-line):
Создаём новый проект. Ответь на несколько вопросов:
1. **ID проекта** — kebab-case, станет именем директории (напр. my-tool)
2. **Домен** — в каком домене живёт проект?
Доступные: ключи из твоего `domains.yaml` (`h2t-ops settings get domains`)
3. **Тип:**
- `code-github` — Git-репо + GitHub
- `code-local` — Git-репо, без GitHub
- `docs` — документация/исследование (без кода)
- `dcc` — TouchDesigner / Houdini проект
- `directory` — просто директория без git
4. **Stack** (только для code): python | js | ts | rust | none
5. **Краткое описание** (1 строка, для README и CLAUDE.md)
Parse the user's answer. Ask follow-up only for any missing required fields.
dcc type, stack = "none".Resolve the default base directory first — do not name a literal path:
BASE_DIR="${H2T_DEV_ROOT:-$(cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.." && pwd)}"
H2T_DEV_ROOT when set; otherwise the parent of the current checkout, which is where sibling
repositories already live. This used to read C:/dev/{id}, correct on one machine and wrong
on every other — including the author's Mac, where checkouts are under ~/Projects.
Ask: "Where should the project go? (default: $BASE_DIR/{id})"
Accept:
. / yes → use $BASE_DIR/{id}Resolve project_dir = {base_dir}/{id} (prepend $BASE_DIR/ if relative).
Run state detection:
[ -d "{project_dir}" ] && echo "EXISTS" || echo "NEW"
git -C "{project_dir}" rev-parse --git-dir 2>/dev/null && echo "HAS_GIT" || echo "NO_GIT"
| State | Meaning | Next |
|---|---|---|
| NEW | Directory doesn't exist | Step 3: dry-run without --merge |
| EXISTS + NO_GIT | Existing dir, no git | Step 3: dry-run with --merge |
| EXISTS + HAS_GIT | Already a git repo | Skip to Step 5 (registration only) |
Show detected state in one line, e.g. Состояние: EXISTS+NO_GIT → дополняем.
Run (add --merge only if state is EXISTS+NO_GIT):
h2t-scaffold-project create \
--id "{id}" --type "{type}" --stack "{stack}" \
--dir "{base_dir}" --description "{description}" \
[--merge] # only if state is EXISTS+NO_GIT
--dry-run
Show the would_create list from JSON output as a bullet list.
If "merge": true in output → note: "Существующие файлы не будут перезаписаны. Только новые файлы войдут в коммит."
⛔ HARD GATE — call AskUserQuestion tool now. Do NOT run Step 4 until the user selects "Создать".
Call AskUserQuestion with:
{
"questions": [{
"question": "Создать проект {id} по плану выше?",
"header": "Подтверждение",
"options": [
{"label": "Создать", "description": "Запустить scaffolding — создать структуру и зарегистрировать"},
{"label": "Отмена", "description": "Остановиться, ничего не создавать"}
],
"multiSelect": false
}]
}
If user selects "Отмена" — stop immediately. Do NOT continue to Step 4.
Run (add --merge only if state is EXISTS+NO_GIT):
h2t-scaffold-project create \
--id "{id}" --type "{type}" --stack "{stack}" \
--dir "{base_dir}" --description "{description}" \
[--merge] # only if state is EXISTS+NO_GIT
Parse JSON. If "status": "error" — show error and stop.
Show actions list as checkmarks. Note "path" — this is the project root.
Determine task tracker:
code-github → ask: "Task tracker: github или none?"code-local, docs, directory → tracker = "none"dcc → tracker = "none"Determine --github arg:
code-github → set github_slug = "{github_owner}/{id}". Ask: "GitHub owner? (по умолчанию: вывод gh api user --jq .login)"--githubRun:
h2t-project-register \
--id "{id}" --domain "{domain}" --type "{reg_type}" \
--label "{label}" --task-tracker "{tracker}" \
--cwd "{project_path}" \
[--github "{github_slug}"] \
[--stack "{stack}"]
Where:
{label} = human-readable name (capitalised id by default, user can override){reg_type} = git for code-github, git-local for code-local, directory for othersShow actions and next_steps from JSON output.
Then run the truth gate: load ../init-project/references/truth-gate.md and follow it
(three answers by command, written into the new project's CLAUDE.md). For a brand-new
repo most rows will be red — that is fine and recorded; a missing row is not.
Ask: "Создать GitHub repo {github_slug}? (public/private/skip)"
If public or private:
h2t-scaffold-project github \
--github "{github_slug}" \
--description "{description}" \
--source "{project_path}" \
[--private]
If error → show it but continue.
If skip → remind: "Создай вручную и добавь remote: git remote add origin [email protected]:{github_slug}.git"
Ask: "Создать начальные milestones? Введи названия через запятую (или skip):"
If user provides names:
for milestone in {milestones}; do
gh milestone create --title "$milestone" --repo "{github_slug}"
done
Labels are applied by a separate skill — canonical labels live in
~/.h2t/config/labels.json and are synced by /h2t-dev:docs-sync-labels. Tell the user:
"Запусти /h2t-dev:docs-sync-labels в новом репо для применения канонических labels."
Show:
✓ Проект создан: {project_path}
✓ Зарегистрирован: {domain}/{id}
✓ Truth gate: {n_green}/3 green (см. CLAUDE.md → Truth gate)
[✓ GitHub: https://github.com/{github_slug}]
Открыть сессию в новом проекте?
If yes → instruct: "Открой Claude Code в {project_path} и запусти /h2t-core:session-start"
(Cannot auto-switch cwd in current session.)
| Situation | Action |
|---|---|
h2t-scaffold-project not found | The version check at the top of this skill covers it; follow its outcome |
h2t-project-register error | Show error, ask: "Зарегистрировать вручную через /h2t-core:init-project позже?" |
gh not found | Skip GitHub steps, remind to install gh CLI |
| Directory already exists | Show warning, ask: "Директория уже существует. Продолжить (дополнить) или выбрать другой путь?" |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lichtpfad/h2t-skills --plugin h2t-core11 skills in this plugin
/agent-profileProject-scoped Claude plugin profile manager. Apply base profiles (dev, pos, ops, creative, dcc, product, marketing, mixed) and work contexts to control which plugins load per repo. Supports profile:name and overlay:name explicit refs plus bare-name legacy compat. Triggers: "agent-profile", "apply profile", "plugin profile", "set profile", "configure plugins", "профиль плагинов", "конфигуратор профиля".
/autonomous-runLaunch or resume an autonomous, unattended plan-execution run after brainstorm is complete. Generates a durable, self-contained runbook artifact, materializes a TodoWrite mirror of the pipeline, and carries the decision + gate protocols through to handoff. Use for "работай сам", "автономно", "overnight", "выполни план сам", "autonomous run", "resume runbook"./Other plugins' skills for the same job