better-prompt

Solid

当用户明确要求"优化 prompt"、"改进提示词"、"润色指令"或"将简陋 prompt 转换为最佳实践版本"时使用。基于 OpenAI 和 Anthropic 官方最佳实践,对用户提供的简陋 prompt 进行结构化优化,输出符合社区标准的高质量版本。

AI & Automation 46 stars 8 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
56
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Better Prompt - Prompt 优化器 ## BenszAPI 任务工作区 本 Skill 的新任务中间文件统一写入 `./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/{skill名}/input|output|log/`。同一任务复用一个任务根目录;多 Skill 协作才创建 `shared/`。正式交付物不写入该目录,历史隐藏目录只允许显式兼容读取、迁移或清理。 ## 与 bensz-collect-bugs 的协作约定 - 因本 skill 设计缺陷导致的 bug,先用 `bensz-collect-bugs` 规范记录到 `~/.bensz-skills/bugs/`,不要直接修改用户本地已安装的 skill 源码;若有 workaround,先记 bug,再继续完成任务。 - 只有用户明确要求“report bensz skills bugs”等公开上报时,才用本地 `gh` 上传新增 bug 到 `huangwb8/bensz-bugs`;不要 pull / clone 整个仓库。 将简陋的 prompt 优化为符合社区最佳实践的高质量版本。 ## 版本与兼容性 - **适用于**:Claude 3.x/4.x、GPT-4/5、Gemini 等主流 LLM - **最佳实践来源**:OpenAI/Anthropic 官方文档(2026-02) - **更新策略**:官方文档重大更新时同步修订 ## 不适用场景 以下情况不建议使用本技能: - prompt 已经经过专业优化(评分 ≥ 8/10) - 只需要诊断问题,不需要修改建议 - 超长 prompt(>10000 字)需要专业拆分 - 用户明确要求保持原始风格 ## 输入要求 用户提供一个待优化的原始 prompt(可以是任意形式的简陋版本)。 ## 优化框架 基于 **OpenAI** 和 **Anthropic** 官方最佳实践,采用五维度优化框架: | 维度 | 检查点 | 优先级 | |------|--------|--------| | **清晰度** | 指令是否明确?是否存在歧义? | P0 | | **完整性** | 是否缺少必要信息?上下文是否充分? | P0 | | **结构化** | 是否使用 Markdown/XML 标签组织内容? | P1 | | **示例性** | 是否提供输入输出示例(few-shot)? | P2 | | **约束性** | 是否明确边界(做什么/不做什么)? | P2 | > **注意**:上表的 P0/P1/P2 表示"优化维度的重要性优先级",与 config.yaml 中的 `dimensions` 数值(1-5)含义相同:P0=5(最高优先级)、P1=4、P2=3。 ## 优化工作流 ### Step 0: 输入验证(前置检查) 验证用户输入的有效性: | 输入状态 | 判断标准 | 处理方式 | |---------|---------|---------| | **空输入** | 字符数 = 0 | 拒绝,提示"请提供待优化的 prompt" | | **过短** | 字符数 < 10 | 提示"prompt 过短,请提供更多上下文" | | **已完善** | 评分 ≥ 8/10 | 提示"prompt 已足够完善,是否仍需优化?",等待用户确认 | | **有效** | 通过验证 | 继续 Step 1 | ### St...

Details

Author
huangwb8
Repository
huangwb8/skills
Created
6 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

prompt-engineering

Writes, rewrites, reviews, and audits prompts and system prompts using Anthropic's current official guidance, and selects the right model and effort level for the task before drafting. Use when the user asks to write a prompt, improve or fix a prompt, design a system prompt, or check a prompt before running a task — including phrasings like "帮我写 prompt"、"改一下这个 prompt"、"设计 system prompt"、"处理任务之前先检查我的 prompt"、"帮我把需求整理成 prompt"、"help me prompt this better". Applies whether the resulting prompt will be pasted into Claude Code for a coding task or run in a desktop chat or Cowork session for a non-coding task. Also use when the user pastes a prompt and asks why it is not working, when they are authoring an agent system prompt or CLAUDE.md, or when they ask which model or effort level to use. Several widely repeated prompt techniques are now obsolete or rejected by the API, so consult this skill even when prompting from memory feels sufficient.

2 Updated yesterday
ZHOUCOOKIE
AI & Automation Solid

prompt-enhancer

MUST use before task execution. Clarify vague requirements, explore solutions, and ensure full understanding.

7 Updated 6 days ago
konglong87
AI & Automation Solid

optimize-prompt-token-efficiency

Iteratively optimizes prompts for token efficiency by maximizing information density - reduces verbosity, removes redundancy, tightens phrasing while preserving semantic content. Use when asked to compress, shorten, reduce tokens, tighten, maximize density, increase information density, or make a prompt more concise.

69 Updated today
doodledood