prompt-generator
БесплатноБез исполняемых скриптовНе проверенGenerate or convert Claude Code prompt files — command orchestrators, skill files, agent role definitions, or style conversion of existing files. Follows…
от catlog22★ 2 110 звёзд на GitHubОб этом скилле
- Create command — new orchestration workflow at
.claude/commands/or~/.claude/commands/ - Create skill — new skill file at
.claude/skills/*/SKILL.md(progressive loading, no @ refs) - Create agent — new role + expertise file at
.claude/agents/ - Convert — restyle existing command/skill/agent to GSD conventions with zero content loss
Content separation principle (from GSD): commands/skills own orchestration flow; agents own domain knowledge. Skills are a variant of commands but loaded progressively inline — they CANNOT use @ file references.
Invoked when user requests "create command", "new command", "create skill", "new skill", "create agent", "new agent", "convert command", "convert skill", "convert agent", "prompt generator", or "优化".
1. Determine Artifact Type
Parse $ARGUMENTS to determine what to generate.
| Signal | Type |
|---|---|
| "command", "workflow", "orchestrator" in args | command |
"skill", "SKILL.md" in args, or path contains .claude/skills/ |
skill |
| "agent", "role", "worker" in args | agent |
| "convert", "restyle", "refactor", "optimize", "优化" + file path in args | convert |
| Ambiguous or missing | Ask user |
Convert mode detection: If args contain a file path (.md extension) + conversion keywords, enter convert mode. Extract $SOURCE_PATH from args. Auto-detect source type from path:
.claude/commands/→ command.claude/skills/*/SKILL.md→ skill.claude/agents/→ agent
Skill vs Command distinction: Skills (.claude/skills/*/SKILL.md) are loaded progressively inline into the conversation context. They CANNOT use @ file references — only Read() tool calls within process steps. See @specs/command-design-spec.md → "Skill Variant" section.
If ambiguous:
AskUserQuestion(
header: "Artifact Type",
question: "What type of prompt file do you want to generate?",
options: [
{ label: "Command", description: "New orchestration workflow — process steps, user interaction, agent spawning" },
{ label: "Skill", description: "New skill file — progressive loading, no @ refs, inline Read() for external files" },
{ label: "Agent", description: "New role definition — identity, domain expertise, behavioral rules" },
{ label: "Convert", description: "Restyle existing command/agent/skill to GSD conventions (zero content loss)" }
]
)
Store as $ARTIFACT_TYPE (command | skill | agent | convert).
2. Validate Parameters
If $ARTIFACT_TYPE is convert: Skip to Step 2c.
Extract from $ARGUMENTS or ask interactively:
Common parameters (create mode):
| Parameter | Required | Validation | Example |
|---|---|---|---|
$NAME |
Yes | /^[a-z][a-z0-9-]*$/ |
deploy, gsd-planner |
$DESCRIPTION |
Yes | min 10 chars | "Deploy to production with rollback" |
Command-specific parameters:
| Parameter | Required | Validation | Example |
|---|---|---|---|
$LOCATION |
Yes | "project" or "user" |
project |
$GROUP |
No | /^[a-z][a-z0-9-]*$/ |
issue, workflow |
$ARGUMENT_HINT |
No | any string | "<phase> [--skip-verify]" |
Agent-specific parameters:
| Parameter | Required | Validation | Example |
|---|---|---|---|
$TOOLS |
No | comma-separated tool names | Read, Write, Bash, Glob |
$SPAWNED_BY |
No | which command spawns this agent | /plan-phase orchestrator |
Normalize: trim + lowercase for $NAME, $LOCATION, $GROUP.
3. Resolve Target Path
Command:
| Location | Base |
|---|---|
project |
.claude/commands |
user |
~/.claude/commands |
If $GROUP:
$TARGET_PATH = {base}/{$GROUP}/{$NAME}.md
Else:
$TARGET_PATH = {base}/{$NAME}.md
Skill:
$TARGET_PATH = .claude/skills/{$NAME}/SKILL.md
Agent:
$TARGET_PATH = .claude/agents/{$NAME}.md
Check if $TARGET_PATH exists → $FILE_EXISTS.
4. Gather Requirements
4a. Pattern discovery — Find 3+ similar files in the project for style reference:
# For commands: scan existing commands
ls .claude/commands/**/*.md 2>/dev/null | head -5
# For agents: scan existing agents
ls .claude/agents/*.md 2>/dev/null | head -5
Read 1-2 similar files to extract patterns: section structure, naming conventions, XML tag usage, prompt style.
4b. Domain inference from $NAME, $DESCRIPTION, and context:
| Signal | Extract |
|---|---|
| `$NAM |
Установить prompt-generator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobAskUserQuestionВложенные файлы
FAQ
Что делает скилл prompt-generator?
Generate or convert Claude Code prompt files — command orchestrators, skill files, agent role definitions, or style conversion of existing files. Follows GSD-style content separation with built-in quality gates. Triggers on "create command", "new command", "create skill", "new skill", "create agent", "new agent", "convert command", "convert skill", "convert agent", "prompt generator", "优化".
Как установить скилл prompt-generator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prompt-generator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop 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…
от Anthropicinternal-comms
A 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…
от Anthropicskill-development
This 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…
от Anthropic