Prompt Optimizer Toolkit

v1.0.0

LLM Prompt Engineering Toolkit - 提示词分析、优化、模板化与质量评分 | Analyze, optimize, template, and score your LLM prompts with built-in engineering strategies

0· 32·0 current·0 all-time
byLv Lancer@kaiyuelv

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for kaiyuelv/prompt-optimizer-toolkit.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Prompt Optimizer Toolkit" (kaiyuelv/prompt-optimizer-toolkit) from ClawHub.
Skill page: https://clawhub.ai/kaiyuelv/prompt-optimizer-toolkit
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install prompt-optimizer-toolkit

ClawHub CLI

Package manager switcher

npx clawhub@latest install prompt-optimizer-toolkit
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included Python code and examples. The code implements analysis, optimization, templating, scoring, and a local prompt library — all coherent with the stated purpose.
Instruction Scope
Runtime instructions are limited to running the provided Python module and installing Python deps. The code performs local file I/O (default storage prompts.json or user-specified path) to persist prompts; users should expect prompt data to be written to the working directory. There are no network calls, secret reads, or broad filesystem scans in the SKILL.md or code.
Install Mechanism
This is effectively instruction-only aside from a python dependency step referencing requirements.txt (which only pins pytest). No external downloads, tarballs, or obscure installers are used.
Credentials
The skill requires only python3 (declared) and no environment variables or credentials. The code does not reference hidden env vars or external service keys.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide configuration. It stores prompts in a local JSON file under the chosen path (default prompts.json).
Assessment
This skill appears coherent and self-contained. Before installing: (1) be aware it writes a JSON file (default prompts.json) in the working directory — avoid using it in folders with sensitive data or set a custom storage_path; (2) it has no network calls or secret handling, and requirements.txt only includes pytest; (3) tests add an absolute workspace path to sys.path (expected for the test harness) — not a runtime concern; (4) run it in a sandbox or review the prompt storage if you plan to store sensitive prompts. Overall it is consistent with its description.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

Binspython3
latestvk97afxv7wjtfhkqskb67990mt585pmgm
32downloads
0stars
1versions
Updated 9h ago
v1.0.0
MIT-0

Prompt Optimizer Toolkit

功能

  • Analyze — 多维度分析提示词质量(清晰度、具体性、上下文、约束、示例、角色)
  • Optimize — 自动检测最佳优化策略并应用
  • Template — 内置5种经典提示词模板(CoT、Few-shot、Role-play、Structured、Constraints)
  • Library — 本地提示词库管理,支持标签检索
  • Score — 1-10分综合质量评分

使用

from scripts.prompt_optimizer import PromptOptimizer, PromptLibrary

optimizer = PromptOptimizer()

# 分析提示词
analysis = optimizer.analyze("Write a story about a robot")
# → {'clarity_score': 7, 'specificity_score': 5, 'overall_score': 4, ...}

# 自动优化
better = optimizer.optimize("Write a story about a robot")
# → 添加角色、结构、约束

# 使用模板
prompt = optimizer.apply_template("role_playing", domain="creative writing", task="Write a sci-fi story")

# 提示词库
lib = PromptLibrary()
lib.save("coding-helper", "You are a senior Python developer...", tags=["coding", "python"])

CLI

python3 scripts/prompt_optimizer.py

Comments

Loading comments...