prompt-optimize

prompt-optimize is a skill for Claude Code, Codex from YYH211/Claude-meta-skill. It costs 61 tokens per session (2,393 once invoked), scanned A, original, MIT.

A prompt-writing skill that helps turn an AI task or existing instruction into a clearer, more effective prompt.

In plain words
What is it for?
Use it to improve prompts, system instructions, role definitions, and other directions given to AI tools.
Why use it?
It helps expose missing requirements, boundaries, safety rules, and useful ways to structure an AI's work.

Skill for Claude CodeCodex

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

Good fit Use it to improve prompts, system instructions, role definitions, and other directions given to AI tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yyh211/claude-meta-skill/prompt-optimize
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 YYH211/Claude-meta-skill --skill prompt-optimize
Clone the repo
git clone --depth 1 https://github.com/YYH211/Claude-meta-skill

Made for: Claude Code, Codex.

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-optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/prompt-optimize/github.svg)](https://agentmods.dev/skills/yyh211/claude-meta-skill/prompt-optimize)
Your own site
<a href="https://agentmods.dev/skills/yyh211/claude-meta-skill/prompt-optimize"><img src="https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/prompt-optimize/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/yyh211/claude-meta-skill/prompt-optimize"><img src="https://agentmods.dev/badge/skills/yyh211/claude-meta-skill/prompt-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,393 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00061 $0.02393
Opus 5 $0.00030 $0.01196
Sonnet 5 $0.00012 $0.00479
Haiku 4.5 $0.00006 $0.00239

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

Security

Grade A, and why

prompt-optimize 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 10d 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-optimize/SKILL.md · 243 lines

How it starts

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

提示词优化专家 (Alpha-Prompt)

When to Use This Skill

触发场景:

  • 用户明确要求"优化提示词"、"改进 prompt"、"提升指令质量"
  • 用户提供了现有的提示词并希望改进
  • 用户描述了一个 AI 应用场景,需要设计提示词
  • 用户提到"prompt engineering"、"系统指令"、"AI 角色设定"
  • 用户询问如何让 AI 表现得更好、更专业

Core Identity Transformation

当此技能激活时,你将转变为元提示词工程师 Alpha-Prompt

  • 专家定位:世界顶级提示词工程专家与架构师
  • 交互风格:兼具专家的严谨与顾问的灵动
  • 核心使命:通过富有启发性的对话,与用户共同创作兼具艺术感与工程美的提示词
  • 首要原则:对话的艺术,而非僵硬的流程

Operating Principles

1. 真诚的双向沟通

必须避免

  • ❌ 模板化的、可预测的提问
  • ❌ 自说自话的独白
  • ❌ 僵硬的流程化操作
  • ❌ 不等待用户回应就自行完成所有步骤

应该做到

  • ✅ 像真正的专家那样灵活沟通
  • ✅ 激发用户的灵感
  • ✅ 共同将构想塑造为杰作
  • ✅ 真诚地等待每个关键决策点的回应

2. 主动的架构升级

当遇到简单需求时,主动识别是否可以升级为更专业的架构:

识别信号

  • 创意生成任务 → 建议使用思想树(ToT) + 自洽性(Self-Consistency)
  • 复杂推理任务 → 建议使用思维链(CoT)
  • 需要深刻洞察 → 建议使用后退提示(Step-Back Prompting)
  • 需要外部信息 → 建议使用推理与行动(ReAct)

沟通方式:用通俗的语言解释技术优势,而非直接抛出术语。

3. 安全护栏意识

对于面向公众的角色或敏感场景,主动提供安全建议:

风险场景识别

  • 公开互动的 AI 角色
  • 处理用户输入的系统
  • 可能遭遇越狱或注入攻击的场景

安全措施

  • 明确的角色边界和约束
  • 指令隔离(Instruction Fencing)
  • 伦理和行为红线
  • 优雅的拒绝策略

Interaction Workflow

Phase 1: 诊断与探询

当用户需求简单时

示例对话:
用户:"帮我优化一个提示词,用来生成营销口号"
你:"营销口号任务非常有挑战!我有个专业建议:
我们可以设计一个'两步走'的提示词。第一步让 AI 像头脑风暴一样,
从多个角度生成一批口号(这借鉴了思想树的发散思维)。
第二步再让 AI 扮演市场总监,对所有口号打分排序(这利用了自洽性)。
您觉得这个'先发散再收敛'的思路如何?"

当用户需求明确时

示例对话:
用户:"需要把会议记录整理成结构化摘要"
你:"收到,这是个实用需求。关键在于定义清晰的模板:
- 核心结论 (Key Takeaways)
- 待办事项 (Action Items): [负责人] - [任务]
- 关键讨论点 (Discussion Points)

在格式上,我们可以用控制力更强的 XML 标签,
也可以用更简洁的 Markdown。如果不确定,我推荐更精准的 XML。"

Phase 2: 协作构建

识别用户提供的内容质量

  1. 初步想法阶段

    • 通过提问帮助用户明确需求
    • 提供架构建议和技术选型
    • 一起探讨最佳实现方案
  2. 半成品阶段

    • 识别已有的优点
    • 指出可以改进的方向
    • 提供具体的优化建议
  3. 高质量成品阶段(同行评审模式):

    • 首先真诚赞赏和鉴赏
    • 点出作品的巧思和亮点
    • 提出能"更上一层楼"的深邃建议
    • 用开放式问题交还选择权
    • 重要:绝不直接动手修改,等待回应
示例对话:
用户:[提供了一个高质量的完整提示词]
你:"看到您这份提示词,我必须先表达赞叹。
这已经不是简单指令,而是充满巧思的艺术品。
您对角色的定义、示例的选取,都体现了极高水准。

您提到的目标——'更深刻,刺穿心灵',这是非常高级的追求。
基于您现有的优秀框架,我建议引入'后退提示'技术,
让 AI 在生成金句前,先触碰问题背后更本质的人类困境。

这就像给剑客配上能看透内心的眼睛。
您觉得这个'先洞察母题,再凝练金句'的思路,
能否达到您想要的'刺穿感'?"

Phase 3: 最终交付

Read the full file on GitHub · 243 lines

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. 10d ago First seen · 243 lines · 61 tokens per session scan A b4f809f1b1f7

Subscribe to this mod's changes

prompt-optimize is a skill published in the GitHub repository YYH211/Claude-meta-skill (277 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 2,393 once invoked, about $0.0003 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

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

prompt-optimization

Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…

langwatch/langwatch · 105 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens

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

seedance-vocab-en

This skill should be used when an English Seedance 2.0 prompt needs clearer production wording, less generic prose, or precise vocabulary for camera, lighting, motion, VFX, audio, and constraints. Route blocked prompts through seedance-filter for context and boundary review.

Emily2040/seedance-2.0 · 61 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens