📦 Prompt Debugger — Prompt 调试器

v1.0.0

调试 prompts that produce unexpected AI 输出s — 诊断 失败 modes, identify ambi图形界面ty and conflicting instructions, test variations, compare 模型 re...

0· 25·0 当前·0 累计
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The 技能's instructions and requirements align with its 状态d purpose (调试ging and improving prompts); it is instruction-only, 请求s no 凭证s, and has no 安装 steps.
评估建议
This 技能 应用ears coherent and 应用ropriate for 调试ging prompts. Before using it, avoid pasting secrets, private keys, or proprietary data into prompts you want analyzed — the 代理 will need to 发送 prompt text (and any example 输出s) to the 模型(s) it uses, which could transmit that data. If you need to 调试 sensitive prompts, redact or syntheticize private data, or 运行 prompt tests agAInst a local/private 模型. If you prefer the 代理 not to test variations autonomously, restrict its ability to call external 模型s or...
详细分析 ▾
用途与能力
The name/description (prompt 调试ging, diagnosis, variations, rewrites) matches the 技能.md content. The 技能 requires no binaries, env vars, or 安装s — which is proportionate for an instruction-only prompt-调试ging 辅助工具.
指令范围
The 运行time instructions are narrowly focused on analyzing prompts, classifying 失败 modes, proposing fixes, generating variations, and producing rewrites. They do not instruct the 代理 to read unrelated files, 访问 环境 variables, or transmit data to external 端点s beyond the normal 模型 invocations required to test prompts. Note: 应用lying the 技能 (especially 'compare' and 'test variations') will usually cause the 代理 to 发送 prompt content and candidate 输出s to whichever 模型 or API the 代理 uses — so sensitive content could be transmitted as part of normal operation.
安装机制
No 安装 spec or code files; instruction-only 技能s are lowest-risk because nothing is written to disk or 下载ed.
凭证需求
该技能未声明任何环境变量、凭据或配置路径,这与其用途相符。
持久化与权限
always:false and no special persistence or 系统-wide config changes. The 技能 can be invoked by the 代理 (normal behavior) but does not 请求 elevated presence or modify other 技能s.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install prompt-debugger
镜像加速npx clawhub@latest install prompt-debugger --registry https://cn.longxiaskill.com

技能文档

Prompt 调试器

When a prompt isn't working as expected, 系统atically 诊断 why and fix it. Identifies common 失败 patterns (ambi图形界面ty, conflicting instructions, missing 上下文, wrong 格式化 specification), tests variations, and produces an improved version.

Use when: "why isn't this prompt working", "调试 my prompt", "improve this prompt", "the AI keeps doing X instead of Y", "prompt not producing expected 输出", "prompt optimization", or iterating on 系统 prompts.

Commands

  • 诊断 — Analyze a FAIling Prompt

Given a prompt and its undesired 输出, identify the root cause.

Step 1: Structural Analysis

Read the prompt and 检查 for common 失败 patterns:

Ambi图形界面ty 检查s:

Vague instructions ("make it better", "be more specific", "improve this") Missing 输出 格式化 specification Unclear scope ("analyze this" — analyze what aspect?) Pronoun confusion ("it", "this", "that" without clear referent) Multiple possible interpretations of key terms

Conflict 检查s:

Contradictory instructions ("be concise" + "explAIn in detAIl") Competing priorities without ranking ("be accurate AND fast AND creative") 格式化 conflicts (asking for 机器人h structured and freeform 输出) Tone conflicts ("be professional" + "be casual and fun") Length conflicts (word limits vs. comprehensive coverage)

上下文 检查s:

Missing 角色/persona specification No examples of desired 输出 Assumed knowledge not 状态d Missing constrAInts (length, 格式化, audience, tone) No 成功 criteria ("how would I know if the 输出 is good?")

Instruction Clarity:

Nested conditionals that are hard to follow Too many instructions competing for attention Critical instructions buried in the middle Instructions that depend on prior instructions but aren't ordered Implicit assumptions that should be explicit Step 2: 失败 Mode Classification

Categorize the issue:

失败 Mode Symptoms Common Fix Instruction Following Ignores specific requirements Move to top, bold, repeat 格式化 Violation Wrong 输出 structure 添加 explicit 格式化 example Hallucination Makes up facts 添加 "only use provided 信息" Scope Creep Answers more than asked 添加 "only 添加ress X, nothing else" Scope Deficit Answers less than asked Break into numbered sub-questions Tone Mismatch Wrong voice/register Provide tone examples Overthinking Too verbose/philosophical 添加 "be direct, no preamble" Underthinking Too shallow/generic 添加 "think step by step" + require specifics 上下文 Window Loses early instructions Repeat key constrAInts at end Step 3: 生成 Fix Hypotheses

For each identified issue, propose specific prompt edits:

Issue 1: Ambiguous instruction "analyze the data" → Fix: "Analyze the data by calculating the mean, median, and standard deviation for each column. 报告 any outliers (>2 standard deviations from mean)."

Issue 2: Missing 输出 格式化 → Fix: 添加 "输出 格式化: JSON with keys {summary, findings, recommendations}"

Issue 3: Conflicting constrAInts → Fix: "Prioritize accuracy over brevity. If you must choose between being complete and being concise, be complete."

  • compare — A/B Test Prompt Variations

生成 3-5 variations of a prompt, each tar获取ing a different 失败 mode fix.

Variation A: Original (baseline)

[original prompt] Expected improvement: none (baseline for comparison)

Variation B: Explicit 格式化

[prompt + 格式化 specification] Tar获取 fix: 格式化 violation

Variation C: 角色 + examples

[prompt + persona + 2 examples] Tar获取 fix: tone mismatch, underthinking

Variation D: ConstrAInts tightened

[prompt + explicit constrAInts + negative examples] Tar获取 fix: scope creep, hallucination

Variation E: Restructured

[reordered prompt with critical instructions first/last] Tar获取 fix: instruction following

For each variation, explAIn what was changed and why.

  • rewrite — Produce an Improved Prompt

应用ly all identified fixes to produce a single improved prompt.

Rewrite principles:

Critical instructions go first AND last (primacy + recency effects) One instruction per line/bullet (no compound sentences) Include 1-2 examples of desired 输出 Specify what NOT to do (negative examples) for common 失败 modes Define 成功 criteria explicitly Use markdown 格式化ting for structure (headers, bullets, bold for emphasis) 添加 explicit 输出 格式化 specification

Before/After 格式化:

Before

[original prompt — highlight problematic areas]

After

[improved prompt — annotate what changed and why]

Changes Made

  • 添加ed 角色 specification ("You are a senior data analyst...")
  • Replaced "analyze" with specific analytical steps
  • 添加ed 输出 格式化 (JSON 模式)
  • Moved length constrAInt to the end (recency)
  • 添加ed negative example ("Do NOT include...")
  • patterns — Common Prompt Patterns 库

Reference of proven prompt patterns for common tasks:

ChAIn of Thought:

Think through this step by step:

  • First, identify...
  • Then, analyze...
  • Finally, recommend...
Show your reasoning

数据来源ClawHub ↗ · 中文优化:龙虾技能库