prompt-engineer
БесплатноЗапускает вложенные скриптыНе проверенCreate a highly optimized prompt for an AI agent based on user input. Use when the user asks to improve, rewrite, or optimize a prompt, or when they want to…
от onfire7777★ 17 звёзд на GitHubОб этом скилле
Agent Prompt Engineer
Transform any raw user idea or prompt into an elite, agent-optimized prompt. Uses configured model roles and agent-specific context engineering principles to produce prompts that save credits, prevent errors, and deliver stronger results.
Prerequisites
At least one AI API key must be set as an environment variable:
OPENROUTER_API_KEY- Required for multi-model optimization in standard/deep depth.OPENAI_API_KEY- Required for quick mode and OpenAI-compatible synthesis.
If only one key is available, the script automatically falls back to quick mode (single model). If no keys are set, the script exits with an error. Python packages requests and openai must be installed.
Quick Start
python3 /home/ubuntu/skills/prompt-engineer/scripts/optimize_prompt.py "your raw prompt here"
With full analysis and comparison metrics:
python3 /home/ubuntu/skills/prompt-engineer/scripts/optimize_prompt.py "your raw prompt here" --show-analysis --show-comparison
Workflow
- Understand the User's Goal: If the request is extremely vague (fewer than 10 words or no clear task), ask ONE clarifying question. Otherwise, proceed with reasonable assumptions; the optimizer handles ambiguity well.
- Run the Optimizer: Execute the script with the user's raw prompt. For long prompts, save to a file first and use
--file. - Review the Output: Verify the generated prompt applies agent-specific principles (One-Shot Density, Agent-First Framing, explicit tool usage).
- Deliver to User: Present the optimized prompt in a markdown code block for easy copy-paste. Briefly explain why it is better.
Advanced Usage
Modes: --mode agent (autonomous tasks), --mode chat (conversational), --mode project (reusable workflows). Default: auto-detect.
Depths: --depth quick (single model, fast), --depth standard (parallel models + merge, default), --depth deep (intensive multi-model with advanced patterns).
File Input: For long prompts, save to a file and use --file /path/to/prompt.txt.
Stdin Input: Pipe input with echo "prompt" | python3 scripts/optimize_prompt.py --stdin. Note: --stdin requires piped input; it will hang if run interactively without piping.
Individual Results: Use --show-individual to see each model's optimization before the merge.
Save Output: Use -o result.md to save the optimized prompt to a file.
Prompt Engineering Knowledge Base
For manual prompt construction or teaching users how to write better prompts, consult these bundled reference files (confirmed present in the skill directory):
references/agent_context_engineering.md: Core agent context engineering principles (one-shot density, agent-first framing, file system as memory, attention management, error prevention) and structured prompt templates for agent tasks, research, and code development.references/prompt_patterns.md: Quick reference for 26+ advanced patterns (Tree of Thoughts, Self-Consistency, Red Team/Blue Team, etc.), intent-specific optimization strategies, and a 10-point optimization checklist.
Key Principles
- One-Shot Density: Pack everything into one prompt. Follow-ups cost almost as much as the initial prompt.
- Agent-First Framing: Treat the assistant as an autonomous agent, not a chatbot. Use phrases like "Take ownership" and "Guide step by step."
- Explicit Deliverables: Always specify exact output formats, file types, and directory structures.
- Leverage Tools: Explicitly mention tools like the shell, browser, or Python when relevant.
Установить prompt-engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл prompt-engineer?
Create a highly optimized prompt for an AI agent based on user input. Use when the user asks to improve, rewrite, or optimize a prompt, or when they want to learn how to write better prompts for agentic AI workflows. Requires OPENROUTER_API_KEY and/or OPENAI_API_KEY environment variables.
Как установить скилл prompt-engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prompt-engineer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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