π§ Project Under Development - Evolving project, expect changes. Feedback welcome!
Prompt Library is your personal collection of AI agent prompts that transforms the way you interact with AI models. Store, organize, and execute sophisticated prompts through an intuitive CLI - supporting both Claude (Anthropic) and GPT (OpenAI) models.
- π― Purpose & Features
- β‘ Quick Start
- π οΈ How It Works
- π₯οΈ CLI Usage
- π Prompt Showcase
- π Getting Started
- 𧩠Prompt Composition with Fragments
- βοΈ Customizing Metadata Generation
- π€ Contributing
- π License
Treat AI prompts as reusable mini-applications that transform AI models into specialized agents. This approach promotes:
- Modularity: Compose complex prompts from reusable components
- Reusability: Apply successful prompts across multiple projects
- Shareability: Exchange proven prompts with your team
In today's rapidly evolving AI landscape, maintaining a personal prompt library is becoming essential for individuals and organizations alike.
β
Organized Prompt Storage - Categorized structure with rich metadata
β
Multi-Model Support - Works with both Claude and GPT family models
β
Intelligent CLI - Interactive prompt execution with variable support
β
Fragment System - Build prompts from reusable components
β
Automatic Metadata - GitHub Actions maintain documentation
β
Dev-Friendly - TypeScript codebase with comprehensive testing
# Clone repository
git clone https://github.com/YOUR_USERNAME/prompt-library.git
# Install dependencies
cd prompt-library && npm install
# Build and install CLI globally
npm run build && npm install -g .
# Launch interactive prompt menu
prompt-library-cli
- Create Prompts: Write markdown prompt files in the
prompts
directory - Generate Metadata: Commit to trigger automatic metadata generation
- Organize Automatically: README files update with categorized prompt listings
- Execute via CLI: Run prompts through the interactive CLI or command line
π‘ Pro Tip: Working with GitHub Actions
Create and commit prompt.md
files individually to allow GitHub Actions to generate corresponding metadata.yml
files. Both files are required for CLI prompt usage.
The CLI offers a complete prompt management and execution solution:
Command | Description | Example |
---|---|---|
prompt-library-cli |
Interactive menu | prompt-library-cli |
model |
Configure AI model settings | prompt-library-cli model |
prompts |
List and manage prompts | prompt-library-cli prompts --list |
execute |
Run a specific prompt | prompt-library-cli execute -p 74 |
fragments |
List and view fragments | prompt-library-cli fragments |
config |
Manage CLI configuration | prompt-library-cli config |
env |
Manage environment variables | prompt-library-cli env |
sync |
Update your library | prompt-library-cli sync |
settings |
Manage CLI settings | prompt-library-cli settings |
flush |
Reset all data (preserves config) | prompt-library-cli flush |
Usage: prompt-library-cli [options] [command]
Options:
-V, --version Output the version number
-e, --execute <id_or_name> Execute a prompt by ID or name
-l, --list List all available prompts
-s, --search <keyword> Search prompts by keyword
-h, --help Display help for command
prompt-library-cli model
The streamlined model menu lets you:
- π€ Change AI provider: Switch between Anthropic (Claude) or OpenAI (GPT)
- π§ Change model: Select from available models for your provider
- π Change max tokens: Adjust token limits for your responses
# List available prompts (to see IDs and names)
prompt-library-cli prompts --list
# Execute using prompt ID (most reliable)
prompt-library-cli execute -p 80 # ID for Software Architect Visionary
# Execute using prompt name (partial matches work too)
prompt-library-cli execute -p "git_commit_message_agent"
prompt-library-cli execute -p "commit message"
# With variables
prompt-library-cli execute -p 74 --description "Add user authentication" --files "auth.ts,users.ts"
# Or by name
prompt-library-cli execute -p "commit" --description "Add user authentication" --files "auth.ts,users.ts"
# Use file inputs
prompt-library-cli execute -p 81 -fi code=./my-code.ts
# Preview mode
prompt-library-cli execute -p "translator" -i
Tip: While both prompt IDs and names are supported, using IDs is more reliable. Directory names follow the pattern
{function}_{domain}_agent
and are matched using fuzzy search.
# List all prompts with their IDs and categories
prompt-library-cli prompts --list
# List all prompt categories
prompt-library-cli prompts --categories
# Search prompts by keyword (title, description, category)
prompt-library-cli prompts --search "git"
# Show favorite prompts
prompt-library-cli prompts --favorites
# Show recently executed prompts
prompt-library-cli prompts --recent
π Advanced CLI Usage
# Execute a prompt with file input
prompt-library-cli execute -p "translator" -fi input=./document.txt
# Execute with multiple file inputs
prompt-library-cli execute -p "code_review" -fi code=./src/app.js -fi tests=./tests/app.test.js
# Execute with both file inputs and regular variables
prompt-library-cli execute -p "document_generator" -fi template=./template.md --title "Project Overview" --author "Team"
# List all available fragments
prompt-library-cli fragments
# The interactive menu lets you browse and view fragment contents
# Fetch latest prompts from the default repository
prompt-library-cli sync
# Specify a custom repository URL
prompt-library-cli sync -u https://github.com/your-username/your-repo.git
# Force sync without confirmation
prompt-library-cli sync --force
# Set environment variables for API keys
prompt-library-cli env
# The interactive menu guides you through setting API keys and other environment variables
Note: For security, your API keys are stored securely and never logged or displayed in full.
Note: These prompts are fully customizable examples. Build your own collection based on your unique needs.
πΉ Coding
Prompt | Description |
---|---|
Git Branch Name Generator | Generates optimized git branch names based on project context and user requirements |
Git Commit Message Agent | Generates precise and informative git commit messages following Conventional Commits specification |
GitHub Issue Creator | Creates comprehensive and actionable GitHub issues based on provided project information |
Software Architect Code Reviewer | Generates comprehensive pull requests with architectural analysis and optimization suggestions |
Software Architect Specification Creator | Creates comprehensive software specification documents based on user requirements |
Software Architect Visionary | Analyzes user requirements and creates comprehensive software specification documents |
Software Development Expert Agent | Provides expert, adaptive assistance across all aspects of the software development lifecycle. |
πΉ Content Creation
Prompt | Description |
---|---|
Documentation Specialist Agent | Generates revolutionary software documentation using advanced AI techniques and industry best practices |
πΉ Healthcare
Prompt | Description |
---|---|
Health Optimization Agent | Generates personalized, adaptive health optimization plans based on comprehensive user data analysis |
Psychological Support and Therapy Agent | Provides AI-driven psychological support and therapy through digital platforms |
πΉ Problem Solving
Prompt | Description |
---|---|
Problem Solving AI Agent | Generates expert networks and strategies to solve complex problems and achieve goals |
πΉ Prompt Engineering
Prompt | Description |
---|---|
AI Assistant Architect | Conceptualizes innovative and feasible AI assistant designs for various domains |
Prompt Engineering God | Crafts divine-tier prompts to maximize AI potential while adhering to ethical standards |
πΉ Translation
Prompt | Description |
---|---|
Universal Translator Agent | Translates between any languages, modes of expression, or conceptual frameworks |
π‘ Pro Tip: Check out the Prompt Engineering category for prompts that help you create high-quality prompts
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/prompt-library.git
cd prompt-library
# Install dependencies
npm install
Choose your preferred AI provider:
π΅ Anthropic Claude
- Get an API key from the Anthropic Console
- Set the environment variable:
export ANTHROPIC_API_KEY=your_key_here
π’ OpenAI GPT
- Get an API key from the OpenAI Platform
- Set the environment variable:
export OPENAI_API_KEY=your_key_here
# Build TypeScript project
npm run build
# Install CLI globally
npm install -g .
# Launch interactive CLI
prompt-library-cli
# Configure your AI model
prompt-library-cli model
Note: On first run, you'll need to configure which AI model to use. The CLI will guide you through selecting a provider (Anthropic/OpenAI), model, and token settings.
If you want automatic README generation, add your API key to repository secrets:
- Go to your GitHub repository β Settings β Secrets β New repository secret
- Add
ANTHROPIC_API_KEY
orOPENAI_API_KEY
Fragments are modular, reusable prompt components that help you build complex prompts efficiently:
# Example prompt using fragments
I need you to help me with {{TASK_TYPE}}.
{{BEHAVIOR_GUIDELINES}}
Context:
{{USER_CONTEXT}}
Now, please {{SPECIFIC_INSTRUCTION}}.
- Add
.md
files to thefragments/
directory (categorized by type) - Reference them in your prompt files with
{{FRAGMENT_NAME}}
- Browse and manage fragments with
prompt-library-cli fragments
π Fragment Examples
Check the prompt_engineering directory for example fragments including:
- Behavior attributes
- Formatting guidelines
- Safety guidelines
- Output templates
The system automatically analyzes prompts and generates metadata. To customize this process:
- Modify the system prompt at
src/system_prompts/prompt_analysis_agent/prompt.md
- Test your changes with
npm run update-metadata
- Commit to trigger automatic updates
β οΈ Important Notes
Changes to the metadata system affect all future prompt analyses. Test thoroughly before committing.
Contributions are welcome! Here's how you can help:
- Add New Prompts: Share your best prompt designs
- Improve Templates: Enhance the prompt structure
- Fix Bugs: Help improve the CLI functionality
- Add Features: Extend the system's capabilities
Please submit issues or pull requests through GitHub.
This project is licensed under the MIT License - feel free to use, modify, and distribute as needed.