prompt-optimizer
БесплатноБез исполняемых скриптовНе проверенTransform vague user requests into precise, high-quality prompts. Two engines: template matching (3300+ library) + LLM meta-prompting (host AI as optimizer)…
от 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:
- 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"
- 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:
Introduce the capability (one sentence): "Prompt Optimizer turns vague instructions into precise, structured prompts, with two engines: template matching + direct AI optimization."
Ask a few quick configuration questions:
a) What do you mainly use prompts for?
- Coding/development → default-load the
codingcategory - 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)
- Coding/development → default-load the
b) Engine preference?
- "Fast and token-saving" →
template-first(default) - "Deep customization" →
llm-only - "Templates only" →
template-only
- "Fast and token-saving" →
c) Output format preference?
- Plain text (default)
- Markdown
- XML
- All of them
d) Template edition?
- Lite (fast everyday optimization)
- Full (formal projects, more comprehensive)
Write the initial state file
memory/prompt_optimizer_state.json(note:enabledstaysfalse— 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 }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:
- Lite:
https://raw.githubusercontent.com/Thomaszhou22/prompt-optimizer-skill/main/references/prompt_library_lite.json- Full: `https://raw.githubusercontent.com/Thomaszhou22/prompt-optimizer-skill/main/references/prompt_library_full.js
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic