Command Palette

Search for a command to run...

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

prompt-generator

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

Generate or convert Claude Code prompt files — command orchestrators, skill files, agent role definitions, or style conversion of existing files. Follows…

catlog22от catlog22★ 2 110 звёзд на GitHub

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

Generate or convert Claude Code prompt files with concrete, domain-specific content. Four modes:
  • 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 "优化".

- @.claude/skills/prompt-generator/specs/command-design-spec.md - @.claude/skills/prompt-generator/specs/agent-design-spec.md - @.claude/skills/prompt-generator/specs/conversion-spec.md - @.claude/skills/prompt-generator/templates/command-md.md - @.claude/skills/prompt-generator/templates/agent-md.md

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
Полный SKILL.md на GitHub

Установить prompt-generator в Claude Code и Claude Desktop

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

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

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

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

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

Read
Write
Edit
Bash
Glob
AskUserQuestion

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

specs/agent-design-spec.mdspecs/command-design-spec.mdspecs/conversion-spec.mdtemplates/agent-md.mdtemplates/command-md.md

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), без исполняемых скриптов.

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

Сравнить prompt-generator с