|
2 | 2 |
|
3 | 3 | > 🚧 **Project Under Development** - Evolving project, expect changes. Feedback welcome!
|
4 | 4 |
|
5 |
| -Welcome to the **Prompt Library**, a collection of categorized AI prompts for easy navigation and reuse. Fork and customize this repository to build your own personalized prompt library tailored to your needs. |
| 5 | +Welcome to the **Prompt Library**, a collection of categorized AI prompts for easy navigation and reuse. This project combines GitHub Actions automation with a CLI for managing and using prompts, supporting both CI environments and desktop usage. |
6 | 6 |
|
7 | 7 | ## 📚 Table of Contents
|
8 | 8 |
|
9 |
| -<!-- START doctoc --> |
10 |
| -<!-- END doctoc --> |
| 9 | +<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
| 10 | +<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
11 | 11 |
|
12 |
| -## 🎯 Purpose |
| 12 | +- [🎯 Purpose & Features](#-purpose--features) |
| 13 | +- [⚡ Quick Start](#-quick-start) |
| 14 | +- [🛠️ How It Works](#-how-it-works) |
| 15 | +- [🖥️ CLI Usage](#-cli-usage) |
| 16 | + - [Interactive Menu](#interactive-menu) |
| 17 | + - [List Prompts and Categories](#list-prompts-and-categories) |
| 18 | + - [Sync Personal Library](#sync-personal-library) |
| 19 | + - [Execute Prompts](#execute-prompts) |
| 20 | +- [📂 Prompt Library Example](#-prompt-library-example) |
| 21 | +- [🚀 Getting Started](#-getting-started) |
| 22 | +- [🧩 Using Fragments](#-using-fragments) |
| 23 | +- [⚙️ Metadata Customization](#-metadata-customization) |
| 24 | +- [🤝 Contributing](#-contributing) |
| 25 | +- [📄 License](#-license) |
13 | 26 |
|
14 |
| -This project provides a structured framework for organizing and managing AI prompts, helping you to: |
| 27 | +<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
15 | 28 |
|
16 |
| -1. Store and categorize your prompts efficiently |
17 |
| -2. Automatically generate metadata for your prompts |
18 |
| -3. Easily navigate and reuse your prompt collection |
19 |
| -4. Collaborate and share prompts with others |
20 |
| -5. Create modular and reusable prompt components using fragments |
| 29 | +## 🎯 Purpose & Features |
| 30 | + |
| 31 | +The Prompt Library treats AI prompts as mini-applications that instruct AI models to become specialized agents. This approach promotes modularity, reusability, and shareability across projects and teams. In the rapidly evolving AI landscape, maintaining a library of prompts and agent definitions is increasingly valuable for both individuals and organizations. |
| 32 | + |
| 33 | +Key features include: |
| 34 | + |
| 35 | +- Prompt storage and categorization |
| 36 | +- Automatic metadata generation |
| 37 | +- Easy navigation and reuse of prompts |
| 38 | +- Collaboration and sharing capabilities |
| 39 | +- Modular prompt components (fragments) |
| 40 | +- CLI for prompt management and execution |
| 41 | +- GitHub Actions for automation |
| 42 | + |
| 43 | +> **Note**: Currently, this tool works exclusively with Claude from Anthropic. Support for additional AI models may be added in future updates. |
| 44 | +
|
| 45 | +This project serves as a starting point for creating your own AI toolkit, demonstrating one way to manage and utilize AI prompts and agent definitions in personal and professional contexts. |
| 46 | + |
| 47 | +## ⚡ Quick Start |
| 48 | + |
| 49 | +1. Fork and clone the repository |
| 50 | +2. Set up Anthropic API key (GitHub Actions and CLI) |
| 51 | +3. Install dependencies: `npm install` |
| 52 | +4. Build and install CLI: `npm run build && npm install -g .` |
| 53 | +5. Initialize CLI: `prompt-library-cli` |
| 54 | + |
| 55 | +Detailed setup instructions in [Getting Started](#-getting-started). |
21 | 56 |
|
22 | 57 | ## 🛠️ How It Works
|
23 | 58 |
|
24 |
| -1. **Add Prompts**: Create a `prompt.md` file in the `prompts` directory. |
25 |
| -2. **Commit Changes**: Push your changes to the repository. |
26 |
| -3. **Automation**: GitHub Actions generate metadata and update README files. |
27 |
| -4. **Update Repository**: Changes are automatically committed back. |
| 59 | +1. Create a `prompt.md` file in `prompts` directory |
| 60 | +2. Commit and push changes |
| 61 | +3. GitHub Actions generate metadata and update READMEs |
| 62 | +4. Use CLI to manage and execute prompts |
28 | 63 |
|
29 |
| -## 📂 Prompt Library Example |
| 64 | +> **Important**: 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. |
| 65 | +
|
| 66 | +## 🖥️ CLI Usage |
| 67 | + |
| 68 | +### Interactive Menu |
| 69 | + |
| 70 | +```sh |
| 71 | +prompt-library-cli |
| 72 | +``` |
| 73 | + |
| 74 | +For all CLI options, run: |
| 75 | + |
| 76 | +```sh |
| 77 | +prompt-library-cli --help |
| 78 | +``` |
| 79 | + |
| 80 | +### List Prompts and Categories |
| 81 | + |
| 82 | +```sh |
| 83 | +prompt-library-cli prompts --list |
| 84 | +prompt-library-cli prompts --categories |
| 85 | +``` |
| 86 | + |
| 87 | +### Sync Personal Library |
| 88 | + |
| 89 | +```sh |
| 90 | +prompt-library-cli sync |
| 91 | +``` |
| 92 | + |
| 93 | +> **Note**: Sync currently operates in read-only mode, fetching updates from the remote Git repository without pushing local changes. |
| 94 | +
|
| 95 | +### Execute Prompts |
| 96 | + |
| 97 | +The `execute` command is a powerful tool for running prompts, especially useful in CI environments: |
| 98 | + |
| 99 | +```sh |
| 100 | +prompt-library-cli execute [options] |
| 101 | +``` |
| 102 | + |
| 103 | +Key options: |
| 104 | + |
| 105 | +- `-p, --prompt <id>`: Execute a stored prompt by ID |
| 106 | +- `-i, --inspect`: Inspect the prompt variables without executing |
| 107 | +- `-fi, --file-input <variable>=<file>`: Specify a file to use as input for a variable |
| 108 | +- `-c, --ci`: Run in CI mode (non-interactive) |
| 109 | + |
| 110 | +In CI mode, the `execute` command acts as a dynamic CLI, allowing you to pass prompt variables as command-line arguments: |
30 | 111 |
|
31 |
| -> **Note:** The prompts listed here are examples to demonstrate structure and organization. Customize and maintain your own prompts as needed. |
| 112 | +```sh |
| 113 | +prompt-library-cli execute -p <prompt_id> --<variable1> <value1> --<variable2> <value2> -c |
| 114 | +``` |
32 | 115 |
|
| 116 | +For detailed usage, run: |
| 117 | + |
| 118 | +```sh |
| 119 | +prompt-library-cli execute --help |
| 120 | +``` |
| 121 | + |
| 122 | +## 📂 Prompt Library Example |
| 123 | + |
| 124 | +> **Note:** The prompts listed here are examples. Customize and maintain your own prompts as needed. |
33 | 125 | > **Tip:** Check out the Prompt Engineering category for prompts to help you create high-quality prompts and build your own library.
|
34 |
| -<details open> |
| 126 | +<details> |
35 | 127 | <summary><strong>Coding</strong></summary>
|
36 | 128 |
|
37 |
| -- [Git Branch Name Generator](prompts/git_branch_name_generator/README.md) - Generates optimized git branch names based on project context and best practices |
38 |
| -- [Git Commit Message Creator](prompts/git_commit_message_agent/README.md) - Generates optimized git commit messages following Conventional Commits specification |
39 | 129 | - [GitHub Issue Creator Agent](prompts/github_issue_creator_agent/README.md) - Creates comprehensive and actionable GitHub issues based on provided project information
|
| 130 | +- [Git Commit Message Creator](prompts/git_commit_message_agent/README.md) - Generates optimized git commit messages following Conventional Commits specification |
40 | 131 | - [Software Architect Code Reviewer](prompts/software_architect_code_reviewer/README.md) - Generates comprehensive pull requests with architectural analysis and optimization suggestions
|
| 132 | +- [Git Branch Name Generator](prompts/git_branch_name_generator/README.md) - Generates optimized git branch names based on project context and best practices |
41 | 133 | - [Software Development Expert Agent](prompts/software_development_agent/README.md) - Provides expert assistance across the software development lifecycle
|
42 | 134 |
|
43 | 135 | </details>
|
44 |
| -<details open> |
| 136 | +<details> |
45 | 137 | <summary><strong>Content Creation</strong></summary>
|
46 | 138 |
|
47 | 139 | - [Documentation Specialist Agent](prompts/documentation_specialist_agent/README.md) - Generates revolutionary software documentation using AI-powered techniques and industry expertise
|
48 | 140 |
|
49 | 141 | </details>
|
50 |
| -<details open> |
| 142 | +<details> |
51 | 143 | <summary><strong>Healthcare</strong></summary>
|
52 | 144 |
|
53 | 145 | - [Health Optimization Agent](prompts/health_optimization_agent/README.md) - Generates personalized, adaptive health optimization plans based on comprehensive user data analysis
|
54 | 146 | - [Psychological Support Therapy Agent](prompts/psychological_support_agent/README.md) - Provides personalized, AI-driven psychological support and therapy through digital platforms
|
55 | 147 |
|
56 | 148 | </details>
|
57 |
| -<details open> |
| 149 | +<details> |
58 | 150 | <summary><strong>Problem Solving</strong></summary>
|
59 | 151 |
|
60 | 152 | - [Problem Solving Assistant](prompts/problem_solving_agent/README.md) - Generates expert networks and strategies to solve complex problems and achieve goals
|
61 | 153 |
|
62 | 154 | </details>
|
63 |
| -<details open> |
| 155 | +<details> |
64 | 156 | <summary><strong>Prompt Engineering</strong></summary>
|
65 | 157 |
|
66 |
| -- [Prompt Engineering God](prompts/prompt_engineering_agent/README.md) - Creates or refines optimized prompts to maximize AI potential within ethical boundaries |
67 | 158 | - [AI Assistant Concept Architect](prompts/ai_assistant_concept_architect/README.md) - Generates innovative and feasible AI assistant concepts based on user-provided topics
|
68 |
| -- [Software Engineering Architect Agent](prompts/software_engineering_architect/README.md) - Generates comprehensive software specification documents with futuristic insights |
| 159 | +- [Prompt Engineering God](prompts/prompt_engineering_agent/README.md) - Creates or refines optimized prompts to maximize AI potential within ethical boundaries |
| 160 | +- [Software Specification Architect](prompts/software_spec_architect_agent/README.md) - Analyzes user requirements and creates comprehensive software specification documents |
69 | 161 |
|
70 | 162 | </details>
|
71 |
| -<details open> |
| 163 | +<details> |
72 | 164 | <summary><strong>Translation</strong></summary>
|
73 | 165 |
|
74 |
| -- [Omniscient Cosmic Translator](prompts/cosmic_translator_agent/README.md) - Translates between all forms of expression and existence across infinite realities |
| 166 | +- [Universal Translator Agent](prompts/universal_translator_agent/README.md) - Translates between any languages, modes of expression, or conceptual frameworks |
75 | 167 |
|
76 | 168 | </details>
|
77 | 169 |
|
78 | 170 | ## 🚀 Getting Started
|
79 | 171 |
|
80 | 172 | 1. **Fork the Repository**: Click "Fork" to create a copy in your GitHub account.
|
| 173 | + |
81 | 174 | 2. **Clone Your Fork**:
|
82 |
| - ``` |
| 175 | + |
| 176 | + ```sh |
83 | 177 | git clone https://github.com/YOUR_USERNAME/REPO_NAME.git
|
84 | 178 | ```
|
| 179 | + |
85 | 180 | 3. **Set Up Anthropic API Key**:
|
86 |
| - - Create an Anthropic account and generate an API key at the [Anthropic Console](https://console.anthropic.com/). |
87 |
| - - In repository settings: **Secrets and variables** > **Actions**. |
88 |
| - - Create a secret named `ANTHROPIC_API_KEY` with your API key. |
| 181 | + - Generate an API key at the [Anthropic Console](https://console.anthropic.com/). |
| 182 | + - For GitHub Actions: Add as `ANTHROPIC_API_KEY` secret in repository settings. |
| 183 | + - For CLI: Enter when prompted or set as environment variable. |
| 184 | + |
89 | 185 | 4. **Install Dependencies**:
|
90 |
| - - Ensure [Node.js](https://nodejs.org/en) (v22+ recommended) is installed. |
91 |
| - - Run `npm install`. |
92 |
| -5. **Add Prompts**: |
93 |
| - - Create a `prompt.md` file in the `prompts` directory. |
94 |
| - - Write your prompt content. |
95 |
| - - Commit and push: |
96 |
| - ``` |
97 |
| - git add . |
98 |
| - git commit -m "Add new prompt: [Brief Description]" |
99 |
| - git push |
100 |
| - ``` |
101 |
| -6. **Automated Processes**: GitHub Actions will generate metadata and update README files. |
102 |
| -7. **Run Locally (Optional)**: |
103 |
| - - Copy `.env.example` to `.env`: |
104 |
| - ``` |
105 |
| - cp .env.example .env |
106 |
| - ``` |
107 |
| - - Update `.env` with your API key. |
108 |
| - - Generate metadata: |
109 |
| - ``` |
110 |
| - npm run generate-metadata |
111 |
| - ``` |
112 |
| - - Update README files: |
113 |
| - ``` |
114 |
| - npm run update-views |
115 |
| - ``` |
116 |
| -8. **Customize as Needed**: |
117 |
| - - Modify templates in `src/templates` to change prompt display. |
118 |
| - - Update scripts in `src/core` to alter metadata generation or view updates. |
119 |
| -
|
120 |
| -## 🔧 Customizing Metadata Extraction |
121 |
| -
|
122 |
| -To customize metadata extraction: |
123 |
| -
|
124 |
| -1. Open and edit `src/system_prompts/prompt_analysis_agent/prompt.md`. |
125 |
| -2. Run `npm run generate-metadata` to test. |
126 |
| -3. Commit and push changes to trigger GitHub Actions. |
127 |
| -
|
128 |
| -> **Note**: Changes affect future metadata generations. Test thoroughly. |
| 186 | + - Ensure [Node.js](https://nodejs.org/en) is installed. |
129 | 187 |
|
130 |
| -## 🧩 Using Fragments |
| 188 | + ```sh |
| 189 | + npm install |
| 190 | + ``` |
| 191 | + |
| 192 | +5. **Build and Install CLI**: |
131 | 193 |
|
132 |
| -Fragments are reusable prompt components. |
| 194 | + ```sh |
| 195 | + npm run build |
| 196 | + npm install -g . |
| 197 | + ``` |
| 198 | + |
| 199 | +6. **Initialize CLI**: |
| 200 | + |
| 201 | + ```sh |
| 202 | + prompt-library-cli |
| 203 | + ``` |
| 204 | + |
| 205 | + Follow prompts to set up configuration. |
133 | 206 |
|
134 |
| -To use fragments: |
| 207 | +## 🧩 Using Fragments |
135 | 208 |
|
136 |
| -1. **Create a Fragment**: |
137 |
| - - In `fragments`, create a new `.md` file under the appropriate category (categories are listed [here](/src/system_prompts/prompt_analysis_agent/prompt.md)). |
138 |
| - - Create your fragment content. |
139 |
| - - To match a variable in a prompt, name the fragment file to correspond with that variable. |
| 209 | +Fragments are reusable prompt components: |
140 | 210 |
|
141 |
| - **Example:** `awesome_guidelines.md` → `AWESOME_GUIDELINES` |
| 211 | +1. Create `.md` files in `fragments` directory under the appropriate [categories](/src/app/system_prompts/prompt_analysis_agent/prompt.md)). |
| 212 | +2. Reference in prompts: `` (e.g., `` for `awesome_guidelines.md`). |
| 213 | +3. Manage and use via CLI. |
142 | 214 |
|
143 |
| -2. **Update Metadata and Views**: |
144 |
| - - Regenerate metadata: |
145 |
| - ``` |
146 |
| - FORCE_REGENERATE=true npm run generate-metadata |
147 |
| - ``` |
148 |
| - - Update views: |
149 |
| - ``` |
150 |
| - npm run update-views |
151 |
| - ``` |
| 215 | +## ⚙️ Metadata Customization |
152 | 216 |
|
153 |
| -Once metadata and views are regenerated, each prompt's README will list compatible fragments. |
| 217 | +1. Edit `src/system_prompts/prompt_analysis_agent/prompt.md`. |
| 218 | +2. Test with `npm run generate-metadata`. |
| 219 | +3. Commit and push to trigger GitHub Actions. |
154 | 220 |
|
155 |
| -> **Note**: Forcing metadata regeneration can be costly; consider running selectively. |
| 221 | +> **Note**: Changes affect future metadata generations. Test thoroughly before committing. |
156 | 222 |
|
157 |
| -## 📝 Contributing |
| 223 | +## 🤝 Contributing |
158 | 224 |
|
159 | 225 | Contributions to improve templates, scripts, or structure are welcome! Submit issues or pull requests.
|
160 | 226 |
|
|
0 commit comments