🔮 Prompt Optimizer

ZCode 提示词优化插件 · 让 AI 帮你写出更好的提示词 ZCode plugin that refines your prompts using AI

📦 pip install prompt-optimizer-mcp 🐙 GitHub: goodie1972/prompt-optimizer ZCode 插件ZCode Plugin
1 📥 安装插件Install Plugin 两种方式,任选其一Two methods available
A
ZCode 插件市场(推荐)ZCode Plugin Marketplace (Recommended)
打开 ZCode → Settings → Plugin Management → Discover → 点击 → 输入: Open ZCode → Settings → Plugin Management → Discover → Click → Enter:
https://github.com/goodie1972/prompt-optimizer
B
pip 安装pip Install
pip install prompt-optimizer-mcp
然后在 ZCode 的 Settings → MCP 中添加服务器配置 Then add the server in ZCode Settings → MCP
2 🔑 配置 API KeyConfigure API Key 只需设置一次One-time setup

In ~/.zcode/mcp/prompt-optimizer/.env 中写入: add:

# 方式一:直接指定# Option 1: Direct config
OPTIMIZE_API_KEY=sk-your-key
OPTIMIZE_BASE_URL=https://api.openai.com/v1
OPTIMIZE_MODEL=gpt-4o

# 方式二:使用已有环境变量(自动识别)# Option 2: Use existing env vars (auto-detect)
# AGNES_API_KEY=...
# DEEPSEEK_API_KEY=...

💡 未配置时会自动读取 ZCode 当前激活的模型配置 Auto-detects your active ZCode model if not configured

3 🎮 使用演示Live Demo 试试下面的交互Try it below
💬 Chat 🧠 Agent 📚 Knowledge ⚙️ Settings
输入提示词Enter your prompt
ZCode — prompt-optimizer
$ 输入 /optimize 命令开始优化...$ Type /optimize to start...
4 📋 示例Examples 点击体验Click to try
zh=原始: 请帮我写个代码|en=Raw: Write a Python script
zh=→ 优化后:明确需求 + 列要点|en=→ After: clear + structured
zh=原始: 优化一下这段文字|en=Raw: Polish this text
zh=→ 优化后:指定目标 + 约束条件|en=→ After: goals + constraints
zh=原始: 帮我解释这段代码|en=Raw: Explain this code
zh=→ 优化后:指定角度 + 分析维度|en=→ After: perspectives + dimensions