prompt-enhancer by sammcj/agentic-coding
npx skills add https://github.com/sammcj/agentic-coding --skill prompt-enhancer将非专业人士编写的提示词转化为领域专家在提出相同请求时会使用的形式。其目的是让人们无需学习特定领域的语言或问题结构,就能获得专家级框架带来的益处。
研究表明,AI 的输出质量与输入的复杂程度密切相关。AI 系统展现出“类人”心理——它们对专业信号、权威框架和精确的问题描述的反应方式与人类相同。一个措辞模糊的请求会产生通用的输出;而一个采用专家框架的请求则会产生专家级的输出。这项技能弥合了这种差距,且不改变用户所请求的内容,只改变其表达方式。
专家请求与新手请求的差异体现在可预测的模式上:
| 模式 | 新手 | 专家 |
|---|---|---|
| 精确性 | "让它更快" | "优化页面加载性能" |
| 问题分解 | 单一模糊的请求 | 分解为逻辑组件 |
| 约束条件 | 未说明 | 明确的限制、权衡、成功标准 |
| 上下文 | 缺失 | 系统适配性、标准、先前尝试 |
| 角色定位 | 无 | "作为一名数据库架构师,请审查此模式" |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 忽略 |
| 预见并明确说明 |
专家请求与新手请求的差异体现在可预测的模式上:
他们精确地命名事物。 专家使用特定领域的术语,因为这些术语含义明确。例如,"优化页面加载性能" 对比 "让它更快";"实施速率限制" 对比 "阻止人们过度使用"。
他们分解问题。 专家将请求分解为逻辑组件,识别依赖关系,并合理安排顺序。他们知道一个请求中包含哪些子问题。
他们明确约束条件和成功标准。 专家说明适用的限制、可接受的权衡,以及以可衡量标准定义的"完成"状态。
他们建立上下文。 专家将问题置于情境中:这属于哪个系统、适用哪些标准、为何重要、之前尝试过什么。
他们分配适当的角色。 专家通常会明确谁应该执行这项工作:"作为一名数据库架构师,请审查此模式",而不是"看看这个数据库的东西"。
他们预见失败模式。 专家知道可能出错的地方,并明确说明要避免或处理的事项。
这些示例说明了从新手框架到专家框架的转化过程:
原始提示: "我背疼,该怎么办?"
专家重写: "提供关于管理背痛的指导。涵盖:如何评估背痛是需要专业评估还是自我护理、需要紧急关注的危险信号症状、针对常见肌肉骨骼背痛的循证自我护理方法、有助于恢复与可能加重恢复的活动调整,以及何时考虑不同类型的从业者(全科医生、物理治疗师、脊椎按摩师等)。重点在于帮助我做出明智的决定,而非进行诊断。"
改变了什么: 从"告诉我该怎么做"重新定义为"帮助我理解这种情况下的决策过程"。明确了实际有用的信息类别。承认了适当的范围限制。
原始提示: "帮我吃得更健康"
专家重写: "我想可持续地改善我的饮食习惯。与其提供一个严格的饮食计划,不如给我:营养研究真正支持的最高影响力改变(而非时尚潮流)、考虑到现实世界约束(如时间和预算)的实用实施策略、如何思考权衡取舍(例如,何时'足够好'胜过'完美'),以及通常会让人偏离正轨的常见陷阱。我对建立持久的习惯比优化快速结果更感兴趣。"
改变了什么: 明确了想要的建议类型(可持续习惯 vs 严格计划),命名了决策框架(高影响力、循证),设定了优化目标(持久改变 vs 快速结果),预见了失败模式。
原始提示: "帮我提高效率"
专家重写: "我想提高我的个人效率。请将此视为一个诊断过程:生产力问题最常见的根本原因是什么(精力管理、优先级排序、环境、系统、动机),我如何识别哪些适用于我,以及哪些干预措施与每个根本原因相匹配?我宁愿理解底层原理,而不是得到一堆技巧和应用列表。包括如何评估一项改变是否真正有效。"
改变了什么: 从"给我技巧"重新定义为"帮助我诊断并解决根本原因"。要求提供原理而非战术。包含了成功标准(如何评估)。
原始提示: "我的青少年孩子不听我的话"
专家重写: "我正经历与青少年孩子的沟通困难。帮助我理解:青少年在权威和自主性方面的行为哪些是发育正常的、哪些沟通模式通常对青少年适得其反(以便我检查是否在使用它们)、基于证据的、顺应而非对抗青少年心理的方法,以及如何区分正常的边界试探行为和真正令人担忧的行为。我想改善关系,而不仅仅是获得顺从。"
改变了什么: 将目标从顺从重新定义为关系质量。要求提供解释行为的发育背景。既要求避免什么,也要求什么有效。设定了现实的期望。
原始提示: "给我写个短篇故事"
专家重写: "写一篇约 2000 字的短篇故事。目标是具有反思基调的文学小说——那种可能出现在高质量杂志上的作品。聚焦于一个揭示人物或关系更深层内涵的、小而具体的时刻。优先考虑声音和内心描写,而非情节机制。以共鸣而非解决方案结尾。用前提设定让我感到惊喜。"
改变了什么: 明确了长度、体裁定位和基调。命名了创作重点(声音、内心描写、共鸣)。在主题上给予创作自由的同时,提供了清晰的美学方向。
原始提示: "帮我谈判薪水"
专家重写: "我需要为一个工作机会谈判薪水。请引导我完成:如何研究和确定我的市场价值、应用于薪酬讨论的谈判心理学(锚定、框架、互惠)、在薪资对话中有效的具体措辞和策略、削弱谈判立场的常见错误,以及如何处理雇主常见的回应(预算限制、股权报价、延迟评审)。如果基本薪资确实固定,请包括如何谈判非薪资要素。"
改变了什么: 将"谈判"分解为构成技能。命名了相关的心理学原理。预见了可能出现的具体场景。包含了备用策略。
原始提示: "给我解释一下机器学习"
专家重写: "向没有技术背景的人解释机器学习。涵盖:使 ML 与传统编程不同的核心见解(学习模式 vs 遵循规则)、ML 问题的主要类别(监督、无监督、强化)并各举一个具体的现实世界例子,以及对 ML 真正擅长什么与它在哪些方面存在困难或被过度炒作的诚实评估。使用类比而非数学。保持在 800 字以内。"
改变了什么: 明确设定了受众水平,指定了结构和范围,要求具体例子,要求诚实地说明局限性(不仅仅是能力),设定了格式限制。
原始提示: "帮我写一份市场营销工作的求职信"
专家重写: "为市场营销职位起草一份求职信。结构:以展示对公司或市场的战略性思考的钩子开头(而非泛泛的热情),接着进入我过去产生营销影响的 2-3 个具体例子(我将提供细节),以自信的行动号召结尾。语气应为专业而热情、具有商业头脑且具体而非模糊。最多 300 字。避免使用诸如'对市场营销充满热情'或'对这个机会感到兴奋'之类的陈词滥调。"
改变了什么: 指定了招聘经理会回应的修辞结构。通过要避免的例子设定了语气参数。长度限制。指明了需要什么输入,而无需用户重新构建任何内容。
原始提示: "让我的网站更快"
专家重写: "分析网站性能并提供优先级的优化建议。评估主要性能维度:服务器响应时间、渲染阻塞资源、资源优化(图像、脚本、样式表)、缓存策略以及第三方脚本的影响。对于每个识别出的问题,解释问题、修复方法以及预期影响。按投入产出比进行优先级排序。我将提供 URL 或性能数据。"
改变了什么: 命名了诊断框架(性能维度)。指定了输出格式(问题/修复/影响)。设定了优先级标准。将其确立为行动前的分析。
原始提示: "我需要一个 Python 脚本来清理我的数据"
专家重写: "帮我编写一个用于数据清理的 Python 脚本。我将分享数据样本——据此,识别存在的数据质量问题(缺失值、重复项、格式不一致、异常值、编码问题),并编写处理每个问题的清理代码。使用 pandas。包含确认清理工作有效的验证。将代码结构化,使每个清理步骤都是独立且有注释的,便于根据我的具体需求进行修改。"
改变了什么: 建立了一个工作流程(展示样本 → 识别问题 → 编写代码)。指定了工具。要求验证和模块化结构。一旦共享数据,此版本即可进行,无需用户预先诊断自己的数据问题。
重写提示词时:
提供专家重写版本。如果你对模糊元素做出了假设,或者存在用户可能偏好的有意义的替代框架,请在重写后简要注明。
每周安装量
78
代码仓库
GitHub 星标数
114
首次出现
2026年1月30日
安全审计
安装于
gemini-cli73
codex73
opencode73
github-copilot71
cursor71
kimi-cli70
Transform prompts written by non-specialists into the form a domain expert would use to make the same request. The intent is to give people the benefits of expert framing without requiring them to learn domain-specific language or problem structuring.
Research demonstrates that AI output quality correlates strongly with input sophistication. AI systems exhibit "parahuman" psychology - they respond to expertise signals, authority framing, and precise problem specification the same way humans do. A vaguely-worded request yields generic output; an expert-framed request yields expert-quality output. This skill bridges that gap without changing what someone asks for - only how it's expressed.
Expert requests differ from novice requests in predictable ways:
| Pattern | Novice | Expert |
|---|---|---|
| Precision | "make it faster" | "optimise page load performance" |
| Decomposition | Single vague request | Broken into logical components |
| Constraints | Unstated | Explicit limits, trade-offs, success criteria |
| Context | Missing | System fit, standards, prior attempts |
| Role framing | None | "As a database architect, review this schema" |
| Failure modes | Ignored | Anticipated and specified |
Expert requests differ from novice requests in predictable ways:
They name things precisely. Experts use domain-specific terminology because it's unambiguous. "Optimise page load performance" vs "make it faster". "Implement rate limiting" vs "stop people using it too much".
They decompose problems. Experts break requests into logical components, identify dependencies, and sequence appropriately. They know what sub-problems exist within a request.
They specify constraints and success criteria. Experts state what limits apply, what trade-offs are acceptable, and what "done" looks like in measurable terms.
They establish context. Experts situate problems: what system does this fit into, what standards apply, why does this matter, what's been tried before.
They assign appropriate roles. Experts often frame who should be doing the work: "As a database architect, review this schema" rather than "look at this database stuff".
They anticipate failure modes. Experts know what can go wrong and specify what to avoid or handle.
These illustrate the transformation from novice to expert framing:
Original: "My back hurts, what should I do?"
Expert rewrite: "Provide guidance on managing back pain. Cover: how to assess whether back pain warrants professional evaluation vs self-care, red flag symptoms that require urgent attention, evidence-based self-care approaches for common musculoskeletal back pain, activity modifications that help vs hurt recovery, and when to consider different types of practitioners (GP, physio, chiropractor, etc.). Focus on helping me make informed decisions rather than diagnosing."
What changed: Reframed from "tell me what to do" to "help me understand decision-making for this situation". Specified the information categories that would actually be useful. Acknowledged appropriate scope limitations.
Original: "Help me eat healthier"
Expert rewrite: "I want to improve my eating habits sustainably. Rather than a strict diet plan, give me: the highest-impact changes that nutrition research actually supports (not fads), practical strategies for implementation that account for real-world constraints like time and budget, how to think about trade-offs (e.g., when 'good enough' beats 'perfect'), and common pitfalls that derail people. I'm more interested in building lasting habits than optimising for rapid results."
What changed: Specified the type of advice wanted (sustainable habits vs strict plans), named the decision framework (high-impact, evidence-based), set the optimisation target (lasting change vs rapid results), anticipated failure modes.
Original: "Help me be more productive"
Expert rewrite: "I want to improve my personal productivity. Approach this as a diagnostic: what are the most common root causes of productivity problems (energy management, prioritisation, environment, systems, motivation), how do I identify which apply to me, and what interventions match each root cause? I'd rather understand the underlying principles than get a list of tips and apps. Include how to evaluate whether a change is actually working."
What changed: Reframed from "give me tips" to "help me diagnose and address root causes". Asked for principles over tactics. Included success criteria (how to evaluate).
Original: "My teenager won't listen to me"
Expert rewrite: "I'm experiencing communication difficulties with my teenager. Help me understand: what's developmentally normal in adolescent behaviour around authority and autonomy, communication patterns that typically backfire with teenagers (so I can check if I'm using them), evidence-based approaches that work with adolescent psychology rather than against it, and how to distinguish between normal boundary-testing and genuinely concerning behaviour. I want to improve the relationship, not just achieve compliance."
What changed: Reframed the goal from compliance to relationship quality. Asked for developmental context that explains the behaviour. Requested both what to avoid and what works. Set realistic expectations.
Original: "Write me a short story"
Expert rewrite: "Write a short story of around 2,000 words. Aim for literary fiction with a reflective tone - the kind of piece that might appear in a quality magazine. Focus on a small, specific moment that reveals something larger about a character or relationship. Prioritise voice and interiority over plot mechanics. End with resonance rather than resolution. Surprise me with the premise."
What changed: Specified length, genre positioning, and tone. Named craft priorities (voice, interiority, resonance). Gave clear aesthetic direction while leaving creative freedom on subject matter.
Original: "Help me negotiate my salary"
Expert rewrite: "I need to negotiate salary for a job offer. Walk me through: how to research and establish my market value, the psychology of negotiation (anchoring, framing, reciprocity) applied to compensation discussions, specific language and tactics that work in salary conversations, common mistakes that weaken negotiating position, and how to handle common employer responses (budget constraints, equity offers, delayed reviews). Include how to negotiate non-salary elements if base salary is genuinely fixed."
What changed: Decomposed "negotiate" into component skills. Named relevant psychological principles. Anticipated the specific scenarios that arise. Included fallback strategies.
Original: "Explain machine learning to me"
Expert rewrite: "Explain machine learning for someone with no technical background. Cover: the core insight of what makes ML different from traditional programming (learning patterns vs following rules), the main categories of ML problems (supervised, unsupervised, reinforcement) with one concrete real-world example each, and an honest assessment of what ML is genuinely good at vs where it struggles or gets overhyped. Use analogies rather than maths. Keep it under 800 words."
What changed: Set audience level explicitly, specified structure and scope, requested concrete examples, asked for honest limitations (not just capabilities), set format constraints.
Original: "Help me write a cover letter for a marketing job"
Expert rewrite: "Draft a cover letter for a marketing position. Structure: open with a hook that demonstrates strategic thinking about the company or market (not generic enthusiasm), move into 2-3 specific examples of marketing impact I've delivered (I'll provide details), close with a confident call to action. Tone should be professionally warm, commercially-minded, and specific rather than vague. 300 words maximum. Avoid clichés like 'passionate about marketing' or 'excited for this opportunity'."
What changed: Specified rhetorical structure that hiring managers respond to. Set tone parameters with examples of what to avoid. Length constraint. Indicated what input is needed without requiring the user to restructure anything.
Original: "Make my website faster"
Expert rewrite: "Analyse website performance and provide prioritised optimisation recommendations. Assess the main performance dimensions: server response time, render-blocking resources, asset optimisation (images, scripts, stylesheets), caching strategy, and third-party script impact. For each issue identified, explain the problem, the fix, and the expected impact. Prioritise by effort-to-impact ratio. I'll provide the URL or performance data."
What changed: Named the diagnostic framework (performance dimensions). Specified output format (problem/fix/impact). Set prioritisation criteria. Established this as analysis before action.
Original: "I need a Python script to clean up my data"
Expert rewrite: "Help me write a Python script for data cleaning. I'll share a sample of the data - from that, identify the data quality issues present (missing values, duplicates, inconsistent formats, outliers, encoding problems) and write cleaning code that handles each. Use pandas. Include validation that confirms the cleaning worked. Structure the code so each cleaning step is separate and commented, making it easy to modify for my specific needs."
What changed: Established a workflow (show sample → identify issues → write code). Specified the tool. Asked for validation and modular structure. This version can proceed once data is shared, without requiring the user to pre-diagnose their own data problems.
When rewriting a prompt:
Identify the domain and who would professionally handle this request. This tells you what terminology, standards, and mental models apply.
Find the core intent beneath imprecise language. What does the user actually want to achieve or understand?
Identify what's implicit or ambiguous. What has the user not specified that would affect the outcome? Distinguish between:
Reframe using expert patterns: precise terminology, appropriate decomposition, explicit constraints, success criteria, and role framing where helpful.
Match complexity to the task. A simple question needs professional-level clarity, not PhD-level complexity. Don't inflate.
Provide the expert rewrite. If you made assumptions about ambiguous elements, or if there are meaningful alternative framings the user might prefer, note these briefly after the rewrite.
Weekly Installs
78
Repository
GitHub Stars
114
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli73
codex73
opencode73
github-copilot71
cursor71
kimi-cli70
Python PDF处理教程:合并拆分、提取文本表格、创建PDF文件
66,200 周安装
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
tmux进程管理最佳实践:交互式Shell初始化、会话命名与生命周期管理
69 周安装