npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mkprompt

v1.0.1

Published

A CLI tool that generates dynamic prompts from templates using variable substitution, perfect for AI assistants and repeatable workflows.

Readme

mkprompt - Dynamic Prompt Generator

A CLI tool that generates dynamic prompts from templates using variable substitution, perfect for AI assistants and repeatable workflows.

Features

  • 🚀 Interactive CLI - Select prompts and fill variables interactively
  • 📝 Dynamic Variables - Use <?variable_name?> syntax for templating
  • ⚙️ Configurable - Customize paths, comments, and output settings
  • 🎯 AI-Friendly - Generate prompts ready for ChatGPT, Claude, and others
  • 🔧 Zero Dependencies - Pure Node.js, no external dependencies
  • 📁 Organized Output - Timestamped files for easy tracking
  • 🎨 Beautiful CLI - Colorful and intuitive interface

Installation

npm install -g mkprompt

Quick Start

Initialize mkprompt in your project

mkprompt config

This creates:

  • mkprompt.config.json - Configuration file
  • prompts/ - Directory for your prompt templates
  • mkprompt/ - Output directory (added to .gitignore)
  • An example prompt template

Generate a prompt

mkprompt

Usage

Basic Flow

  1. Run mkprompt in your project directory
  2. Select a prompt from your templates
  3. Fill in the variables when prompted
  4. Get your generated prompt in the mkprompt/ directory

Example Session

$ mkprompt

📝 Available Prompts

  1) code-review.txt
  2) documentation.txt
  3) refactor.txt

? Select a prompt (1-3): 1

✓ Selected: code-review.txt

ℹ Found 3 variable(s): language, framework, focus_area

📋 Fill in the variables

? language: TypeScript
? framework: NestJS
? focus_area: performance optimization

✨ Prompt generated successfully!
✓ Output: mkprompt/code-review_2025-01-15_14-30-45.txt

Variable Syntax

Use <?variable_name?> in your prompt templates:

You are an expert in <?programming_language?>.

The project is called <?project_name?> and uses <?framework?>.

Please help with:
<?task_description?>

Focus on:
- <?focus_area_1?>
- <?focus_area_2?>

Variable Naming

  • Use underscores for multi-word variables: <?user_name?>
  • Variables are displayed with spaces: user name
  • Same variable can appear multiple times (only asked once)

Configuration

The mkprompt.config.json file:

{
  "prompts_path": "./prompts",
  "first_comment": "/* Prompt Generated by mkprompt */",
  "last_comment": "/* End of Prompt */"
}

| Option | Description | Default | |--------|-------------|---------| | prompts_path | Directory containing prompt templates | "./prompts" | | first_comment | Comment added at the beginning | "/* Prompt Generated by mkprompt */" | | last_comment | Comment added at the end | "/* End of Prompt */" |

Output Format

Generated prompts are saved as:

mkprompt/
└── promptname_YYYY-MM-DD_HH-MM-SS.txt

Example output:

/* Prompt Generated by mkprompt */

You are an expert in TypeScript.

The project is called MyApp and uses NestJS.

Please help with:
Optimize database queries for better performance

Focus on:
- Query efficiency
- Caching strategies

/* End of Prompt */

Example Prompts

Code Review Prompt

You are a senior <?language?> developer reviewing code.

Project: <?project_name?>
Framework: <?framework?>

Review the following code focusing on:
- <?focus_area?>
- Best practices
- Potential bugs

Code to review:
<?code_snippet?>

Documentation Prompt

Generate documentation for a <?type?> in <?language?>.

Component name: <?component_name?>
Purpose: <?purpose?>

Include:
- Description
- Parameters/Props
- Usage examples
- <?additional_sections?>

Refactoring Prompt

Refactor the following <?language?> code.

Current implementation:
<?current_code?>

Goals:
- <?goal_1?>
- <?goal_2?>

Constraints:
- Maintain backward compatibility with <?api_version?>
- Follow <?style_guide?> guidelines

Commands

| Command | Description | |---------|-------------| | mkprompt | Interactive prompt generation | | mkprompt config | Create configuration and directories | | mkprompt help | Show help message | | mkprompt --version | Show version |

Directory Structure

After running mkprompt config:

your-project/
├── mkprompt.config.json    # Configuration
├── prompts/                # Your prompt templates
│   └── example.txt         # Example template
├── mkprompt/               # Generated outputs (gitignored)
│   └── example_2025-01-15_14-30-45.txt
└── .gitignore              # Updated with mkprompt/

Use Cases

  • AI Pair Programming - Generate consistent prompts for code assistance
  • Documentation - Create templated requests for doc generation
  • Code Reviews - Standardize review request prompts
  • Onboarding - Create repeatable prompts for common tasks
  • Team Workflows - Share prompt templates across your team

Platform Support

  • Windows - Full support
  • macOS - Full support
  • Linux - Full support

Requirements

  • Node.js 14.0+
  • npm (for installation)

Troubleshooting

Command not found

  1. Ensure npm global bin is in your PATH
  2. Try: npm bin -g to see installation location
  3. Restart your terminal

Permission errors (Unix)

sudo npm install -g mkprompt

Or fix npm permissions: https://docs.npmjs.com/resolving-eacces-permissions-errors

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

License

MIT License - see LICENSE file for details.

Author

David200197 - GitHub

Related Projects

  • mkctx - Generate markdown context from your codebase