llm-prompt-optimizer
Qué hace
Esta herramienta mejora las instrucciones que le das a una inteligencia artificial (IA). Convierte peticiones vagas en otras claras y eficaces, para que la IA entienda exactamente lo que quieres y dé mejores resultados.
Cuándo usarla
- ✓Cuando la IA da respuestas confusas o incorrectas.
- ✓Cuando necesitas que la IA presente su respuesta de una forma concreta (como una lista o una tabla).
- ✓Cuando quieres que la IA sea más directa y use menos 'palabras de relleno'.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/llm-prompt-optimizer/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mejora este prompt para la IA: 'Habla sobre perros.'”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La herramienta analiza tu petición original y aplica técnicas conocidas de 'ingeniería de prompts'. Añade detalles como quién debe ser la IA, el contexto, las reglas y cómo debe organizarse la respuesta.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
LLM Prompt Optimizer
Overview
This skill transforms weak, vague, or inconsistent prompts into precision-engineered instructions that reliably produce high-quality outputs from any LLM (Claude, Gemini, GPT-4, Llama, etc.). It applies systematic prompt engineering frameworks — from zero-shot to few-shot, chain-of-thought, and structured output patterns.
When to Use This Skill
- Use when a prompt returns inconsistent, vague, or hallucinated results
- Use when you need structured/JSON output from an LLM reliably
- Use when designing system prompts for AI agents or chatbots
- Use when you want to reduce token usage without sacrificing quality
- Use when implementing chain-of-thought reasoning for complex tasks
- Use when prompts work on one model but fail on another
Step-by-Step Guide
1. Diagnose the Weak Prompt
Before optimizing, identify which problem pattern applies:
| Problem | Symptom | Fix |
|---|---|---|
| Too vague | Generic, unhelpful answers | Add role + context + constraints |
| No structure | Unformatted, hard-to-parse output | Specify output format explicitly |
| Hallucination | Confident wrong answers | Add "say I don't know if unsure" |
| Inconsistent | Different answers each run | Add few-shot examples |
| Too long | Verbose, padded responses | Add length constraints |
2. Apply the RSCIT Framework
Every optimized prompt should have:
- R — Role: Who is the AI in this interaction?
- S — Situation: What context does it need?
- C — Constraints: What are the rules and limits?
- I — Instructions: What exactly should it do?
- T — Template: What should the output look like?
Before (weak prompt):
Explain machine learning.
After (optimized prompt):
You are a senior ML engineer explaining concepts to a junior developer.
Context: The developer has 1 year of Python experience but no ML background.
Task: Explain supervised machine learning in simple terms.
Constraints:
- Use an analogy from everyday life
- Maximum 200 words
- No mathematical formulas
- End with one actionable next step
Format: Plain prose, no bullet points.
3. Chain-of-Thought (CoT) Pattern
For reasoning tasks, instruct the model to think step-by-step:
Solve this problem step by step, showing your work at each stage.
Only provide the final answer after completing all reasoning steps.
Problem: [your problem here]
Thinking process:
Step 1: [identify what's given]
Step 2: [identify what's needed]
Step 3: [apply logic or formula]
Step 4: [verify the answer]
Final Answer:
4. Few-Shot Examples Pattern
Provide 2-3 examples to establish the pattern:
Classify the sentiment of customer reviews as POSITIVE, NEGATIVE, or NEUTRAL.
Examples:
Review: "This product exceeded my expectations!" -> POSITIVE
Review: "It arrived broken and support was useless." -> NEGATIVE
Review: "Product works as described, nothing special." -> NEUTRAL
Now classify:
Review: "[your review here]" ->
5. Structured JSON Output Pattern
Extract the following information from the text below and return it as valid JSON only.
Do not include any explanation or markdown — just the raw JSON object.
Schema:
{
"name": string,
"email": string | null,
"company": string | null,
"role": string | null
}
Text: [input text here]
6. Reduce Hallucination Pattern
Answer the following question based ONLY on the provided context.
If the answer is not contained in the context, respond with exactly: "I don't have enough information to answer this."
Do not make up or infer information not present in the context.
Context:
[your context here]
Question: [your question here]
7. Prompt Compression Techniques
Reduce token count without losing effectiveness:
# Verbose (expensive)
"Please carefully analyze the following code and provide a detailed explanation of
what it does, how it works, and any potential issues you might find."
# Compressed (efficient, same quality)
"Analyze this code: explain what it does, how it works, and flag any issues."
Best Practices
- ✅ Do: Always specify the output format (JSON, markdown, plain text, bullet list)
- ✅ Do: Use delimiters (```, ---) to separate instructions from content
- ✅ Do: Test prompts with edge cases (empty input, unusual data)
- ✅ Do: Version your system prompts in source control
…
Preguntas frecuentes
¿Qué es la 'ingeniería de prompts'?
Es el arte de escribir instrucciones claras y eficaces para que la inteligencia artificial entienda y realice las tareas de la mejor manera posible.
¿Por qué la IA a veces 'se inventa cosas' (alucina)?
Puede pasar cuando la petición no es lo bastante clara o cuando la IA no tiene la información correcta. Los prompts bien diseñados ayudan a evitarlo.
¿Qué son los 'tokens'?
Los tokens son las unidades básicas que usa la IA para procesar el texto. Los prompts más cortos y directos usan menos tokens, lo que puede costar menos.
Detalles
Descripción original del autor
Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #5089
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
writing-skills
311 milEnseña a tu agente a escribir skills nuevas y a probar cada una primero, comprobando que realmente cambia la forma en que se comporta el agente.
writing-for-agents
310 milExplica cómo escribir instrucciones claras para agentes de IA, incluidas las skills y los archivos AGENTS.md y CLAUDE.md, para que el agente se comporte de forma predecible.
bengali-nlp
280 milHace que tu agente procese texto en bengalí. Ayuda a entender y trabajar con el idioma, normalizando el texto y gestionando sus características propias.