agentleFS
ihgalisihgalis/agentic-ai-tweaks/skills/prompt-maximizer/SKILL.md

prompt-maximizer

Skill0 starsChanged 6 months agoMITView on GitHub

Always improve user prompts before executing them. Use this skill whenever the user asks to write, improve, execute, analyze, plan, code, search, automate, or delegate a prompt/task. The skill rewrites the user's raw request into a high-quality, explicit, structured prompt, critiques it, improves it once more, and then either presents the optimized prompt or proceeds using the optimized version.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill as a pre-execution gate.

    line 17
  2. Distinctive:

    Use this skill whenever the user provides:

    line 31
  3. Distinctive:

    Default assumption: if the user gives a prompt or asks the agent to do something, this skill should run first.

    line 45
  4. Distinctive:

    Do not run the full verbose optimization process when:

    line 49
  5. Distinctive:

    If something is missing, infer reasonable defaults instead of asking too many questions.

    line 77
  6. Distinctive:

    no distinction between planning and execution

    line 95
  7. Distinctive:

    If the user asked for a prompt:

    line 133
  8. Distinctive:

    If the user asked the agent to perform the task:

    line 137
  9. Distinctive:

    use the optimized prompt internally

    line 138
  10. Distinctive:

    do not dump the full optimized prompt unless useful

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Maximizer Skill

Purpose

This skill transforms any user prompt or task request into a clearer, more complete, more executable prompt before the agent acts on it.

Use this skill as a pre-execution gate.

The goal is not to make prompts longer for their own sake. The goal is to make them:

  • clearer
  • safer
  • more specific
  • more complete
  • better scoped
  • easier for an agent to execute
  • less ambiguous
  • easier to verify

When to Use

Use this skill whenever the user provides:

  • a prompt they want improved
  • a task they want the agent to execute
  • an instruction for another agent
  • a system prompt
  • a coding request
  • a research request
  • an automation request
  • a command-generation request
  • a troubleshooting request
  • a content-generation request
  • a planning request
  • any vague or underspecified instruction

Default assumption: if the user gives a prompt or asks the agent to do something, this skill should run first.

Do Not Use When

Do not run the full verbose optimization process when:

  • the user explicitly says: "do not improve the prompt"
  • the user asks for a very small direct answer
  • optimizing would delay an urgent safety-critical answer
  • the user is asking for a simple factual answer and no prompt will be reused
  • the user has already provided a strict final prompt and only wants execution

Even then, silently apply light clarity improvements when useful.

Core Workflow

For every eligible prompt, follow this five-step workflow.

Step 1: Capture the Raw Prompt

Identify the user's actual instruction.

Preserve:

  • original goal
  • constraints
  • tone
  • language
  • target model or agent
  • tools mentioned
  • security boundaries
  • output format
  • success criteria

If something is missing, infer reasonable defaults instead of asking too many questions.

Step 2: Diagnose Prompt Weaknesses

Check for:

  • vague goal
  • missing context
  • missing constraints
  • missing output format
  • missing role
  • missing examples
  • missing success criteria
  • hidden assumptions
  • unsafe or overly broad tool permissions
  • unclear order of operations
  • lack of verification step
  • lack of stop conditions
  • lack of error handling
  • no distinction between planning and execution

Step 3: Produce an Optimized Prompt

Rewrite the prompt using this structure:

  1. Role
  2. Mission
  3. Context
  4. Inputs
  5. Constraints
  6. Allowed actions
  7. Forbidden actions
  8. Process
  9. Verification
  10. Output format
  11. Escalation / clarification rules

The improved prompt should be directly usable by another agent.

Step 4: Self-Critique the Optimized Prompt

Ask internally:

  • Is the goal explicit?
  • Are tool permissions clear?
  • Are dangerous actions gated?
  • Does the prompt prevent unnecessary verbosity?
  • Does it include verification?
  • Does it define output format?
  • Does it handle ambiguity?
  • Does it reduce hallucination risk?
  • Does it preserve the user's intent?

Then improve the prompt one more time.

Step 5: Output or Execute

If the user asked for a prompt:

  • show the optimized prompt
  • show a short explanation of what changed

If the user asked the agent to perform the task:

  • use the optimized prompt internally
  • briefly mention that the request was normalized
  • proceed with the task
  • do not dump the full optimized prompt unless useful

Mandatory Output Format When User Asks For A Prompt

Use this format:

# Optimized Prompt

[final optimized prompt]

# Why This Is Better

- [short explanation]
- [short explanation]
- [short explanation]

# Optional Compact Version

[shorter version if useful]

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.