Generate
Write an interactive bash wizard script to guide a person through human-only setup (dashboard, credentials, cutover); agent writes and never runs it, person…
от melodic-software★ 34 звезды на GitHub
Установить Generate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Generate a wizard
Some setup needs a person at a browser: signing in to a vendor console, creating a token, adding a DNS record, approving a cutover. Chat instructions for that get lost and have to be written again for the next person. A wizard keeps those instructions in a bash script instead. The person runs it, and it leads them through the work one screen at a time.
Running example
This page uses one fictional case throughout. A project is adding a transactional mail provider and needs three stages:
- Sending domain. The person registers the domain in the provider's console; the wizard keeps
MAIL_FROM_DOMAIN(public) in.env. - DNS records. The person adds the records the console lists at their registrar. Nothing is captured; the stage is an action only.
- API token. The person creates a token with send scope. The wizard keeps
MAIL_API_TOKEN(secret) in.env, and also as a CI secret, because the deploy workflow readssecrets.MAIL_API_TOKEN.
At stage 3 the person sees a Stage 3/3 header, the console's API page opens in their browser, a
line tells them which button creates the token, they paste it into a prompt that does not echo, and
the script confirms it was saved to .env and to the repository's CI secrets.
What you write, and what is fixed
template.sh has two parts. Above its STAGES marker is a library that is the same in
every wizard: never edit it, because a wizard can be trusted only while that part does not vary.
Below the marker is an example stage that you replace. Your work is the stage plan and the stage
code, nothing else. The library already covers:
| Concern | How the library handles it |
|---|---|
| Prompts | Read only from /dev/tty and fail closed, so a pipe, a CI job or a pasted block cannot answer them |
| Opening pages | Accepts https:// URLs only and prints each one before opening it, on macOS, Linux, WSL and Git Bash |
| Secret input | ask_secret hides what is typed |
.env writes |
Values quoted, file mode 0600, rewritten atomically (through a symlinked .env too), with a warning when the file is not gitignored |
| CI writes | gh secret / gh variable with the value on stdin, after the person confirms the target repository |
| Progress and wrap-up | A stage counter, and a closing summary that lists names, never values (only record values, which are public, print in full) |
| Confirmation | gate "Question?" "what is unchanged if you stop" asks, and ends the wizard with that message on anything but a yes |
| Cleanup | on_exit FUNC runs FUNC with the exit status when the wizard ends, by fatal, Ctrl-C, TERM or HUP too; handlers run in reverse order of registration, then the library removes its temp file |
| Dry run | --dry-run prints what each stage would write, open, send or run, and writes nothing; value prompts are skipped. Any other argument stops the wizard, so a mistyped flag never starts a real run |
| Read-back | After each .env write the key is read back and compared; after each CI write the name is listed (a variable's value compared). Only the name, a length or "present" prints |
| Credential proof | prove_credential KEY "manual step" FUNC hands the value to FUNC on stdin, discards everything it prints, and shows pass or fail |
| A failed stage | attempt "manual step" CMD ..., a failed .env read-back or a refused credential shows the one manual step that finishes the stage; a yes goes on and the summary lists it as finished by hand, anything else stops the wizard. A failed CI read-back goes to the closing summary's still-to-do list with the gh command that finishes it, as other gh failures do |
| Record-only values | record KEY VALUE keeps a public value for the closing summary only, and refuses a key captured with ask_secret |
| Temporary credentials | temporary KEY "where to delete it" lists the key for deletion in the closing summary |
Running a wizard needs bash; on Windows, use Git Bash or WSL. An authenticated gh matters only to
stages that write CI secrets or variables. Without it, those stages print a warning and appear in
the closing summary as manual work, and the rest of the run carries on.
Phase 1: the stage plan
The plan is one table, a row per stage in run order. For the running example:
| Stage | Kind | Value | Secret | Saved to | How the person gets it |
|---|---|---|---|---|---|
| Sending domain | browser | MAIL_FROM_DOMAIN |
no | .env |
Mail console: Domains, Add domain, enter the domain |
| DNS records | browser | none | n/a | nowhere | Registrar: DNS settings, add each record the console listed |
| API token | browser | MAIL_API_TOKEN |
yes | .env and CI secret |
Mail console: API, Create token, send scope, copy it |
The Kind column is browser (the person works in a web page), cli (the person runs a command, or
the wizard does after a gate) or local (the person edits or checks a file on this machine). A
wizard with no
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- template.sh
- template.test.sh
FAQ
Что делает скилл Generate?
Write an interactive bash wizard script to guide a person through human-only setup (dashboard, credentials, cutover); agent writes and never runs it, person runs it in their terminal. Use when: 'provisioning credentials', 'set up CI secrets', 'walk me through the dashboard'. Not for steps the agent can run itself.
Как установить скилл Generate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Generate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…