A WordPress plugin to create, organize, and reuse AI prompts with advanced management features.
AI Prompts Library helps you manage and organize your AI prompts in WordPress. Create a searchable library of prompts for ChatGPT, Claude, and other AI tools.
- Custom Post Type - Dedicated post type for managing AI prompts
- Compatibility Taxonomy - Tag prompts with compatible AI tools (Claude, ChatGPT, Cursor, etc.)
- Custom Gutenberg Block - Block for displaying and editing prompt content with dual-mode behavior
- Copy to Clipboard - Easy one-click copying of prompts from the block toolbar
- Import/Export - Backup and share prompts via JSON format
- REST API - Programmatic access to your prompts
- Advanced Search - Search across prompt titles and content
- Character/Word Count - Automatic tracking of prompt statistics
- Block Bindings API - Seamless integration with WordPress 6.7+ Block Bindings
- WordPress 6.7 or higher (required for Block Bindings API)
- PHP 7.4 or higher
- Node.js 20 (for development)
- Download the latest release from the releases page
- Upload the plugin files to
/wp-content/plugins/ai-prompts-library/
- Activate the plugin through the 'Plugins' screen in WordPress
- Use the AI Prompts menu item to create and manage your prompts
git clone git@github.com:bordoni/ai-prompts-library.git
cd ai-prompts-library
npm install
npm run build
- Go to AI Prompts > Add New in your WordPress admin
- Enter a title for your prompt
- Add a description or usage notes in the first paragraph
- Enter your prompt content in the Prompt Content block
- Assign compatibility tags (Claude, ChatGPT, etc.)
- Publish your prompt
Auto Mode (Context-Aware)
- Add the Prompt Content block to any post/page
- When used in a Query Loop with AI Prompts, it automatically displays the current prompt
Manual Mode
- Add the Prompt Content block anywhere
- In block settings, select "Manual selection"
- Choose the specific prompt you want to display
Navigate to AI Prompts > Import/Export
Export:
- Click "Export Prompts" to download all prompts as JSON
Import:
- Upload a JSON file containing prompts
- Click "Import Prompts" to add them to your library
The plugin provides REST API endpoints for programmatic access:
GET /wp-json/ai-prompts-library/v1/prompts
GET /wp-json/ai-prompts-library/v1/prompts/{id}
POST /wp-json/ai-prompts-library/v1/prompts/{id}/duplicate
GET /wp-json/ai-prompts-library/v1/compatibilities
GET /wp-json/ai-prompts-library/v1/stats
curl https://yoursite.com/wp-json/ai-prompts-library/v1/prompts
curl -X POST https://yoursite.com/wp-json/ai-prompts-library/v1/prompts/123/duplicate \
-H "Content-Type: application/json" \
-u username:password
# Development build with watch mode
npm run start
# Production build
npm run build
# Lint JavaScript
npm run lint:js
# Lint CSS
npm run lint:css
# Format code
npm run format
This plugin uses stellarwp/pup for build automation:
# Build release version
pup build
# Create a new release
pup release
The plugin registers a custom Block Bindings source (ai-prompts-library/prompt-meta
) that allows you to bind blocks to prompt metadata fields:
_ai_prompt_content
- The main prompt content_ai_prompt_character_count
- Character count_ai_prompt_word_count
- Word count_ai_prompt_model
- Target AI model
// Filter export data before creating JSON
add_filter( 'ai_prompts_library_export_data', function( $prompts ) {
// Modify $prompts array
return $prompts;
} );
// Filter import data before processing
add_filter( 'ai_prompts_library_import_data', function( $data ) {
// Modify $data array
return $data;
} );
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This plugin is licensed under the GPL v2 or later.
AI Prompts Library
Copyright (C) 2025 Gustavo Bordoni
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
For bugs and feature requests, please use the GitHub issues page.
Made with ❤️ for the AI and WordPress communities.