PrompyAI
Context-aware prompt intelligence for Claude CLI that scores prompts against the real codebase and rewrites them with AI-enhanced context.
README
<p align="center"> <img src="packages/landing/public/logo.png" alt="PrompyAI" width="120" /> </p>
<h1 align="center">PrompyAI</h1>
<p align="center"> Context-aware prompt intelligence for Claude CLI.<br/> Scores your prompts against your real codebase — file paths, symbols, session history — and rewrites them with AI. </p>
<p align="center"> <a href="https://www.npmjs.com/package/prompyai-mcp"><img src="https://img.shields.io/npm/v/prompyai-mcp" alt="npm" /></a> <a href="https://github.com/samouh-waleed/PrompyAI/blob/main/LICENSE"><img src="https://img.shields.io/github/license/samouh-waleed/PrompyAI" alt="license" /></a> <a href="https://prompyai.com"><img src="https://img.shields.io/badge/website-prompyai.com-7c3aed" alt="website" /></a> </p>
What It Does
When you write a prompt in Claude CLI, PrompyAI automatically evaluates it against your actual project and returns:
- Score (0–100) across 4 dimensions
- Suggestions tailored to your project
- AI-enhanced prompt rewritten with real file paths, verified symbols, and codebase context
Prompt Score: 43/100 [D]
Specificity 3/25 ==..............
Context Completeness 13/25 ========........
Task Clarity 15/25 =========.......
File & Folder Anchoring 10/25 ======..........
Key improvements:
1. Expand your prompt with more context
2. Add file paths using @mentions
3. Specify what format you expect the output in
4. Add acceptance criteria
Try something more like:
"Build the VS Code extension in packages/vscode-extension/ that integrates
with the PrompyAI MCP server at packages/mcp-server/. It should provide
real-time prompt scoring in the editor sidebar, show score breakdowns
(specificity, context, clarity, anchoring), and offer a 'rewrite prompt'
action. Use the shared types from packages/shared/."
Quick Start
claude mcp add prompyai -- npx prompyai-mcp serve
That's it. No sign-up, no config files. Works immediately.
Requires Node.js 20+ and Claude CLI.
How AI Enhancement Works
PrompyAI uses a two-layer architecture so all users get AI-enhanced output:
| User type | How it works |
|---|---|
API key users (ANTHROPIC_API_KEY set) |
PrompyAI calls Claude Haiku directly for fast, dedicated AI rewrites |
| Subscription users (no API key) | PrompyAI returns codebase context to Claude, and Claude itself generates the enhanced prompt using your existing session |
Either way, the enhanced prompt is grounded in your real project — actual file paths, verified function names, and project architecture.
Scoring Dimensions
Each dimension scores 0–25, total 0–100.
| Dimension | What it measures |
|---|---|
| Specificity | Concrete actions vs vague verbs, output format, quantitative constraints |
| Context Completeness | File references, error messages, expected vs actual behavior |
| Task Clarity | Single focused task, success criteria, unambiguous language |
| File & Folder Anchoring | @mentions, project entity references, verified symbol names |
Grades: A (90+) · B (70+) · C (50+) · D (30+) · F (<30)
Features
- Auto-scoring — Evaluates every prompt automatically, no manual trigger needed
- AI-enhanced for everyone — API key users get Haiku rewrites; subscription users get Claude-powered rewrites via codebase context
- Context-aware — Indexes your file tree, tech stack, git state, and code symbols via the TypeScript Compiler API
- Session-aware — Reads Claude Code conversation history for multi-turn context
- Symbol verification — Confirms that function/class names you reference actually exist in your code
- Monorepo support — Detects tech stacks across workspace packages
- Toggle — Say "pause prompyai" or "enable prompyai" at any time
MCP Tools
evaluate_prompt
Automatically called on every user message. Scores your prompt against your project.
| Parameter | Required | Description |
|---|---|---|
prompt |
yes | The prompt text to evaluate |
workspace_path |
yes | Absolute path to your project |
active_file |
no | Currently open file path |
session_id |
no | Claude Code session ID for multi-turn context |
get_context
Returns your project summary: tech stack, recent files, key folders, AI instruction files.
| Parameter | Required | Description |
|---|---|---|
workspace_path |
yes | Absolute path to your project |
prompyai_toggle
Turns auto-evaluation on or off.
| Parameter | Required | Description |
|---|---|---|
enabled |
yes | true to enable, false to disable |
Environment Variables
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
No | Enables direct AI suggestions via Claude Haiku (optional — works without it) |
PROMPYAI_TELEMETRY |
No | Set to false to opt out of anonymous telemetry |
Architecture
PrompyAI/
├── packages/
│ ├── mcp-server/ ← Core product (npm: prompyai-mcp)
│ ├── landing/ ← Website (prompyai.com)
│ └── shared/ ← Shared types for future IDE extensions
├── CLAUDE.md
└── README.md
Scoring Pipeline
User prompt
→ WorkspaceIndexer (file tree, stack, symbols)
→ ContextResolver (map prompt to codebase)
→ HeuristicScorer (20+ rules, 4 dimensions)
→ AISuggestionGenerator (Haiku or Claude-as-AI-layer)
→ DisplayFormatter (pre-formatted output)
Development
pnpm install # Install dependencies
pnpm test # Run tests (220 tests)
pnpm typecheck # Type check
pnpm build # Build
Links
- Website: prompyai.com
- npm: prompyai-mcp
- MCP Registry: io.github.samouh-waleed/prompyai
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。