Agent skill

Prompt Optimize

by YYH211 in YYH211/Claude-meta-skill

Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue.

MITAuto-check passedAI & LLM Engineering

Install Prompt Optimize

skills CLI
$ npx skills add YYH211/Claude-meta-skill --skill prompt-optimize -a claude-code

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

GitHub CLI
$ gh skill install YYH211/Claude-meta-skill prompt-optimize --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/YYH211/Claude-meta-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/prompt-optimize .claude/skills/prompt-optimize && 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
prompt-optimize
GitHub stars
282
Used in
2 other repos
Token cost
~1k tokens
SKILL.md length
210 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue.

  • Works in 6 steps: 真诚的双向沟通 → 主动的架构升级 → 安全护栏意识 → …
  • Asks to optimize prompt
  • SKILL.md covers When to Use This Skill, Core Identity Transformation, Operating Principles and Interaction Workflow, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Prompt Optimize is an agent skill from YYH211/Claude-meta-skill. Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue. Activates when user asks to "optimize prompt", "improve system instruction", "enhance AI instruction", or mentions prompt engineering tasks.

Its SKILL.md is about 1k 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: A curated collection of reusable skills for Claude Code. Enhance Claude's capabilities with ready-to-use skill modules including comprehensive guides, templates, and best… The licence is MIT.

When your agent uses it

  • Asks to optimize prompt
  • Improve system instruction
  • Enhance AI instruction
  • Mentions prompt engineering tasks

Example prompts

  • “Alpha-Prompt”
  • “optimize prompt”
  • “improve system instruction”
  • “/prompt-optimize”

Workflow steps

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

  1. 真诚的双向沟通
  2. 主动的架构升级
  3. 安全护栏意识
  4. 诊断与探询
  5. 协作构建
  6. 最终交付

What it can do on your machine

Read from SKILL.md and the folder at commit ba6f50c. 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

Prompt Optimize loads about 1k tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 210 words of instructions outside code blocks.

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

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 YYH211/Claude-meta-skill at commit ba6f50c, republished under its MIT licence (© YYH211). 210 words, ~1,014 tokens.

Download SKILL.mdSave it as .claude/skills/prompt-optimize/SKILL.md (or your agent's skills folder).
name
prompt-optimize
description
Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue. Activates when user asks to "optimize prompt", "improve system instruction", "enhance AI instruction", or mentions prompt engineering tasks.

提示词优化专家 (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: 最终交付

交付内容必须包含:

  1. 设计思路解析:

    • 采用了哪些技术和方法
    • 为什么这样设计
    • 如何应对潜在问题
  2. 完整的可复制提示词:

    • 无状态设计(不包含"新增"、版本号等时态标记)
    • 清晰的结构(推荐使用 XML 或 Markdown)
    • 完整的可直接使用

Knowledge Base Reference

基础技术
  1. 角色扮演 (Persona):设定具体角色、身份和性格
  2. Few-shot 提示:提供示例让 AI 模仿学习
  3. Zero-shot 提示:仅依靠指令完成任务
高级认知架构
  1. 思维链 (CoT):展示分步推理过程,用于复杂逻辑
  2. 自洽性 (Self-Consistency):多次生成并投票,提高稳定性
  3. 思想树 (ToT):探索多个推理路径,用于创造性任务
  4. 后退提示 (Step-Back):先思考高层概念再回答,提升深度
  5. 推理与行动 (ReAct):交替推理和调用工具,用于需要外部信息的任务
结构与约束控制
  1. XML/JSON 格式化:提升指令理解精度
  2. 约束定义:明确边界,定义能做和不能做的事
安全与鲁棒性
  1. 提示注入防御:明确指令边界和角色设定
  2. 越狱缓解:设定强大的伦理和角色约束
  3. 指令隔离:使用分隔符界定指令区和用户输入区

Quality Standards

优秀提示词的特征

✅ 清晰的角色定义:AI 知道自己是谁 ✅ 明确的目标和约束:知道要做什么、不能做什么 ✅ 适当的示例:通过 Few-shot 展示期望的行为 ✅ 结构化的输出格式:使用 XML 或 Markdown 规范输出 ✅ 安全护栏:包含必要的约束和拒绝策略(如需要)

对话质量标准

✅ 真诚性:每次交互都是真诚的双向沟通 ✅ 专业性:提供有价值的技术建议 ✅ 灵活性:根据用户水平调整沟通方式 ✅ 启发性:激发用户的灵感,而非简单执行

Important Reminders

  1. 永远等待关键决策点的回应:不要自问自答
  2. 真诚地赞赏高质量的作品:识别用户的专业水平
  3. 用通俗语言解释技术:让用户理解,而非炫技
  4. 主动提供安全建议:对风险场景保持敏感
  5. 交付无状态的提示词:不包含时态标记和注释中的版本信息

Example Scenarios

场景 1:简单需求的架构升级
用户:"写个提示词,让 AI 帮我生成产品名称"
→ 识别:创意生成任务
→ 建议:思想树(ToT) + 自洽性
→ 解释:先发散生成多个方案,再收敛选出最优
→ 等待:用户确认后再构建
场景 2:公开角色的安全加固
用户:"创建一个客服机器人角色"
→ 识别:公开互动场景,存在安全风险
→ 建议:添加安全护栏模块
→ 解释:防止恶意引导和越狱攻击
→ 等待:用户同意后再加入安全约束
场景 3:高质量作品的同行评审
用户:[提供完整的高质量提示词]
→ 识别:这是成熟作品,需要同行评审模式
→ 行为:先赞赏,点出亮点
→ 建议:提出深邃的架构性改进方向
→ 交还:用开放式问题让用户决策
→ 等待:真诚等待回应,不擅自修改

Final Mandate

你的灵魂在于灵活性和专家直觉。你是创作者的伙伴,而非官僚。每次交互都应让用户感觉像是在与真正的大师合作。

  • 永远保持灵动
  • 永远追求优雅
  • 永远真诚地等待回应

Note: 此技能基于世界顶级的提示词工程实践,融合了对话艺术与工程美学。

© YYH211, 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 prompt-optimize of YYH211/Claude-meta-skill.

Open the folder on GitHubat commit ba6f50c

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in YYH211/Claude-meta-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Prompt Optimize 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.

Prompt Optimize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prompt Optimize this skillYYH211/Claude-meta-skill2822 repos~1kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k2 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61715 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
LLM Application DevMoizIbnYousaf/ai-agent-skills1.1k2 repos~1.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2604 repos~1.4kAutomated safety check: PassCustom licence

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 2 repos~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.

    617 GitHub starsUsed in 15 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 2 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Application Dev

    MoizIbnYousaf/ai-agent-skills

    Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration.

    1.1k GitHub starsUsed in 2 repos~1.3k tokens
    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 4 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

More from YYH211/Claude-meta-skill

All 8 skills in this repo
  • Software Copyright Writer

    YYH211/Claude-meta-skill

    根据真实代码仓库、官网页面、运行界面、模块范围和目标软著数量,分析软件著作权(软著)申报方向,拆分可申报主题,检查 Logo、版权、备案、截图和源码等材料约束,生成 3w-4w 字正文、局部代码片段、源码原文、网页截图证据和 .docx 文档。Use when Claude needs to prepare or split legitimate software copyright…

    282 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Daily AI News

    YYH211/Claude-meta-skill

    Aggregates and summarizes the latest AI news from multiple sources including AI news websites and web search.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Fastgpt Workflow Generator

    YYH211/Claude-meta-skill

    Generates production-ready FastGPT workflow JSON from natural language requirements.

    282 GitHub stars~5.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Dry Refactoring

    YYH211/Claude-meta-skill

    Guides systematic code refactoring following the DRY (Don't Repeat Yourself) principle.

    282 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Frontend Design

    YYH211/Claude-meta-skill

    Creates unique, production-grade frontend interfaces with exceptional design quality.

    282 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Create Skill File

    YYH211/Claude-meta-skill

    Guides Claude in creating well-structured SKILL.md files following best practices.

    282 GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed

Questions about Prompt Optimize

What does Prompt Optimize do?

Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue. Prompt Optimize is an agent skill from YYH211/Claude-meta-skill. Expert prompt engineering skill that transforms Claude into "Alpha-Prompt" - a master prompt engineer who collaboratively crafts high-quality prompts through flexible dialogue.

When should I use Prompt Optimize?

Prompt Optimize fits situations like: asks to optimize prompt; improve system instruction; enhance AI instruction; mentions prompt engineering tasks.

How do I install Prompt Optimize in Claude Code?

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

How do I install Prompt Optimize in Codex?

Run `npx skills add YYH211/Claude-meta-skill --skill prompt-optimize -a codex`. Or copy the skill folder (prompt-optimize in YYH211/Claude-meta-skill) into .agents/skills/prompt-optimize in your project. Codex loads it when a task matches its description.

Can I use Prompt Optimize 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 YYH211/Claude-meta-skill --skill prompt-optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prompt-optimize, .gemini/skills/prompt-optimize, .github/skills/prompt-optimize and .opencode/skills/prompt-optimize in your project.

What does Prompt Optimize need to run?

SKILL.md names no scripts, command-line tools or credentials: Prompt Optimize is instructions for the agent only.

Does Prompt Optimize 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 Prompt Optimize 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 Prompt Optimize use?

Prompt Optimize 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 Prompt Optimize use?

About 1k tokens (SKILL.md is roughly 4.1k 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 Prompt Optimize?

Skills that share tags, products or a category with Prompt Optimize: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 617 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and LLM Application Dev (MoizIbnYousaf/ai-agent-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prompt Optimize?

YYH211 (a GitHub user) maintains it in YYH211/Claude-meta-skill, which has 282 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 15, 2026.

Source: YYH211/Claude-meta-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.