Command Palette

Search for a command to run...

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

prompt-optimizer

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

Transform vague user requests into precise, high-quality prompts. Two engines: template matching (3300+ library) + LLM meta-prompting (host AI as optimizer)…

thomaszhou22от thomaszhou221 078 установок в других каталогах

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

Prompt Optimizer

Dual-engine prompt optimization: template matching (3,300+ template library) + LLM meta-prompting (the host AI optimizes directly).

Platform Adaptation (auto-detected)

On startup the skill probes the host platform's capabilities and degrades unavailable features:

Capability Detection Present → behavior Absent → fallback
File reading Try reading references/categories/index.json Template engine available Force llm-only mode; hide template-related instructions
File writing Try writing memory/prompt_optimizer_state.json State persistence In-conversation memory only; write no files
Large-file handling Read categories/coding.json (1.5MB) Load by category Small categories or pure LLM only

Startup behavior:

  1. Try to read references/categories/index.json
    • Success → template engine available; continue to write-capability check
    • Failure → inform the user: "This platform does not support file reading; automatically switched to pure LLM mode"
  2. Try to write memory/prompt_optimizer_state.json
    • Success → persistence works
    • Failure → in-conversation memory; tell the user "state is valid only for this conversation"

Onboarding (first use)

When the user first mentions prompt optimization and memory/prompt_optimizer_state.json does not exist, run a one-time onboarding:

  1. Introduce the capability (one sentence): "Prompt Optimizer turns vague instructions into precise, structured prompts, with two engines: template matching + direct AI optimization."

  2. Ask a few quick configuration questions:

    • a) What do you mainly use prompts for?

      • Coding/development → default-load the coding category
      • Writing/content creation → default-load writing + creative-generation
      • Business/consulting → default-load business + consulting
      • Education → default-load education
      • A bit of everything → default-load coding (50% of the library; widest coverage)
    • b) Engine preference?

      • "Fast and token-saving" → template-first (default)
      • "Deep customization" → llm-only
      • "Templates only" → template-only
    • c) Output format preference?

      • Plain text (default)
      • Markdown
      • XML
      • All of them
    • d) Template edition?

      • Lite (fast everyday optimization)
      • Full (formal projects, more comprehensive)
  3. Write the initial state file memory/prompt_optimizer_state.json (note: enabled stays false — preferences are saved, but the skill activates only when the user explicitly turns it on):

    {
      "enabled": false,
      "mode": "lite|full",
      "engine": "template-first|llm-only|template-only",
      "output_format": "text|markdown|xml|all",
      "categories": ["..."],
      "onboarded": true,
      "turned_on_at": null
    }
    
  4. Confirm completion: "Preferences saved! The optimizer stays OFF until you say 'turn on prompt optimization' — then just send me any prompt and I'll optimize it. Say 'switch engine' or 'load new category' anytime to adjust."

Onboarding runs exactly once; every later activation reads the state file directly.

Toggle Mechanism

Off by default; activates only on an explicit user instruction.

Action Example commands
Turn on "turn on prompt optimization", "enable lite mode"
Turn on (full) "enable full prompt optimization"
Turn off "turn off prompt optimization"
Set engine "set engine to ..." (see below)
Set output format "set output format to Markdown / XML / plain text / all"

🔄 Engine Modes (user-selectable)

Mode Command Mechanism Best for
Template-first + LLM fallback (default) "set engine to template-first" Search the library first; if no match, let the LLM generate Daily use; token-saving
Pure LLM "set engine to llm-only" Skip the library; the host AI optimizes directly Custom needs, domains the library doesn't cover
Template-only "set engine to template-only" Library only; report when nothing matches Maximum speed; zero extra tokens

Core idea of LLM meta-prompting: this skill runs inside the host AI (OpenClaw / Claude Code / etc.), so the host AI itself is the optimization engine. No external API calls — the current AI simply works as a "prompt optimization expert".

Edition differences:

  • Lite (~3MB, templates truncated to 800 chars): fast everyday optimization
  • Full (~10MB, complete, untruncated): formal projects

📦 The template library files are NOT included in the ClawHub package (too large). Fetch from GitHub:

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

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

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

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

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

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

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

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

FAQ

Что делает скилл prompt-optimizer?

Transform vague user requests into precise, high-quality prompts. Two engines: template matching (3300+ library) + LLM meta-prompting (host AI as optimizer). Only activates when the user explicitly turns it on.

Как установить скилл prompt-optimizer?

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

Скилл prompt-optimizer запускает скрипты?

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

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

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