{
  "markdown": "<p align=\"center\">\n  <img src=\"packages/landing/public/logo.png\" alt=\"PrompyAI\" width=\"120\" />\n</p>\n\n<h1 align=\"center\">PrompyAI</h1>\n\n<p align=\"center\">\n  Context-aware prompt intelligence for Claude CLI.<br/>\n  Scores your prompts against your real codebase — file paths, symbols, session history — and rewrites them with AI.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/prompyai-mcp\"><img src=\"https://img.shields.io/npm/v/prompyai-mcp\" alt=\"npm\" /></a>\n  <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>\n  <a href=\"https://prompyai.com\"><img src=\"https://img.shields.io/badge/website-prompyai.com-7c3aed\" alt=\"website\" /></a>\n</p>\n\n---\n\n## What It Does\n\nWhen you write a prompt in Claude CLI, PrompyAI automatically evaluates it against your actual project and returns:\n\n- **Score** (0–100) across 4 dimensions\n- **Suggestions** tailored to your project\n- **AI-enhanced prompt** rewritten with real file paths, verified symbols, and codebase context\n\n```\nPrompt Score: 43/100 [D]\n\n  Specificity         3/25  ==..............\n  Context Completeness 13/25  ========........\n  Task Clarity        15/25  =========.......\n  File & Folder Anchoring 10/25  ======..........\n\nKey improvements:\n  1. Expand your prompt with more context\n  2. Add file paths using @mentions\n  3. Specify what format you expect the output in\n  4. Add acceptance criteria\n\nTry something more like:\n\n  \"Build the VS Code extension in packages/vscode-extension/ that integrates\n   with the PrompyAI MCP server at packages/mcp-server/. It should provide\n   real-time prompt scoring in the editor sidebar, show score breakdowns\n   (specificity, context, clarity, anchoring), and offer a 'rewrite prompt'\n   action. Use the shared types from packages/shared/.\"\n```\n\n## Quick Start\n\n```bash\nclaude mcp add prompyai -- npx prompyai-mcp serve\n```\n\nThat's it. No sign-up, no config files. Works immediately.\n\nRequires Node.js 20+ and Claude CLI.\n\n## How AI Enhancement Works\n\nPrompyAI uses a two-layer architecture so **all users get AI-enhanced output**:\n\n| User type | How it works |\n|-----------|-------------|\n| **API key users** (`ANTHROPIC_API_KEY` set) | PrompyAI calls Claude Haiku directly for fast, dedicated AI rewrites |\n| **Subscription users** (no API key) | PrompyAI returns codebase context to Claude, and Claude itself generates the enhanced prompt using your existing session |\n\nEither way, the enhanced prompt is grounded in your real project — actual file paths, verified function names, and project architecture.\n\n## Scoring Dimensions\n\nEach dimension scores 0–25, total 0–100.\n\n| Dimension | What it measures |\n|-----------|-----------------|\n| **Specificity** | Concrete actions vs vague verbs, output format, quantitative constraints |\n| **Context Completeness** | File references, error messages, expected vs actual behavior |\n| **Task Clarity** | Single focused task, success criteria, unambiguous language |\n| **File & Folder Anchoring** | @mentions, project entity references, verified symbol names |\n\n**Grades:** A (90+) · B (70+) · C (50+) · D (30+) · F (<30)\n\n## Features\n\n- **Auto-scoring** — Evaluates every prompt automatically, no manual trigger needed\n- **AI-enhanced for everyone** — API key users get Haiku rewrites; subscription users get Claude-powered rewrites via codebase context\n- **Context-aware** — Indexes your file tree, tech stack, git state, and code symbols via the TypeScript Compiler API\n- **Session-aware** — Reads Claude Code conversation history for multi-turn context\n- **Symbol verification** — Confirms that function/class names you reference actually exist in your code\n- **Monorepo support** — Detects tech stacks across workspace packages\n- **Toggle** — Say \"pause prompyai\" or \"enable prompyai\" at any time\n\n## MCP Tools\n\n### `evaluate_prompt`\n\nAutomatically called on every user message. Scores your prompt against your project.\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `prompt` | yes | The prompt text to evaluate |\n| `workspace_path` | yes | Absolute path to your project |\n| `active_file` | no | Currently open file path |\n| `session_id` | no | Claude Code session ID for multi-turn context |\n\n### `get_context`\n\nReturns your project summary: tech stack, recent files, key folders, AI instruction files.\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `workspace_path` | yes | Absolute path to your project |\n\n### `prompyai_toggle`\n\nTurns auto-evaluation on or off.\n\n| Parameter | Required | Description |\n|-----------|----------|-------------|\n| `enabled` | yes | `true` to enable, `false` to disable |\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `ANTHROPIC_API_KEY` | No | Enables direct AI suggestions via Claude Haiku (optional — works without it) |\n| `PROMPYAI_TELEMETRY` | No | Set to `false` to opt out of anonymous telemetry |\n\n## Architecture\n\n```\nPrompyAI/\n├── packages/\n│   ├── mcp-server/     ← Core product (npm: prompyai-mcp)\n│   ├── landing/        ← Website (prompyai.com)\n│   └── shared/         ← Shared types for future IDE extensions\n├── CLAUDE.md\n└── README.md\n```\n\n### Scoring Pipeline\n\n```\nUser prompt\n  → WorkspaceIndexer (file tree, stack, symbols)\n  → ContextResolver (map prompt to codebase)\n  → HeuristicScorer (20+ rules, 4 dimensions)\n  → AISuggestionGenerator (Haiku or Claude-as-AI-layer)\n  → DisplayFormatter (pre-formatted output)\n```\n\n## Development\n\n```bash\npnpm install          # Install dependencies\npnpm test             # Run tests (220 tests)\npnpm typecheck        # Type check\npnpm build            # Build\n```\n\n## Links\n\n- **Website:** [prompyai.com](https://prompyai.com)\n- **npm:** [prompyai-mcp](https://www.npmjs.com/package/prompyai-mcp)\n- **MCP Registry:** [io.github.samouh-waleed/prompyai](https://registry.modelcontextprotocol.io)\n\n## License\n\nMIT\n",
  "bytes": 6005,
  "sha": "4203cd8978de717788ee1222910adde2198bf458c53dc99a74490c144b9a9c2e",
  "repo_slug": "samouh-waleed/prompyai",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_samouh_waleed_prompyai_282bbe9e/readme"
}