llm-prompt-optimizer
यह क्या करती है
यह टूल उन निर्देशों (instructions) को बेहतर बनाता है जो आप आर्टिफ़िशियल इंटेलिजेंस (AI) को देते हैं। यह अस्पष्ट अनुरोधों को साफ़ और असरदार बनाता है, ताकि AI ठीक से समझे कि आपको क्या चाहिए और बेहतर नतीजे दे।
कब इस्तेमाल करें
- ✓जब AI उलझे हुए या गलत जवाब दे।
- ✓जब आपको चाहिए कि AI अपना जवाब किसी खास तरीके से फ़ॉर्मेट करे (जैसे सूची या टेबल)।
- ✓जब आप चाहते हैं कि AI सीधा रहे और 'फ़ालतू शब्द' कम इस्तेमाल करे।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/llm-prompt-optimizer/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस prompt को AI के लिए बेहतर बनाओ: 'कुत्तों के बारे में बात करो।'”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल आपके मूल अनुरोध का विश्लेषण करता है और 'prompt engineering' की जानी-पहचानी तकनीकें लगाता है। यह उसमें ऐसी जानकारी जोड़ता है जैसे AI को किस भूमिका में होना चाहिए, संदर्भ (context), नियम, और जवाब किस तरह फ़ॉर्मेट होना चाहिए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
…
अक्सर पूछे जाने वाले सवाल
prompt engineering क्या है?
यह साफ़ और असरदार निर्देश लिखने की कला है, ताकि आर्टिफ़िशियल इंटेलिजेंस काम को सबसे अच्छे तरीके से समझे और करे।
AI कभी-कभी 'बातें गढ़ देता है' (hallucinate) क्यों करता है?
ऐसा तब हो सकता है जब अनुरोध काफ़ी साफ़ न हो या AI के पास सही जानकारी न हो। अच्छी तरह लिखे prompts इसे रोकने में मदद करते हैं।
'tokens' क्या होते हैं?
Tokens वे बुनियादी इकाइयाँ हैं जिनसे AI टेक्स्ट को प्रोसेस करता है। छोटे और सीधे prompts में कम tokens लगते हैं, जिससे खर्च भी कम हो सकता है।
जानकारी
लेखक का मूल विवरण
Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5089
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
writing-skills
311kयह आपके एजेंट को नई स्किल लिखना और हर एक को पहले टेस्ट करना सिखाती है, यह जांचते हुए कि स्किल सच में उसका व्यवहार बदलती है।
writing-for-agents
310kAI एजेंट्स के लिए साफ़ निर्देश कैसे लिखें, यह समझाती है, जिसमें स्किल, AGENTS.md और CLAUDE.md फ़ाइलें शामिल हैं, ताकि एजेंट अनुमानित ढंग से व्यवहार करे।
bengali-nlp
280kयह आपके एजेंट को Bengali text प्रोसेस करने देता है। यह भाषा को समझने और उसके text को normalize करने जैसी उसकी खास बातों को संभालने में मदद करता है।