agentsclimarketplace

Prompt engineer

Skill onfire7777/universal-ai-skills-library/skills/prompt-engineer

Router-first AI skill system for Codex, Claude, Cursor, Hermes, Paperclip, OpenCode, and local AI stacks: search, preflight-route, and load 1,812 skills on demand without duplicating the corpus.

Install
npx -y skills add onfire7777/universal-ai-skills-library --skill prompt-engineer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

3.9 KB, as published. Nobody here has run it

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

  1. 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.
  2. Run the Optimizer: Execute the script with the user's raw prompt. For long prompts, save to a file first and use --file.
  3. Review the Output: Verify the generated prompt applies agent-specific principles (One-Shot Density, Agent-First Framing, explicit tool usage).
  4. 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

  1. One-Shot Density: Pack everything into one prompt. Follow-ups cost almost as much as the initial prompt.
  2. Agent-First Framing: Treat the assistant as an autonomous agent, not a chatbot. Use phrases like "Take ownership" and "Guide step by step."
  3. Explicit Deliverables: Always specify exact output formats, file types, and directory structures.
  4. Leverage Tools: Explicitly mention tools like the shell, browser, or Python when relevant.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.