prompt-modules
v1.0.1
Published
Prompt Modules plugin for Claude Code — persistent module registry, auto-detect, @reuse, and learning system for vibe coders
Maintainers
Readme
🧩 Prompt Modules — Claude Code Plugin
Persistent module registry for Claude Code. Auto-detects reusable patterns, applies
@reuse, and learns from fixes — across every session and project.
What it does
Claude Code normally forgets everything between sessions. Prompt Modules gives Claude a persistent memory of your reusable patterns:
- Auto-detects modules in every message (auth, payments, marketplace, AI, etc.)
- Injects context from your registry automatically — no extra prompting needed
- Converts raw prompts to optimized PML with
@reuseapplied - Learns from fixes — when a bug is fixed, updates the module version
- Saves 60–75% tokens on repeated module usage across projects
Installation
Option 1 — Claude Code Marketplace (recommended)
Search for "Prompt Modules" in the Claude Code Marketplace and click Install.
Or via terminal:
npx prompt-modulesOption 2 — Manual install
# 1. Install the MCP server + CLI globally
npm install -g prompt-modules-mcp
# 2. Create your account (opens browser)
pm login
# 3. Auto-configure Claude Code MCP in one command
pm connect-mcp
# 4. Restart Claude CodeQuick start
After installing, open Claude Code and run:
/pm-setupThis walks you through connecting your API key and verifying the MCP connection.
Slash commands
| Command | Description |
|---|---|
| /pm-setup | First-time setup — connect API key, configure MCP |
| /pm-analyze | Convert any raw prompt to optimized PML |
| /pm-modules | Browse your module registry |
| /pm-save | Save current pattern as a reusable module |
| /pm-fix | Register a fix and create a new module version |
| /pm-stats | View token savings and usage dashboard |
How auto-detection works
Every time you send a message in Claude Code, the plugin silently checks for module keywords. When it finds a match, it injects the relevant module context before Claude responds.
You say: "add Stripe payments to my app"
↓
Plugin: Detects → payment_escrow
Loads → payment_escrow v3 from your registry
Injects → compiled_state into Claude's context
↓
Claude: Responds with your exact Stripe setup
(idempotency keys, escrow flow, webhook config)
— not a generic exampleYou never see the injection. Claude just knows your stack.
How the fix system works
Fixes are always interactive — you decide when something worked.
Bug found → Claude fixes it → You confirm it works
↓
/pm-fix → Claude asks:
"Should I save this fix to user_management v5?"
↓
You: "yes" → Module updated, fix versionedPlans
| Feature | Free | Pro ($15/mo) | Team ($49/mo) | |---|---|---|---| | Modules | 5 | 200 | Unlimited | | Saved prompts | 10 | 500 | Unlimited | | API calls/day | 50 | 2,000 | Unlimited | | Marketplace access | ✅ | ✅ | ✅ | | Team sharing | ❌ | ❌ | ✅ | | Creator revenue share | ❌ | ❌ | ✅ |
Upgrade → promptmodules.dev/pricing
CLI reference
pm login # Authenticate
pm modules # List your modules
pm modules save <name> <file> # Save module from file
pm modules delete <name> # Delete a module
pm prompts # List saved prompts
pm analyze <file> # Convert raw prompt to PML
pm connect-mcp # Configure MCP in Claude Code
pm stats # Usage dashboardOfficial marketplace modules
Pre-built, production-tested modules available for free:
| Module | Version | Category |
|---|---|---|
| auth-complete | v4.0 | Authentication (JWT, OAuth, RBAC) |
| stripe-payments | v3.0 | Payments (subscriptions, escrow, Connect) |
| rag-system | v2.0 | AI (embeddings, vector search, pgvector) |
| marketplace-kit | v1.0 | Marketplace (two-sided, proposals, state machine) |
Install via Claude Code: /pm-modules → Browse marketplace
API
The Cloud API powers all channels (Claude Code plugin, CLI, MCP server).
Base URL: https://fscbptnworxwjrkrzkrj.supabase.co/functions/v1
Auth: X-API-Key: pm_your_key_here| Endpoint | Method | Description |
|---|---|---|
| /auth/register | POST | Create account |
| /auth/login | POST | Login + get API key |
| /auth/me | GET | Profile + stats |
| /analyze | POST | Raw prompt → PML + modules |
| /optimize | POST | PML → inject @reuse |
| /modules | GET/POST | List / create modules |
| /modules/:name | GET/PUT/DELETE | Get / update / delete module |
| /modules/:name/fix | POST | Register a fix |
| /prompts | GET/POST | List / save prompts |
| /stats | GET | Usage metrics |
Tech stack
- Cloud API — Supabase Edge Functions (Deno)
- Database — PostgreSQL + pgvector (Supabase)
- MCP Server — TypeScript +
@modelcontextprotocol/sdk - CLI — Node.js (ships with MCP server package)
- Plugin — Claude Code skills + hooks + settings
Links
- 🌐 Website: promptmodules.dev
- 📦 npm (MCP + CLI): prompt-modules-mcp
- 📦 npm (Plugin): prompt-modules
- 🐛 Issues: github.com/davidlopez/prompt-modules
Built by David Lopez · MIT License
