Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dashboard-plugin-scaffold

БесплатноБез исполняемых скриптовНе проверен

Scaffold a new pi-dashboard plugin in the dashboard monorepo, OR augment an existing pi-extension project on disk with dashboard plugin contributions. Hybrid…

BlackBeltTechnologyот BlackBeltTechnology★ 357 звёзд на GitHub

Об этом скилле

Dashboard Plugin Scaffold

Two modes, one skill. Mode new scaffolds packages/<id>-plugin/ inside the dashboard monorepo. Mode augment retrofits an existing pi-extension at the current working directory with a pi-dashboard-plugin manifest field and a src/dashboard/ React subtree. An augmented project lives outside the dashboard monorepo, so its client is runtime-delivered: a prebuilt bundle (dist/client/) built with the SDK preset, loaded by the stock dashboard.

Server TypeScript must be erasable. The dashboard server loads a plugin's server entry with Node's strip-only TypeScript loader, so plugin server code must not use enum, runtime namespace, or constructor parameter properties, and must import type-only symbols with import type. A plugin that does fails to load in isolation (the error names the file). The templates already comply; keep them that way when editing.

Step 1 — Up-front ask_user batch

Use the ask_user tool, method batch, with these questions in order:

# Method Title Notes
1 select "Mode" options: ["new — scaffold a fresh packages/<id>-plugin/ in this dashboard monorepo", "augment — retrofit an existing pi-extension at cwd with dashboard plugin contributions"]
2 input "Plugin id (kebab-case)" (mode new only) — validated ^[a-z][a-z0-9-]*$, must not collide with existing packages/<id>-plugin/
3 input "Display name" (mode new only) — free text, e.g. "Acme Plugin"
4 input "Priority (default 100; lower = earlier)" (mode new only) — integer string
5 multiselect "Slot claims" (mode new only) — options: see references/slot-taxonomy.md for the 10 React slots
6 confirm "Scaffold a server entry (REST routes + WS handlers)?" (mode new only) — default true
7 confirm "Scaffold a bridge entry (pi extension that loads in every pi session)?" (mode new only) — default false, high blast radius
8 confirm "Scaffold a configSchema.json?" (mode new only) — default true
9 select "Embedded app scope" (mode new only) — options: ["none — no embedded app", "global — one app, not tied to a folder", "project-type — an app on every folder of a project type (marker files)", "project-specific — an app on one project (a declared project id)"]. See Embedded app scope.
10 input "Project type (^[a-z][a-z0-9-]{0,63}$)" scope project-type only
11 input "Marker patterns, one per line (1–16; max 3 segments, * inside a segment only, no **, no .git/node_modules)" scope project-type only, e.g. model/*.judo
12 input "Project id (^[a-z][a-z0-9-]{0,63}$)" scope project-specific only
13 input "Absolute folder to write the project id into (empty = do not write)" scope project-specific only

Skip questions 2-13 entirely if mode is augment; skip 10-13 unless the scope needs them. The augment-mode questions come after the analysis, in step 4b.

Step 2 — Branch on mode

If the user picked new, jump to Step 3a — New mode.

If the user picked augment, jump to Step 3b — Augment mode preflight.


Step 3a — New mode

3a.1 Validate inputs

# Confirm the dashboard monorepo root by walking up for openspec/ + packages/
ROOT=$(pwd)
while [ "$ROOT" != "/" ] && [ ! -d "$ROOT/openspec" ]; do ROOT=$(dirname "$ROOT"); done
[ -d "$ROOT/openspec" ] || { echo "Not inside the dashboard monorepo (no openspec/ dir found)" >&2; exit 1; }
[ -d "$ROOT/packages" ] || { echo "Monorepo missing packages/ dir" >&2; exit 1; }

# Validate id
echo "<id>" | grep -qE '^[a-z][a-z0-9-]*$' || { echo "id must be kebab-case" >&2; exit 1; }

# Refuse collision
[ ! -d "$ROOT/packages/<id>-plugin" ] || { echo "packages/<id>-plugin already exists" >&2; exit 1; }

Substitute <id> with the user-provided id throughout.

Validate the app-scope answers (questions 9-13) against the same rules the dashboard applies — the renderer re-checks and prints every violation. On any violation: report them all and stop; write nothing and do not re-ask (no extra prompt beyond the final summary confirm).

3a.2 Run the renderer

The renderer lives in this skill's parent package as a bin script:

# Locate the bin script (works whether the skill is installed globally or per-workspace)
SKILL_PKG=$(node -e "console.log(require.resolve('@blackbelt-technology/pi-dashboard-plugin-skill/package.json'))" | xargs dirname)
RENDERER="$SKILL_PKG/src/bin/scaffold.ts"

# Pass answers as JSON via stdin
cat <<JSON | node --import "$(node -e "import('@blackbelt-technology/pi-dashboard-shared/jiti-register.ts')")" "$RENDERER"
{
  "mode": "new",
  "id": "<id>",
  "displayName": "<displayName>",
  "priority": <priority>,
  "slots": [<slotsJsonArray>],
  "server": <true|false>,
  "bridge": <true|false>,
  "configSchema": <
Полный SKILL.md на GitHub

Установить dashboard-plugin-scaffold в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/build-integration.mdreferences/host-design.mdreferences/manifest-schema.mdreferences/plugin-context-api.mdreferences/server-context-api.mdreferences/slot-taxonomy.mdreferences/tui-to-dashboard-mapping.md

FAQ

Что делает скилл dashboard-plugin-scaffold?

Scaffold a new pi-dashboard plugin in the dashboard monorepo, OR augment an existing pi-extension project on disk with dashboard plugin contributions. Hybrid skill: a single ask_user batch up front, then prescriptive steps the agent follows. Use when the user asks to "create a dashboard plugin", "add dashboard support to my extension", "scaffold a plugin", or similar.

Как установить скилл dashboard-plugin-scaffold?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dashboard-plugin-scaffold запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dashboard-plugin-scaffold с