A multilingual prompt diagnosis and optimization workflow built with Dify Chatflow.
PromptCheckup is a Chinese-first, multilingual prompt diagnosis and optimization tool built with Dify Chatflow and a local Web UI.
PromptCheckup 是一个基于 Dify Chatflow 的多语言 Prompt 体检工具,支持结构预检、意图分流、任务分类、 结构化诊断、风险评分、Prompt 优化、多轮追问调整和修改表单后的重新诊断。
中文名:Prompt 体检医生
PromptCheckup v0.3.0 includes four parts:
- Dify Chatflow template:
dify/prompt-checkup.yml - Local React Web UI
- Local Node Dify API wrapper
- Vercel API Functions for hosted demo deployment
The Web UI calls /api/chat. In local development this is served by the local Node wrapper; on Vercel it is served
by Vercel API Functions. Both paths call your own Dify App API server-side. PromptCheckup does not include model
credits, hosted inference, a database, login, or cloud history.
PromptCheckup v0.3.0 adds Vercel demo deployment support while keeping the local Web UI workflow available. The hosted demo path uses Vercel API Functions, demo access-code protection, and input length limits. See docs/vercel-deployment.md. The initial Vercel demo uses the Dify Chat API in blocking mode, so complex reports can take a long time and may hit upstream or serverless timeout limits.
- Importable Dify Chatflow template
- Local React Web UI
- Local Node Dify API wrapper
- Vercel API Functions for hosted demos
- Real prompt diagnosis through the user's own Dify App API
- Multi-turn follow-up adjustment
- Re-diagnose current form
- New session
- Local draft persistence
- Chinese / English / Japanese UI
- Copy full report
- Copy last answer
- Download Markdown
- API key kept on local backend, not in browser
- Demo access code support for hosted Vercel sharing
The Dify Chatflow core follows this path:
User Input
-> Interaction Intent Routing
-> Precheck
-> Validity Gate
-> Task Classification
-> Non-Prompt Reply / Brief Diagnosis / Structured Diagnosis
-> Score Calculation
-> Final Report
-> Follow-up Adjustment
The local v0.2 runtime adds:
Browser Web UI
-> Local /api/chat
-> Local Node wrapper
-> Dify App API /chat-messages
Detailed notes are in docs/architecture.md, docs/web-ui.md, and docs/local-wrapper.md.
- Clone this repository.
- Import
dify/prompt-checkup.ymlinto Dify. - Configure the model provider inside your own Dify workspace.
- Publish the Dify app.
- Create a Dify App API Key.
- Copy
.env.exampleto.env. - Fill the local environment variables:
DIFY_API_BASE_URL=https://api.dify.ai/v1
DIFY_API_KEY=your_dify_app_api_key_here
DIFY_USER=local-user
SERVER_PORT=8787
DEMO_ACCESS_CODE=change_me_for_public_demo- Install dependencies and start the local app:
npm install
npm run dev- Open:
http://localhost:5173
You must use your own Dify App API Key. Model usage and cost are handled by your own Dify workspace and model
provider configuration. Do not commit .env.
- Import the GitHub repository into Vercel.
- Use the repository root directory
./. - Confirm build settings:
Framework Preset: Vite
Build Command: npm run build --workspace web
Output Directory: web/dist
- Configure Vercel Environment Variables:
DIFY_API_BASE_URL=https://api.dify.ai/v1
DIFY_API_KEY=your_dify_app_api_key_here
DIFY_USER=local-user
DEMO_ACCESS_CODE=change_me_for_public_demo- Deploy and open the generated Vercel URL.
- Enter the configured demo access code in the Web UI before running diagnosis.
Store real values only in Vercel Environment Variables. Do not commit .env, server/.env, Dify keys, model
provider keys, or real demo access codes to GitHub.
In the Dify console, import:
dify/prompt-checkup.yml
After import, check the model provider configuration and publish the app before using the local Web UI. The exported Flow does not contain a public API key.
- Fill the prompt diagnosis form.
- Click Start Diagnosis.
- Read the Markdown diagnosis report.
- Use follow-up messages to adjust the output.
- Use Re-diagnose current form after editing the form fields.
- Use Copy full report, Copy last answer, or Download Markdown.
- Start a New Session when you want to clear the conversation while keeping the form available.
Test notes are in docs/test-cases.md. Example inputs are stored in examples/.
See docs/roadmap.md. Vercel deployment notes are in docs/vercel-deployment.md.
DIFY_API_KEYis only read by the local backend or Vercel API Functions.- The browser calls
/api/chat. - The frontend must not expose a Dify API Key.
- Hosted demo requests send the demo access code through
x-demo-access-code. .envis ignored by git.- Do not commit
.env, Dify App API keys, model provider keys, or GitHub tokens. - The Vercel demo access code is lightweight protection for preview sharing, not full authentication, per-user quota, or billing.
- v0.2 does not provide dedicated optimized / advanced prompt copy buttons.
- Dify currently returns optimized / advanced prompts as natural-language Markdown sections, not stable machine-readable fields.
- Dedicated optimized / advanced prompt copy can return after a future structured output version adds stable fields or explicit Markdown markers.
- Review-depth modes may not always produce strongly differentiated results until the Dify Flow prompt logic is upgraded.
- v0.3 Vercel demos initially use Dify blocking mode. Complex reports may time out; retry with a shorter prompt, a lighter review mode, or try again later.
- Streaming responses and Dify Flow performance optimization are planned future improvements.
MIT License. See LICENSE.
