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

improve-prompt

v1.0.5

Published

CLI tool to improve AI prompts using expert prompt engineering knowledge

Downloads

10

Readme

improve-prompt

A command-line tool to enhance your AI prompts using expert prompt engineering knowledge.

What it does

improve-prompt takes your prompts and enhances them by prepending expert prompt engineering guidance, helping you get better results from AI models like GPT-4, Claude, and others.

The tool combines your input with a comprehensive system prompt that includes proven strategies and tactics for getting better results from large language models.

Installation

Install globally via npm:

npm install -g improve-prompt

Setup

Before using the tool, you need to configure your API key:

improve-prompt setup

This will prompt you to enter:

  • API key: Your OpenAI API key (or compatible provider key)
  • Base URL: API endpoint (default: https://api.openai.com/v1)
  • Model: Model to use (default: gpt-4.1)

The configuration is saved in the ~/.improve-prompt/ folder:

  • ~/.improve-prompt/.env - Contains your API configuration
  • ~/.improve-prompt/system.md - Contains the system prompt (customizable)

Configuration File Format

Your .env file will look like this:

# improve-prompt configuration
# Your API key for the AI service
API_KEY=your-api-key-here

# Base URL for the API (default: https://api.openai.com/v1)
BASE_URL=https://api.openai.com/v1

# Model to use (default: gpt-4.1)
MODEL=gpt-4o

Supported Providers

The tool works with any OpenAI-compatible API:

  • OpenAI: Use default base URL
  • Anthropic: Set base URL to https://api.anthropic.com
  • OpenRouter: Set base URL to https://openrouter.ai/api/v1
  • Local models: Set base URL to your local endpoint

Customizing the System Prompt

You can customize the prompt engineering behavior by editing the system prompt:

# Edit the system prompt to customize how prompts are improved
nano ~/.improve-prompt/system.md

The first time you run the tool, it will copy the default comprehensive system prompt to this location for easy customization.

Note: If you're upgrading from an older version, the tool will automatically migrate your existing ~/.improve-prompt file to the new folder structure.

Usage

Quick Setup with Alias

For faster access, you can create an alias in your shell:

# Add to your ~/.zshrc or ~/.bashrc
alias improve="pbpaste | improve-prompt | pbcopy && echo '✨ Improved prompt copied to clipboard'"

Then simply:

improve  # Improves clipboard content and copies result back

Pipe content from clipboard

pbpaste | improve-prompt

Pass prompt directly

improve-prompt "Write a function to calculate fibonacci numbers"

Pipe from file

cat my-prompt.txt | improve-prompt

Save output

echo "My prompt" | improve-prompt > improved-prompt.txt

Examples

Input:

echo "write code for user login" | improve-prompt

Output: The tool will enhance your prompt with expert guidance and return an improved version that includes:

  • Clear instructions for the AI
  • Context about best practices
  • Specific requirements for code quality
  • Examples and formatting guidelines

How it works

  1. System Prompt: The tool uses a comprehensive system prompt based on OpenAI's prompt engineering best practices
  2. Combination: Your input prompt is appended to the system prompt
  3. API Call: The combined prompt is sent to your configured AI model
  4. Clean Output: Only the improved prompt is returned

Help

improve-prompt --help          # Show general help
improve-prompt setup --help    # Show setup help

Troubleshooting

No API key configured

If you see this error:

❌ No API key configured.

To get started, run the setup command:
  improve-prompt setup

Run the setup command and enter your API key.

API errors

  • Verify your API key is correct
  • Check your internet connection
  • Ensure you have sufficient API credits
  • Verify the base URL for your provider

Attribution

Original system prompt created by @ksylvan.