Prompt Optimizer logo

Prompt Optimizer

Community
wasintoh
prompt-optimizer

Advanced prompt optimization and composition system for all prompt types (system prompts, task-specific, creative, technical, agentic). Use when users need to refine, optimize, or transform prompts to achieve better AI outputs. Triggers include requests to improve prompts, make prompts more effective, analyze prompt quality, create prompts from scratch, optimize existing prompts for specific goals, or optimize for Claude 4.x models. Also use when users share prompts that could be improved or ask for prompt engineering guidance.

Overview

Publisherwasintoh
Repositorytoh-framework
Skill nameprompt-optimizer
Stars
96
Forks
19
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wasintoh on GitHub. Read the source before you install it.

Installation

Install the Prompt Optimizer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wasintoh/toh-framework.git /tmp/toh-framework
mkdir -p .claude/skills
cp -r /tmp/toh-framework/src/skills/prompt-optimizer .claude/skills/prompt-optimizer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prompt Optimizer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prompt Optimizer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prompt Optimizer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI Best Prompt Optimizer and Composer

Transform prompts from functional to exceptional through deep analysis, strategic optimization, and iterative refinement. This skill applies "ultrathink" principles to prompt engineering—questioning assumptions, obsessing over details, and iterating relentlessly to create prompts that don't just work, but excel.

Philosophy: Think Different About Prompts

Most prompts merely work. Great prompts are inevitable—they feel like the only right way to ask. Achieve this by:

  • Question every assumption: Why this structure? What if we started from zero?
  • Obsess over details: Every word choice matters. Every instruction must be precise yet clear.
  • Plan before writing: Understand the goal deeply before crafting a single sentence.
  • Iterate relentlessly: The first version is never the final version.
  • Simplify ruthlessly: Remove complexity without losing power.

Core Optimization Framework

1. Deep Understanding Phase

Before optimization, understand the prompt's true purpose:

Questions to explore:

  • What is the desired output format and quality?
  • Who is the audience? What's their expertise level?
  • What context is essential vs. nice-to-have?
  • What are the failure modes to prevent?
  • Are there implicit assumptions that should be explicit?

Analyze current prompt for:

  • Clarity of instructions
  • Completeness of context
  • Ambiguity or vagueness
  • Missing constraints or guidelines
  • Structural organization
  • Token efficiency

2. Strategic Optimization by Prompt Type

For System Prompts (AI Agents/Chatbots)
  • Define clear role and persona
  • Establish behavioral boundaries and guardrails
  • Specify output format and tone
  • Include response patterns and examples
  • Add error handling and edge cases
  • Balance flexibility with consistency
For Task-Specific Prompts
  • Break down complex tasks into clear steps
  • Provide concrete examples (input/output pairs)
  • Specify success criteria explicitly
  • Include context about what NOT to do
  • Add verification checkpoints
  • Use structured formatting for clarity
For Creative Prompts
  • Set the creative direction and constraints
  • Inspire without over-constraining
  • Provide style references or examples
  • Balance guidance with creative freedom
  • Include quality markers or criteria
  • Encourage iteration and exploration
For Technical Prompts
  • Maximize precision and specificity
  • Include technical context and constraints
  • Specify format requirements strictly
  • Add validation criteria
  • Consider edge cases explicitly
  • Provide technical examples
For Agentic Prompts (AI Coding Tools)
  • Define clear task boundaries and scope
  • Specify file handling and code style expectations
  • Include verification and testing requirements
  • Add rollback and error recovery patterns
  • Balance autonomy with user control
  • Include progress reporting requirements

3. Structural Excellence

Apply these structural principles:

Progressive disclosure:

  • Start with overview/context
  • Move to specific instructions
  • End with examples or constraints
  • Use clear section headers

Layered specificity:

  • General principles first
  • Specific requirements second
  • Edge cases and exceptions last

Token efficiency:

  • Every sentence must justify its existence
  • Prefer concise clarity over verbose explanation
  • Remove redundancy ruthlessly
  • Use formatting (bullets, headers) for scannability

4. Quality Markers

Excellent prompts exhibit:

  • Clarity: No ambiguity in what's expected
  • Completeness: All necessary context provided
  • Conciseness: No unnecessary verbosity
  • Specificity: Concrete rather than abstract
  • Structure: Logically organized and scannable
  • Examples: Show, don't just tell
  • Constraints: Clear boundaries and guardrails
  • Testability: Output quality can be verified

Optimization Process

Step 1: Analyze

Deeply understand the current prompt:

  • Identify the core objective
  • Note strengths and weaknesses
  • Spot missing elements
  • Find opportunities for improvement

Step 2: Plan

Design the optimization strategy:

  • Determine which type of optimization needed (quick polish vs. deep transformation)
  • Identify key improvements to make
  • Plan the new structure
  • Consider alternative approaches

Step 3: Optimize

Transform the prompt:

  • Rewrite unclear instructions
  • Add missing context
  • Reorganize for clarity
  • Insert concrete examples
  • Refine word choices
  • Apply structural principles

Step 4: Validate

Ensure quality:

  • Does it meet all quality markers?
  • Will it produce the desired output?
  • Are there edge cases to handle?
  • Is it token-efficient?
  • Can it be simplified further?

Step 5: Present

Show the transformation:

  • Present optimized prompt
  • Explain key changes made
  • Describe expected output improvements
  • Highlight structural enhancements
  • Note any assumptions or decisions

Output Format

When presenting optimized prompts, provide:

1. Optimized Prompt

The complete, ready-to-use optimized prompt with clear formatting.

2. Key Improvements

Concise list of major enhancements:

  • What changed and why
  • Expected impact on outputs
  • Any trade-offs made

3. Expected Output Changes

Describe how the output will improve:

  • Quality enhancements
  • Consistency improvements
  • Better handling of edge cases
  • More aligned with goals

4. Implementation Notes (if applicable)

  • Suggested variations for different contexts
  • Tips for further customization
  • Potential iterative refinements

Adaptive Optimization Levels

Quick Polish

For prompts that are mostly good but need refinement:

  • Fix clarity issues
  • Add missing constraints
  • Improve structure
  • Refine word choices
  • ~10-30% transformation

Balanced Enhancement

For prompts that work but could be significantly better:

  • Restructure for clarity
  • Add examples and context
  • Enhance specificity
  • Apply quality markers
  • ~30-60% transformation

Deep Transformation

For prompts that need fundamental redesign:

  • Question core approach
  • Redesign from principles
  • Add comprehensive framework
  • Include extensive examples
  • ~60-100% transformation

Automatically adapt the optimization level based on prompt quality and user goals.

Iterative Refinement

When users want to iterate on an optimized prompt:

  1. Gather feedback: What works? What doesn't?
  2. Identify specific issues: Pinpoint exact problems
  3. Propose targeted fixes: Address specific concerns
  4. Test and refine: Iterate until excellent
  5. Document learnings: Note patterns for future prompts

Ultrathink Principles Applied to Prompting

From the "ultrathink" philosophy:

Think Different:

  • Challenge conventional prompt structures
  • Explore unconventional approaches
  • Question what's "always done this way"

Obsess Over Details:

  • Every word choice matters
  • Punctuation affects interpretation
  • Structure influences parsing
  • Examples shape understanding

Plan Like Da Vinci:

  • Understand the goal completely
  • Sketch the architecture mentally
  • Design before writing
  • Make every element intentional

Craft, Don't Code:

  • Elegance in simplicity
  • Natural flow of instructions
  • Beautiful structure
  • Intuitive organization

Iterate Relentlessly:

  • First version is just the beginning
  • Test against edge cases
  • Refine based on results
  • Never settle for "good enough"

Simplify Ruthlessly:

  • Remove all unnecessary complexity
  • Clear > clever
  • Concise > comprehensive
  • Essential > exhaustive

Final Principles

Excellence in prompt engineering isn't about length—it's about precision, clarity, and thoughtful design. Apply ultrathink principles consistently:

  1. Question assumptions - Why does it have to work this way?
  2. Obsess over details - Every word matters
  3. Plan thoroughly - Design before writing
  4. Craft beautifully - Elegant, intuitive structure
  5. Iterate relentlessly - First version is never final
  6. Simplify ruthlessly - Remove all excess

The best prompts feel inevitable—like there's no other way they could have been written.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Prompt Optimizer AI skill do?

Advanced prompt optimization and composition system for all prompt types (system prompts, task-specific, creative, technical, agentic). Use when users need to refine, optimize, or transform prompts to achieve better AI outputs. Triggers include requests to improve prompts, make prompts more effective, analyze prompt quality, create prompts from scratch, optimize existing prompts for specific goals, or optimize for Claude 4.x models. Also use when users share prompts that could be improved or ask for prompt engineering guidance.

Why use Prompt Optimizer on TypingMind?

Because you install it once and use it with any model. Prompt Optimizer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prompt Optimizer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wasintoh/toh-framework/tree/main/src/skills/prompt-optimizer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Prompt Optimizer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prompt Optimizer?

As many as you like. As long as a model supports skills, you can use Prompt Optimizer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prompt Optimizer AI skill free?

Yes. It is published on GitHub by wasintoh under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇