prompt-optimizer

prompt-optimizer is a skill for Claude Code, Codex from ckanner/agent-skills. It costs 83 tokens per session (1,634 once invoked), scanned A, original, Apache-2.0.

A prompt-editing skill that improves instructions given to AI models by making them clearer, more specific, and better organized.

In plain words
What is it for?
Use it to refine prompts, add missing context, clarify requirements, and break complex tasks into clearer instructions.
Why use it?
It helps when an AI request is vague, incomplete, or difficult to follow. It turns unclear instructions into a more usable plan for the model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to refine prompts, add missing context, clarify requirements, and break complex tasks into clearer instructions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ckanner/agent-skills/prompt-optimizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ckanner/agent-skills --skill prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/ckanner/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin prompt-optimizer/plugin install prompt-optimizer after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/ckanner/agent-skills/prompt-optimizer.svg)](https://agentmods.dev/skills/ckanner/agent-skills/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/ckanner/agent-skills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/ckanner/agent-skills/prompt-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.01634
Opus 5 $0.00042 $0.00817
Sonnet 5 $0.00017 $0.00327
Haiku 4.5 $0.00008 $0.00163

Measured 8d ago against content hash 732c264a15ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

prompt-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

prompt-optimizer/SKILL.md · 241 lines

How it starts

The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prompt Optimizer

Overview

This skill transforms user-provided prompts into high-quality, clear, and effective instructions optimized for AI models. Apply proven prompt engineering principles to enhance clarity, specificity, structure, and effectiveness. The skill uses a systematic workflow to analyze, identify improvement opportunities, and restructure prompts based on industry best practices.

When to Use This Skill

Activate this skill when users:

  • Explicitly request prompt optimization or improvement
  • Provide vague or unclear instructions that need refinement
  • Ask for help making their requests more effective
  • Submit poorly structured prompts that would benefit from reorganization
  • Request guidance on how to better communicate with AI models
  • Present complex tasks that need to be broken down into clearer instructions

Optimization Workflow

Follow this systematic process to optimize any prompt:

Step 1: Analyze the Original Prompt

Examine the user's prompt and identify:

Clarity issues:

  • Ambiguous terms or vague requirements
  • Implicit assumptions that should be explicit
  • Missing context or background information

Specificity gaps:

  • Lack of concrete constraints or requirements
  • Undefined success criteria
  • Missing audience or purpose information
  • Unclear scope or boundaries

Structure problems:

  • Disorganized or stream-of-consciousness format
  • Missing logical flow
  • Lack of clear sections or hierarchy

Format considerations:

  • No specified output format
  • Unclear expectations about length, tone, or style
  • Missing examples or templates

Complexity assessment:

  • Determine if the task is too complex for a single prompt
  • Identify if the request would benefit from prompt chaining
  • Assess if step-by-step reasoning is needed

Step 2: Identify the Core Intent

Determine the fundamental objective behind the user's request:

  • What is the user ultimately trying to accomplish?
  • What problem are they trying to solve?
  • What would constitute a successful output?
  • Who is the intended audience or consumer of the output?

Read the full file on GitHub · 241 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 241 lines · 83 tokens per session scan A 732c264a15ca

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository ckanner/agent-skills (23 stars, last pushed 9mo ago), licensed Apache-2.0. It adds 83 tokens to every session and 1,634 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

prompt-engineer

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…

Jeffallan/claude-skills · 93 tokens

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

ai-workflow-architect

Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…

cbrock84/headcount · 89 tokens

few-shot-examples

Curated few-shot examples for construction AI tasks: classification, extraction, analysis. Domain-specific examples for improved LLM performance.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens

prompt-templates

Reusable prompt templates for construction AI tasks: cost estimation, schedule analysis, document processing, BIM queries. Structured prompts for consistent results.

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction · 30 tokens

down-skilling

Distill Opus-level reasoning into optimized instructions for Haiku 4.5 (and Sonnet). Generates explicit, procedural prompts with n-shot examples that maximize smaller model performance on a given task. Use when user says "down-skill", "distill for Haiku", "optimize for Haiku", "make this work on Haiku", "generate…

oaustegard/claude-skills · 95 tokens