← 返回 Skills 市场
anderskev

Prompt Improver

作者 Kevin Anderson · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
34
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install prompt-improver
功能描述
Optimize prompts for code-related tasks following prompt-engineering best practices. Use when refining prompts for implementation, debugging, refactoring, co...
使用说明 (SKILL.md)

Prompt Improver

Optimize code-related prompts for clarity, investigation-first thinking, and verification.

Input

$ARGUMENTS

Step 1: Analyze the Prompt

Evaluate the input prompt across these dimensions:

Dimension What to check
Task Clarity Is the task type clear? (implement, fix, refactor, review, test) Are boundaries defined?
Investigation Does it specify reading/understanding before acting?
Verification Are there appropriate checks? (run tests, build, lint)
Context Anchoring Does it reference specific files, functions, or patterns?
Action Specificity Is the desired outcome explicit? Quality expectations stated?
Scope Control Is it appropriately scoped? Clear stopping points?

Identify which dimensions are weak or missing in the input prompt.

Gates (sequenced)

Complete in order; do not skip steps.

  1. Audit gate (end of Step 1): Pass when the forthcoming Analysis names the task type and either lists each weak or missing dimension from the table or explicitly states all dimensions are adequate, with a brief reason for any dimension you treat as already sufficient.
  2. Transform gate (Step 2): Pass when every improvement you will list under "Improvements Applied" maps to a gap from the audit (or to deliberate strengthening when the prompt was already adequate).
  3. Output gate (Step 3): Pass when the Optimized Prompt block appears only after Gates 1–2 pass.

Step 2: Apply Transformation Rules

Task Clarity

  • Convert vague requests → specific task type + scope
  • Add "implement", "fix", "refactor", "review", or "test" when ambiguous
  • Specify affected files/components when inferable

Investigation-First

  • Add "Read and understand [relevant files] before making changes"
  • For bugs: "Reproduce and understand the root cause first"
  • For features: "Check existing patterns in the codebase"

Anti-Hallucination

  • "Do not assume code structure you haven't read"
  • "Verify imports/dependencies exist before using them"
  • "Check for existing utilities before creating new ones"

Verification Steps

  • For implementation: "Run tests after changes"
  • For refactoring: "Ensure behavior is unchanged"
  • For fixes: "Verify the fix and check for regressions"

Positive Framing

  • Convert "don't break tests" → "ensure tests pass after changes"
  • Convert "don't over-engineer" → "implement the minimal solution"

Scope Control

  • Add explicit boundaries when missing
  • Break multi-part requests into phases if needed

Examples

Bug Fix

Original: "fix the login bug"

Optimized:
Fix the login bug. First, read the authentication-related files to understand
the current implementation. Reproduce the bug to confirm the issue. Identify
the root cause before making changes. Implement the fix and run existing tests
to verify no regressions.

Feature Implementation

Original: "add dark mode"

Optimized:
Implement dark mode for the application. First, check how theming/styling is
currently handled in the codebase. Look for existing color variables or theme
patterns. Implement the toggle and theme switching with minimal changes to
existing components. Run tests and verify the UI renders correctly in both modes.

Refactoring

Original: "clean up the user service"

Optimized:
Refactor the user service for improved maintainability. Read the current
implementation and understand its responsibilities. Identify specific issues
(duplication, unclear naming, tight coupling). Make incremental changes,
running tests after each step to ensure behavior is unchanged.

Task-Type Tips

Task Type Tip
Bug fixes Include reproduction steps if known. Specify whether this is a quick fix or needs root cause analysis.
Feature implementation Reference similar features in the codebase. Specify if tests are expected.
Refactoring State the goal (readability, performance, testability). Emphasize incremental changes.
Code review Specify focus areas (security, performance, style). Mention what to ignore.
Testing Specify test type (unit, integration, e2e). Reference existing test patterns.

Step 3: Generate Output

Follow the Gates under Step 1 (audit → transform → output). Produce output in this exact format:

Analysis

[2-3 sentences identifying the prompt type, which dimensions are weak or missing, or why all dimensions are already adequate]

Improvements Applied

  • [Bullet list of specific transformations applied]

Optimized Prompt

[The improved prompt, ready to copy and use]

Tips for This Prompt Type

[1-2 sentences of relevant tips from the Task-Type Tips table]

安全使用建议
This version appears safe to install based on the clean VirusTotal and SkillSpector results and lack of artifact-backed concerns. As with any skill, review its visible instructions before use and avoid granting credentials or broad local access unless the task clearly requires it.
能力评估
Purpose & Capability
No scanner findings or inspected workspace evidence showed purpose-mismatched capabilities, exfiltration, destructive behavior, or deceptive instructions.
Instruction Scope
No prompt-injection indicators were supplied, and no material instruction-scope concerns were identified from the available evidence.
Install Mechanism
No suspicious install hooks, automatic execution, or unexpected dependency behavior were identified in the provided scan context.
Credentials
The supplied evidence does not show overbroad file, credential, network, or system access beyond a stated skill purpose.
Persistence & Privilege
No persistence mechanism, privilege escalation, background worker, or hidden long-running behavior was identified.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install prompt-improver
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /prompt-improver 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of prompt-improver skill. - Optimizes code-related prompts for implementation, debugging, refactoring, code review, and testing. - Audits prompts for clarity, context, investigation-first approach, verification, specificity, and scope. - Sequential gates enforce thorough prompt analysis and targeted improvements. - Provides clear formatted output with analysis, list of improvements, and an optimized prompt. - Includes prompt-specific tips for common code tasks.
元数据
Slug prompt-improver
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Prompt Improver 是什么?

Optimize prompts for code-related tasks following prompt-engineering best practices. Use when refining prompts for implementation, debugging, refactoring, co... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 34 次。

如何安装 Prompt Improver?

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

Prompt Improver 是免费的吗?

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

Prompt Improver 支持哪些平台?

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

谁开发了 Prompt Improver?

由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.0.0。

💬 留言讨论