home / skills / openclaw / skills / promptify

promptify skill

/skills/tolibear/promptify

This skill helps you transform vague prompts into clear, actionable ones by auto-detecting needs and routing to appropriate sub-agents.

npx playbooks add skill openclaw/skills --skill promptify

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
2.1 KB
---
name: promptify
description: Optimize prompts for clarity and effectiveness. Use when user says "improve this prompt", "optimize my prompt", "make this clearer", or provides vague/unstructured prompts. Intelligently routes to sub-agents for codebase research, clarifying questions, or web search as needed.
metadata: {"moltbot":{"emoji":"✨"}}
---

# Prompt Optimizer

Transform prompts into clear, effective ones. Model-agnostic.

## Modifiers (parse from ARGUMENTS)

- **+ask** → Force clarifying questions
- **+deep** → Force codebase exploration
- **+web** → Force web search

No modifiers? Auto-detect what's needed.

## Auto-Detection Triggers

| Trigger | Signals |
|---------|---------|
| **codebase-researcher** | "this project", "our API", specific files/functions, "integrate", "extend", "refactor" |
| **clarifier** | Ambiguous ("make it better"), multiple interpretations, missing constraints, vague pronouns |
| **web-researcher** | "best practices", "latest", external APIs/libraries, framework patterns, year references |

## Agent Dispatch

When agents needed:
1. Announce which and why
2. Run in parallel via Task tool (agents/ directory)
3. Synthesize findings
4. Optimize with gathered context

---

## Core Contract (every prompt needs all four)

| Element | If Missing |
|---------|------------|
| **Role** | Add persona with expertise |
| **Task** | Make action specific |
| **Constraints** | Infer from context |
| **Output** | Specify format/structure |

## Process

1. **If image**: Analyze, incorporate context
2. **Detect type**: coding/writing/analysis/creative/data
3. **Convert output→process**: "Write X" → "Analyze → Plan → Implement → Validate"
4. **Strip fluff**: "please", "I want you to", filler, apologies
5. **Apply contract**: Verify all 4 elements
6. **Add structure**: XML tags for complex prompts

## Type Focus

- **Coding**: Specs, edge cases, framework
- **Writing**: Tone, audience, length
- **Analysis**: Criteria, depth
- **Creative**: Constraints, novelty
- **Data**: I/O format, edge cases

## Output

1. Optimized prompt in code block
2. `echo 'PROMPT' | pbcopy`
3. 2-3 sentence explanation

Overview

This skill optimizes prompts for clarity, specificity, and effectiveness across tasks and models. It detects when clarifying questions, codebase research, or web search are needed and routes work to the appropriate sub-agents. The result is a concise, model-ready prompt plus a brief rationale and copy command.

How this skill works

It analyzes the provided text to identify missing role, task, constraints, or output specifications, then restructures the prompt to include all four core elements. If needed, it dispatches clarifier, codebase-researcher, or web-researcher sub-agents in parallel, synthesizes their findings, and integrates context into the final prompt. Special modifiers (+ask, +deep, +web) force specific workflows; otherwise the skill auto-detects needs.

When to use it

  • When user asks “improve this prompt”, “optimize my prompt”, or “make this clearer”.
  • When prompts are vague, ambiguous, or missing output format and constraints.
  • When a prompt references a codebase, API, or project-specific files.
  • When you need best-practice or up-to-date external context for the prompt.
  • When preparing prompts for different task types: coding, writing, analysis, creative, or data.

Best practices

  • Always include role, task, constraints, and desired output in the original request or let the skill infer them.
  • Use modifiers to force behavior: +ask for clarifying questions, +deep for codebase exploration, +web for web research.
  • Provide example inputs/outputs for data and coding tasks to reduce ambiguity.
  • Accept the brief explanation and the copy command to paste the optimized prompt directly into your workflow.
  • If the prompt references a private codebase, allow codebase-researcher access or paste relevant files to get precise results.

Example use cases

  • Turn a vague writing brief into a concise prompt with tone, audience, length, and format.
  • Refine a bug-fix prompt to include reproduction steps, environment, and desired patch format.
  • Optimize a data-processing prompt by specifying I/O formats, edge cases, and sample rows.
  • Convert ‘integrate feature X’ into a developer-ready spec with files to inspect and output constraints.
  • Update a prompt to include latest library behavior by running a targeted web search and summarizing findings.

FAQ

What do modifiers do?

+ask forces clarifying questions; +deep triggers codebase exploration; +web forces web research. Without modifiers the skill auto-detects needs.

What will I receive after optimization?

An optimized prompt in a code block, a one- to two-sentence explanation of changes, and a copy command to place the prompt on your clipboard.