← 返回 Skills 市场
jamesxu81

Prompt Refiner

作者 jamesxu81 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
176
总下载
2
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install covert-native-language-to-ai-firendly-prompt
功能描述
Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task ex...
使用说明 (SKILL.md)

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: [email protected], 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
安全使用建议
This skill appears to do what it says and contains only a small local CLI script. Before you install or use it: (1) do not paste secrets (passwords, API keys, tokens) into prompts; (2) be cautious when the skill asks for account names, file paths, or service names—only provide the minimum context needed; (3) require explicit confirmation before allowing the agent to execute any destructive or system-level actions referenced in a refined prompt; (4) if you plan to run the included CLI, review scripts/refine.js locally (it contains no network calls) and run it in a controlled environment; (5) if you want to avoid accidental execution, consider disabling autonomous invocation or instruct the agent to never execute commands automatically. If the skill were to add network calls, remote installs, or required credentials later, reassess (that would raise the risk).
功能分析
Type: OpenClaw Skill Name: covert-native-language-to-ai-firendly-prompt Version: 1.0.1 The 'prompt-refiner' skill is a legitimate utility designed to transform informal or vague user requests into structured, AI-optimized prompts. The core logic in 'scripts/refine.js' is a safe text-processing script that uses regular expressions to analyze intent and clarity without any network or file system side effects. The instructions in 'SKILL.md' and the examples in the 'references/' directory are well-documented and align strictly with the stated purpose of improving prompt engineering workflows.
能力评估
Purpose & Capability
Name/description (prompt refinement for messy/multi-language input) matches SKILL.md, examples, and the included CLI script (scripts/refine.js) which performs language/intent detection and builds structured prompts. No unrelated binaries, env vars, or external services are required.
Instruction Scope
SKILL.md confines the skill to analysis, clarification, persona assignment, and constructing structured prompts. However it also includes guidance to 'Confirm & Execute' and examples that embed system-specific context (email accounts, file paths, launchd services, health checks). The skill itself does not include code to perform those destructive actions, but the instructions could encourage an agent to ask for or accept sensitive operational details and then trigger execution via other capabilities. Recommend ensuring the agent does not automatically execute system-level actions without explicit user confirmation.
Install Mechanism
No install spec; this is instruction-first with a small local CLI JS file. There are no downloads, remote installers, or extracted archives in the skill package. package.json and scripts/refine.js are local and self-contained.
Credentials
The skill declares no required env vars, credentials, or config paths. Still, SKILL.md and examples explicitly encourage including account identifiers, system paths, and service names in the constructed prompts — which may lead users or agents to provide sensitive information (email accounts, local file paths, service names). This is proportionate to prompt-refinement functionality but users should avoid supplying secrets (passwords, tokens) and be cautious about automatic execution of actions that use that context.
Persistence & Privilege
Skill does not request persistent presence (always:false). It does not modify other skills or system settings. Autonomous invocation is allowed (platform default) but not combined with other privilege escalation indicators in this package.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install covert-native-language-to-ai-firendly-prompt
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /covert-native-language-to-ai-firendly-prompt 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
**Expanded prompt engineering and best practices integrated.** - Added prompt engineering best practices, including persona assignment, few-shot examples, chain of thought, and prompt chaining. - Introduced the Google TCREI framework for structured prompt design. - Now explicitly assigns AI personas relevant to each task type. - Includes a quick checklist to ensure prompt clarity, context, requirements, and output format. - Added references/examples.md and references/techniques.md for in-depth techniques and sample prompts. - Expanded guidance for handling advanced and multi-step tasks, including anti-patterns to avoid.
v1.0.0
Turn Messy Input into powerful AI Prompts
元数据
Slug covert-native-language-to-ai-firendly-prompt
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Prompt Refiner 是什么?

Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task ex... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 176 次。

如何安装 Prompt Refiner?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install covert-native-language-to-ai-firendly-prompt」即可一键安装,无需额外配置。

Prompt Refiner 是免费的吗?

是的,Prompt Refiner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Prompt Refiner 支持哪些平台?

Prompt Refiner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Prompt Refiner?

由 jamesxu81(@jamesxu81)开发并维护,当前版本 v1.0.1。

💬 留言讨论