Agent skill

LLM Prompt Optimizer

by sickn33 in sickn33/agentic-awesome-skills

A skill your agent uses when improving prompts for any LLM. An agent skill from sickn33/agentic-awesome-skills.

MITAuto-check passedAI & LLM Engineering

Install LLM Prompt Optimizer

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill llm-prompt-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills llm-prompt-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/llm-prompt-optimizer .claude/skills/llm-prompt-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
llm-prompt-optimizer
GitHub stars
47k
Used in
2 other repos
Token cost
~1.6k tokens
SKILL.md length
543 words
Files
1
Skills in repo
1,497
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when improving prompts for any LLM. An agent skill from sickn33/agentic-awesome-skills.

  • Works in 7 steps: Diagnose the Weak Prompt → Apply the RSCIT Framework → Chain-of-Thought (CoT) Pattern → …
  • Improving prompts for any LLM
  • SKILL.md covers Overview, When to Use This Skill, Step-by-Step Guide and Best Practices, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

LLM Prompt Optimizer is an agent skill from sickn33/agentic-awesome-skills. Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Improving prompts for any LLM
  • Tasks that involve Prompt engineering

Example prompts

  • “/llm-prompt-optimizer”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Diagnose the Weak Prompt
  2. Apply the RSCIT Framework
  3. Chain-of-Thought (CoT) Pattern
  4. Few-Shot Examples Pattern
  5. Structured JSON Output Pattern
  6. Reduce Hallucination Pattern
  7. Prompt Compression Techniques

What it can do on your machine

Read from SKILL.md and the folder at commit b84d35a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LLM Prompt Optimizer loads about 1.6k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 543 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit b84d35a, republished under its MIT licence (© sickn33). 543 words, ~1,604 tokens.

Download SKILL.mdSave it as .claude/skills/llm-prompt-optimizer/SKILL.md (or your agent's skills folder).
name
llm-prompt-optimizer
description
Use when improving prompts for any LLM. Applies proven prompt engineering techniques to boost output quality, reduce hallucinations, and cut token usage.
risk
safe
source
community
date_added
2026-03-04

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:

ProblemSymptomFix
Too vagueGeneric, unhelpful answersAdd role + context + constraints
No structureUnformatted, hard-to-parse outputSpecify output format explicitly
HallucinationConfident wrong answersAdd "say I don't know if unsure"
InconsistentDifferent answers each runAdd few-shot examples
Too longVerbose, padded responsesAdd 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
  • ✅ Do: Add "think step by step" for math, logic, or multi-step tasks
  • ❌ Don't: Use negative-only instructions ("don't be verbose") — add positive alternatives
  • ❌ Don't: Assume the model knows your codebase context — always include it
  • ❌ Don't: Use the same prompt across different models without testing — they behave differently
Show full SKILL.md (189 more words)Show less

Prompt Audit Checklist

Before using a prompt in production:

  • Does it have a clear role/persona?
  • Is the output format explicitly defined?
  • Are edge cases handled (empty input, ambiguous data)?
  • Is the length appropriate (not too long/short)?
  • Has it been tested on 5+ varied inputs?
  • Is hallucination risk addressed for factual tasks?

Troubleshooting

Problem: Model ignores format instructions Solution: Move format instructions to the END of the prompt, after examples. Use strong language: "You MUST return only valid JSON."

Problem: Inconsistent results between runs Solution: Lower the temperature setting (0.0-0.3 for factual tasks). Add more few-shot examples.

Problem: Prompt works in playground but fails in production Solution: Check if system prompt is being sent correctly. Verify token limits aren't being exceeded (use a token counter).

Problem: Output is too long Solution: Add explicit word/sentence limits: "Respond in exactly 3 bullet points, each under 20 words."

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/llm-prompt-optimizer of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit b84d35a

Used in 2 other repositories

We found 11 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 9, 2026.

Compare with similar skills

LLM Prompt Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LLM Prompt Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LLM Prompt Optimizer this skillsickn33/agentic-awesome-skills47k2 repos~1.6kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k1 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61814 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2603 repos~1.4kAutomated safety check: PassCustom licence
Codex Fable5baskduf/FableCodex437—~1.6kAutomated safety check: PassAGPL-3.0

Similar skills

  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    618 GitHub starsUsed in 14 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 3 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.

    40k GitHub stars~1.3k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,497 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Questions about LLM Prompt Optimizer

What does LLM Prompt Optimizer do?

A skill your agent uses when improving prompts for any LLM. An agent skill from sickn33/agentic-awesome-skills. LLM Prompt Optimizer is an agent skill from sickn33/agentic-awesome-skills. Use when improving prompts for any LLM.

When should I use LLM Prompt Optimizer?

LLM Prompt Optimizer fits situations like: improving prompts for any LLM; tasks that involve Prompt engineering.

How do I install LLM Prompt Optimizer in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill llm-prompt-optimizer -a claude-code`. Or copy the skill folder (skills/llm-prompt-optimizer in sickn33/agentic-awesome-skills) into .claude/skills/llm-prompt-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install LLM Prompt Optimizer in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill llm-prompt-optimizer -a codex`. Or copy the skill folder (skills/llm-prompt-optimizer in sickn33/agentic-awesome-skills) into .agents/skills/llm-prompt-optimizer in your project. Codex loads it when a task matches its description.

Can I use LLM Prompt Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill llm-prompt-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/llm-prompt-optimizer, .gemini/skills/llm-prompt-optimizer, .github/skills/llm-prompt-optimizer and .opencode/skills/llm-prompt-optimizer in your project.

What does LLM Prompt Optimizer need to run?

SKILL.md names no scripts, command-line tools or credentials: LLM Prompt Optimizer is instructions for the agent only. Our summary lists: Python 3.

Does LLM Prompt Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is LLM Prompt Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does LLM Prompt Optimizer use?

LLM Prompt Optimizer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LLM Prompt Optimizer use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to LLM Prompt Optimizer?

Skills that share tags, products or a category with LLM Prompt Optimizer: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 618 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LLM Prompt Optimizer?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,405 GitHub stars. The repository holds 1,497 skills in this directory. The repository was last updated on October 9, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.