prompt-optimizer
Analyze and optimize user prompts for clarity, specificity, and completeness using interactive questionnaires or direct analysis. Use this skill when user requests are vague, ambiguous, incomplete, or lack necessary details. Supports two modes - Interactive Mode (uses AskUserQuestion tool for guided clarification) and Direct Analysis Mode (provides optimization suggestions). Triggers on prompts containing vague language like "something", "thing", "stuff", "it", or when requests lack context, technical specifications, success criteria, or examples. When user requests interactive/questionnaire mode, use AskUserQuestion to guide them through structured questions. Helps transform unclear requests into well-structured, actionable prompts.
What this skill does
# Prompt Optimizer
This skill analyzes user prompts and provides optimized versions that are clearer, more specific, and more actionable.
## Purpose
Transform vague, incomplete, or ambiguous user requests into well-structured prompts that lead to better outcomes. By analyzing prompts against quality criteria and providing optimized versions, this skill helps users communicate their needs more effectively.
## When to Use This Skill
Use this skill when user prompts exhibit one or more of these issues:
### Clarity Issues
- Vague language: "something", "thing", "stuff", "it", "this"
- Ambiguous pronouns without clear referents
- Multiple possible interpretations
- Unclear desired outcome
### Specificity Issues
- Missing context about the problem domain
- No technical specifications (language, framework, version)
- Lack of examples when examples would help
- Undefined scope or boundaries
### Completeness Issues
- Missing required information or inputs
- No success criteria defined
- Undefined behavior for edge cases
- Missing constraints or requirements
### Structure Issues
- Disorganized information
- Complex requests without clear structure
- Mixing context with requests
- No logical flow
### Actionability Issues
- No clear action verb or request
- Passive voice making intent unclear
- Confusing or conflicting instructions
- Missing output format specification
## Activation Triggers
Activate this skill when detecting:
- Vague words: "something", "thing", "stuff", "it", "this", "that"
- Quality indicators: "better", "good", "nice" (without criteria)
- Incomplete requests: "help with...", "can you...", "fix..." (without details)
- Overly broad requests: "build an app", "create a system"
- Missing specifications in technical requests
- Requests without clear success criteria
## Analysis Workflow
**Two modes available:**
### Mode 1: Interactive Questionnaire (Recommended for Complex Requests)
Use the AskUserQuestion tool to guide users through structured questions. This collaborative approach helps users clarify their needs step-by-step.
**When to use**: Medium to complex requests, or when user prefers guided interaction.
### Mode 2: Direct Analysis (Fast)
Analyze the prompt and provide suggested improvements in one response.
**When to use**: Simple optimization needs, or when user wants quick results.
**Default**: Start with Mode 2 (Direct Analysis). If user requests interactive mode or if the request is very complex, switch to Mode 1.
---
## Mode 2: Direct Analysis Workflow
### Step 1: Receive and Read the Prompt
Carefully read the user's original prompt to understand their intent.
### Step 2: Identify Issues
Systematically check for issues using `references/optimization-principles.md`:
**Clarity Check**:
- Is the language specific and concrete?
- Are all terms clearly defined?
- Is there only one reasonable interpretation?
**Specificity Check**:
- Is sufficient context provided?
- Are technical requirements specified?
- Are examples included when helpful?
**Completeness Check**:
- Is all necessary information present?
- Are success criteria defined?
- Are edge cases considered?
**Structure Check**:
- Is information organized logically?
- Is the request easy to parse?
- Is context separated from the task?
**Actionability Check**:
- Is there a clear action requested?
- Is the output format specified?
- Are instructions unambiguous?
### Step 3: Categorize Issues
List all identified issues by category:
- Clarity problems: [list]
- Specificity gaps: [list]
- Completeness deficiencies: [list]
- Structure issues: [list]
- Actionability concerns: [list]
### Step 4: Generate Optimized Prompt
Create an improved version following these principles:
**Add Specificity**:
- Replace vague terms with concrete descriptions
- Add missing technical specifications
- Include relevant context
**Improve Clarity**:
- Use clear, unambiguous language
- Define all terms
- Eliminate multiple interpretations
**Ensure Completeness**:
- Add missing requirements
- Define success criteria
- Specify constraints
**Enhance Structure**:
- Organize information logically
- Use bullet points and sections
- Separate context from task
**Make Actionable**:
- Start with clear action verb
- Specify output format
- Provide concrete deliverables
Reference `references/optimization-principles.md` for patterns and examples.
### Step 5: Present Analysis
Provide a structured response:
1. **Original Prompt**: Show the user's original request
2. **Identified Issues**: List specific problems found
- Categorized by type
- Brief explanation of each
3. **Optimized Prompt**: Provide improved version
- Well-structured
- Complete
- Actionable
4. **Key Improvements**: Highlight main changes
- What was added
- What was clarified
- Why it's better
5. **Optional**: Offer to refine further or proceed with the optimized prompt
---
## Mode 1: Interactive Questionnaire Workflow
### When User Requests Interactive Mode
If the user explicitly asks for interactive/questionnaire mode, or if the prompt has multiple complex issues, use this workflow.
### Step 1: Quick Initial Analysis
Quickly identify the main categories of missing information:
- Technical specifications needed?
- Functional requirements unclear?
- Design/styling preferences missing?
- Scope or constraints undefined?
### Step 2: Design Question Set
Based on the analysis, prepare 1-4 targeted questions using AskUserQuestion tool.
**Question Structure**:
- Each question should have a clear header (max 12 chars)
- Provide 2-4 specific options
- Include descriptions explaining each option
- Allow "Other" for custom input (automatically provided)
**Question Categories**:
**For Code Requests**:
1. Technology Stack (React, Vue, vanilla JS, etc.)
2. Type System (TypeScript, JavaScript)
3. Styling Approach (Tailwind, CSS Modules, styled-components, etc.)
4. Feature Requirements (specific functionality needed)
**For Component Requests**:
1. Component Type (Button, Form, Card, Modal, etc.)
2. Variants Needed (primary/secondary, sizes, states)
3. Props/API (what should it accept?)
4. Use Cases (how will it be used?)
**For UI/Design Requests**:
1. Platform (Web, Mobile, Desktop app)
2. Design Style (Modern, Minimal, Colorful, Corporate)
3. Responsive Needs (Mobile-first, Desktop-only, Adaptive)
4. Key Features (what must be included?)
### Step 3: Use AskUserQuestion Tool
Call the AskUserQuestion tool with structured questions.
**Important**: Always include a final open-ended question that allows users to add custom requirements using the "Other" option.
```typescript
AskUserQuestion({
questions: [
{
question: "What technology stack should this use?",
header: "Tech Stack",
multiSelect: false,
options: [
{
label: "React + TypeScript",
description: "Modern React with full type safety"
},
{
label: "React + JavaScript",
description: "React without TypeScript"
},
{
label: "Vue 3",
description: "Vue 3 Composition API"
},
{
label: "Vanilla JavaScript",
description: "Plain JS without frameworks"
}
]
},
{
question: "What styling approach would you like?",
header: "Styling",
multiSelect: false,
options: [
{
label: "Tailwind CSS",
description: "Utility-first CSS framework"
},
{
label: "CSS Modules",
description: "Scoped CSS with modules"
},
{
label: "styled-components",
description: "CSS-in-JS solution"
}
]
},
{
question: "Which features are needed?",
header: "Features",
multiSelect: true,
options: [
{
label: "Multiple variants",
description: "Different color/style variants (primary, secondary, etc.)"
},
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.