微算力 · API 导航与自营网关
API 接入 EN
未登录登录
⚡

模糊输入 → 精准指令,一键优化

Prompt Refiner · v1.0.1
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
效率 安全 A 级 作者 jamesxu81 公开目录收录
626 下载 2 安装 2.2k 收藏 19 浏览

简介

基于Google TCREI框架的智能Prompt工程工具,将模糊、多语言、语音输入转化为结构化高质量指令,显著提升AI任务执行效率与准确性。

原始描述

Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task ex...

通过你的 Agent 添加

安装目录:prompt-refiner/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/prompt-refiner/
Codex CLI~/.codex/skills/prompt-refiner/
DeepSeek Harness~/.agents/skills/prompt-refiner/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: prompt-refiner description: Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task execution time by 2-3x and improves accuracy by 40-60%. Applies prompt engineering best practices including persona assignment, few-shot examples, chain of thought, and prompt chaining.

Prompt Refiner

Turn messy input into structured, AI-optimized prompts on the first try.

When to Use

  • Voice transcription input (speech-to-text)
  • Casual, informal, or mixed-language requests (English + Chinese)
  • Vague or ambiguous requests (missing target, unclear scope)
  • Complex multi-step tasks that benefit from chaining
  • Before destructive actions (delete, restart, deploy)

Skip if: request is already specific, task is simple/low-stakes, or user says "just do it."

Core Framework: TCREI

Google's prompt engineering framework — apply to every refined prompt:

Component What to include
Task Action verb + specific target. "Summarize the sales report for Q1"
Context Background, environment, constraints. "Account: jamesxu81@gmail.com, NZ timezone"
References Examples, templates, tone samples. "Match this format: [example]"
Evaluate How to judge the output. "Flag any missing data"
Iterate How to improve if result is off

The Process (5 Steps)

1. Analyze

Identify: Intent · Target · Constraints · Gaps · Language

2. Assign Persona (Always)

Give the AI a role that matches the task:

  • Code task → "You are a senior Node.js engineer"
  • Email task → "You are a professional business writer"
  • Data task → "You are a data analyst specializing in sales metrics"
  • Security task → "You are a cybersecurity expert reviewing for vulnerabilities"

3. Clarify (If Critical Gaps Exist)

Ask ONE focused question — not multiple.

  • ✅ "Which file — api/validate.js or api/auth.js?"
  • ❌ "Which file? What language? What to check? When is the deadline?"

4. Construct the Structured Prompt

Persona: [Role + expertise relevant to the task]

Task: [Action verb + specific target]

Context: [System, environment, account, paths, dates]

References: [Examples, templates, or few-shot samples when format matters]

Requirements: [Constraints, scope, edge cases, what NOT to do]

Output: [Format, destination, success criteria, level of detail]

Advanced techniques — apply when appropriate:

  • Few-shot: Add 1–2 input/output examples when format consistency matters
  • Chain of Thought: Add "Think step by step:" for complex reasoning
  • Prompt Chaining: Break multi-step tasks into linked sub-prompts
  • Meta Prompting: Ask AI to refine the prompt itself before executing

See references/techniques.md for when/how to use each technique.

5. Confirm & Execute

  • Destructive/complex actions: Show 1-sentence summary → get confirmation
  • Safe/obvious tasks: Execute directly

Quick Checklist

Before executing, verify:

  • ✅ Persona assigned
  • ✅ Intent is clear (specific action + target)
  • ✅ Context is concrete (real paths, accounts, dates)
  • ✅ Requirements are testable
  • ✅ Output format defined
  • ✅ Success criteria stated

Real Examples

See references/examples.md for complete worked examples including:

  • Voice transcription (Chinese) → Gmail check
  • Vague code review → structured debug prompt
  • Mixed-language service restart
  • Complex multi-step task with chaining

Common Anti-Patterns to Avoid

Anti-Pattern Fix
Too many requirements in one prompt Split into chained sub-prompts
Vague success criteria ("write a good report") Define measurable criteria
No edge case handling Add: "If X is missing, do Y"
Tweaking temperature instead of the prompt Improve prompt structure first
Negative instructions only ("don't do X") Tell it what TO do instead

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

prompt-engineeringai-workflowproductivityvoice-to-textmultilingualgoogle-frameworktcreichain-of-thought

同类 Skill