create-prompt
v1.5.0
Published
Your daily prompt framework - creates organized AI prompts with smart auto-filling, context detection, and MCP context system.
Maintainers
Readme
create-prompt
Your daily prompt framework - organized AI prompts with smart auto-filling, context detection, and MCP support
Features
- MCP Context System: Define personas, standards, schemas, and project context for AI-optimized prompts
- Enhance Command: Generate contextualized prompts from casual intents
- Multi-LLM Support: Optimize prompts for Claude, Cursor, GPT, and more
- Project Structure Generation: Auto-generates project tree with customizable ignore patterns
- Git Workflow Integration: Structured commit tracking with file change documentation
- Auto-detection: Reads package.json to fill tools, versions, and environment
Installation
npm install -g create-promptOr use the short alias:
pQuick Start
# 1. Initialize the MCP context system
p init
# 2. Edit your context files
# .mcp/context/persona.md - Define your AI persona
# .mcp/context/standards.md - Your coding standards
# .mcp/context/instructions.md - Behavior rules
# 3. Generate contextual prompts
p e "create a login form with validation"MCP Context System
The MCP (Model Context Protocol) system lets you define reusable context for generating optimized prompts.
Initialize MCP
p init # or: p miCreates the .mcp directory structure:
.mcp/
├── prompts/ # Prompt templates (JSON)
│ ├── base.json
│ ├── ui.json
│ └── api.json
├── context/ # Project context (Markdown)
│ ├── persona.md # AI persona definition
│ ├── standards.md # Coding standards
│ ├── instructions.md # Behavior rules
│ ├── project_structure.md
│ ├── history.md
│ └── latest_commit.md
├── schemas/ # Variable schemas (JSON/YAML)
│ └── colors.yaml
└── config.json # MCP configurationGenerate Contextual Prompts
p enhance "create a signup button with primary color"
# or
p e "add user authentication API"The enhance command:
- Parses your casual intent
- Loads relevant context from
.mcp/context/ - Resolves variables from
.mcp/schemas/ - Selects appropriate template from
.mcp/prompts/ - Generates an optimized, contextualized prompt
Options:
| Flag | Short | Description |
|------|-------|-------------|
| --template | -t | Use specific template (ui, api, base) |
| --target | -T | Target LLM (claude, cursor, gpt) |
| --output | -o | Save to file |
| --interactive | -i | Interactive mode |
| --dry-run | -d | Preview without generating |
| --no-context | - | Exclude context files |
| --verbose | -V | Show detailed output |
| --copy | - | Copy to clipboard |
Examples:
p e "create modal component" --template ui
p e "add REST endpoint" --template api --target cursor
p e "refactor auth service" --output prompt.md --verboseValidate & List MCP Resources
p mcp-validate # or: p mv - Check for errors
p mcp-list # or: p ml - List all resources
p ml templates # List only templates
p ml schemas -v # List schemas with detailsProject Commands
Generate Project Structure
p project-structure # or: p psGenerates .mcp/project_structure.md with your directory tree.
Custom ignore patterns - Create .mcp/ignore_files.txt:
public/images
public/css
*.log
dist/Generate Files Markdown
p files-markdown # or: p fmAggregates file contents into .mcp/requested_files.md.
Setup - Create .mcp/requested_files.txt:
src/index.js
src/components/Header.jsx
README.mdGit Workflow
Finish Your Work
p finish # or: p fComplete your work session:
- Describe what you did
- Review git status
- Add file-by-file descriptions (optional)
- Auto-generates
.mcp/latest_commit.md - Updates
.mcp/context/history.md - Performs git commit
Legacy Prompt Creation
For quick, standalone prompts without MCP context:
p # Smart mode - asks for tags, task
p --quick # Quick mode - minimal questions
p -q --no-historyCreates individual prompt files: .mcp/YYYYMMDD_NN_slug.md
Quick Reference
| Command | Shortcut | Description |
|---------|----------|-------------|
| p init | p mi | Initialize MCP context system |
| p enhance <intent> | p e | Generate contextual prompt |
| p mcp-validate | p mv | Validate MCP configuration |
| p mcp-list | p ml | List MCP resources |
| p project-structure | p ps | Generate project structure |
| p files-markdown | p fm | Generate markdown from file list |
| p finish | p f | Finish work with git commit |
| p | - | Create standalone prompt |
| p --quick | p -q | Quick prompt creation |
Workflow Example
# Initial setup (once per project)
p init # Initialize MCP
# Edit .mcp/context/persona.md with your AI persona
# Edit .mcp/context/standards.md with your standards
# Daily workflow
p ps # Update project structure
p e "implement user dashboard" # Generate contextual prompt
# ... do your work ...
p f # Finish and commitProgrammatic API
const { mcp } = require('create-prompt');
const result = await mcp.generatePrompt(
"create a signup form",
{ template: "ui", target: "claude" }
);
console.log(result.prompt);License
MIT
