Command Palette

Search for a command to run...

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

script-builder

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

Generate durable, re-runnable scripts from session intent — validation scripts (PASS/FAIL contract) AND gather/bulk scripts (many API/tool calls in code, one…

desplega-aiот desplega-ai★ 38 звёзд на GitHub

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

script-builder

You are converting session intent into a durable, re-runnable script committed to the target project's scripts/ directory. Two script classes share one principle — only the derived answer re-enters context; raw payloads never do:

  • Validation scripts (check-*, e2e-*, smoke-*, …): a single PASS/FAIL line + /tmp log path on success, full verbose output redirected to a timestamped log file.
  • Gather/bulk scripts (gather-*, bulk-*): replace N similar tool/API calls with one script that loops, filters, and aggregates in code — stdout is one compact summary block (JSON or table), raw responses go to the /tmp log. Rubric (from production code-mode data): past ~10 items or any fan-out over a list, a script beats individual tool calls by ~100x on context and roughly halves end-to-end cost. Offer the script before the fan-out happens when you can see it coming, not just retrospectively.

Both classes get an <important if> block in CLAUDE.md/AGENTS.md so future agents discover the script when the intent recurs — durable scripts are reusable agent memory: import, don't re-derive.

Schema discovery happens in code, too: when scripting against an unfamiliar API, grep/filter its OpenAPI spec or typed client programmatically to find the few relevant endpoints — never paste the full schema into context.

Working Agreement

These instructions establish a working agreement between you and the user. The key principles are:

  1. AskUserQuestion is your primary communication tool - Whenever you need to ask the user anything (clarifications, preferences, decisions, confirmations), use the AskUserQuestion tool. Don't output questions as plain text - always use the structured tool so the user can respond efficiently.

  2. Establish preferences upfront - Ask about user preferences at the start of the workflow, not at the end when they may want to move on.

  3. Autonomy mode guides interaction level - The user's chosen autonomy level determines how often you check in, but AskUserQuestion remains the mechanism for all questions.

When to Use

This skill activates when:

  • User invokes /script-builder command
  • Another skill references **OPTIONAL SUB-SKILL:** desplega:script-builder
  • A planning, qa, or verifying flow needs a re-runnable validation script that doesn't yet exist
  • The user expresses intent to "turn X into a script", "wrap this validation into something reusable", or "I want to test X end-to-end" with no existing script

Autonomy Mode

Adapt your behavior based on the autonomy mode:

Mode Behavior
Autopilot Detect mode, draft, syntax-check, document, and (if escalation tier) run + iterate without intermediate confirmations. Pause only at hard blockers or destructive side-effects.
Critical (Default) Confirm at each tier boundary (after draft, before doc edit, before run). Use AskUserQuestion for fix application during iterate loop.
Verbose Confirm before each step. Show every diff. Walk through detection reasoning out loud.

The autonomy mode is passed by the invoking command. If not specified, default to Critical.

Process Steps

Step 1: Detect Mode (Retrospective vs Forward-Declared)

Decide silently — do not ask the user "which mode?". Use the following heuristics:

  1. Scan recent session tool-use history (the last ~20 tool calls in the current conversation) for test/validation-shaped activity: curl/fetch calls, bun run/python/pytest, database queries, agent-browser actions, repeated grep/log inspection of a single endpoint or table. If ≥2 such actions targeting the same area exist → retrospective mode. Separately, if the history (or the task ahead) shows the same call shape repeated ~10+ times or a fan-out over a list → gather-script mode: propose replacing the repetition with one gather-* script before continuing.
  2. Parse the user's invocation message for cues:
    • Narrative cues → retrospective: "we just figured out", "turn this into a script", "wrap that in", "that thing we just did".
    • Intent cues → forward-declared: "I want to test", "validate that", "smoke check", "check before deploy".
  3. Fallback: when ambiguous, default to forward-declared.

Retrospective first action: summarize the observed activity back to the user as plain text (≤6 lines: what was probed, against what, with what success signal), then go to Step 3 with a confirmation prompt instead of Q&A.

Forward first action: skip directly to Step 3's Q&A.

Step 2: Scan Existing Scripts for Overlap

Resolve the scripts directory in this order:

  1. Check CLAUDE.md for a <!-- script-builder:dir=<path> --> marker. If present, use that path.
  2. If scripts/ exists at the repo root, use it.
  3. Use AskUserQuestion with options: scripts/ (Recommended) | custom path | skip dir persistence for this run.

**Edge case

Полный SKILL.md на GitHub

Установить script-builder в Claude Code и Claude Desktop

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

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

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

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

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

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

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

templates/README.mdtemplates/bash.sh.tmpltemplates/python.py.tmpltemplates/typescript.ts.tmpl

FAQ

Что делает скилл script-builder?

Generate durable, re-runnable scripts from session intent — validation scripts (PASS/FAIL contract) AND gather/bulk scripts (many API/tool calls in code, one derived summary out). Supports TypeScript, Python, Bash with auto-detection, enforces context-optimal output, and auto-documents scripts in CLAUDE.md. Triggers on "turn this into a script", "I want to test/validate X end-to-end", "wrap this in a re-runnable script" — and, critically, whenever you are about to make (or just made) ~10+ similar tool/API calls or any bulk fan-out over a list: that mechanical middle belongs in a script, not in context.

Как установить скилл script-builder?

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

Скилл script-builder запускает скрипты?

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

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

Сравнить script-builder с