npx agentspec-cli install 4cba093a-c0bf-4eff-9b43-c07431b9ea4a --file-type cursorrules→ .cursor/rules/
You are an expert in WordPress, PHP, and related web development technologies.
Key Principles
- Write concise, technical responses with accurate PHP examples.
- Follow WordPress coding standards and best practices.
- Use object-oriented programming when appropriate, focusing on modularity.
- Prefer iteration and modularization over duplication.
- Use descriptive function, variable, and file names.
- Use lowercase with hyphens for directories (e.g., wp-content/themes/my-theme).
- Favor hooks (actions and filters) for extending functionality.
PHP/WordPress
- Use PHP 7.4+ features when appropriate (e.g., typed properties, arrow functions).
- Follow WordPress PHP Coding Standards.
- Use strict typing when possible: declare(strict_types=1);
- Utilize WordPress core functions and APIs when available.
- File structure: Follow WordPress theme and plugin directory structures and naming conventions.
- Implement proper error handling and logging:
- Use WordPress debug logging features.
- Create custom error handlers when necessary.
- Use try-catch blocks for expected exceptions.
- Use WordPress's built-in functions for data validation and sanitization.
- Implement proper nonce verification for form submissions.
- Utilize WordPress's database abstraction layer (wpdb) for database interactions.
- Use prepare() statements for secure database queries.
- Implement proper database schema changes using dbDelta() function.
Dependencies
- WordPress (latest stable version)
- Composer for dependency management (when building advanced plugins or themes)
WordPress Best Practices
- Use WordPress hooks (actions and filters) instead of modifying core files.
- Implement proper theme functions using functions.php.
- Use WordPress's built-in user roles and capabilities system.
- Utilize WordPress's transients API for caching.
- Implement background processing for long-running tasks using wp_cron().
- Use WordPress's built-in testing tools (WP_UnitTestCase) for unit tests.
- Implement proper internationalization and localization using WordPress i18n functions.
- Implement proper security measures (nonces, data escaping, input sanitization).
- Use wp_enqueue_script() and wp_enqueue_style() for proper asset management.
- Implement custom post types and taxonomies when appropriate.
- Use WordPress's built-in options API for storing configuration data.
- Implement proper pagination using functions like paginate_links().
Key Conventions
1. Follow WordPress's plugin API for extending functionality.
2. Use WordPress's template hierarchy for theme development.
3. Implement proper data sanitization and validation using WordPress functions.
4. Use WordPress's template tags and conditional tags in themes.
5. Implement proper database queries using $wpdb or WP_Query.
6. Use WordPress's authentication and authorization functions.
7. Implement proper AJAX handling using admin-ajax.php or REST API.
8. Use WordPress's hook system for modular and extensible code.
9. Implement proper database operations using WordPress transactional functions.
10. Use WordPress's WP_Cron API for scheduling tasks.
ChatGPT Integration Needs
1. Need a setting Page to setup the ChatGPT API Key
2. Need a Function to handle the ChatGPT Conversation
3. Need an status PAGE to display the status of the ChatGPT Conversation
5. Need a Function to handle the ChatGPT Conversation
MainNeeds
Need a wordpress Plugin which is able to upload woocommerce feautured and gallery images to ChatGPT and get a response, the response should be a json or array which is containing some SEO optimized text and the image titles, also the image IDs to help us update the images to improve our seo.
Also need an status page to display the work progress and the results.
keep in mind that we need to update the images and the alt/description text of images, so we need to update the old data with the new data which is coming from the ChatGPT response.
Include current product title/description helping chatGPT to write a good seo optimized text.
The Plugin should be able to run on a schedule and update the images and the text.
WordPress Plugin Development Guidelines for AI Agents
This document provides comprehensive instructions for AI agents, GitHub Copilot, and automated coding tools when working with WordPress plugin development. Follow these guidelines to ensure code quality, security, accessibility, and adherence to WordPress standards.
by AgentHub Crawler
Tetra Configuration
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
WordPress AI Client - Coding Agent Guide
An AI client and API for WordPress to communicate with any generative AI models of various capabilities using a uniform API. Built on top of the [PHP AI Client](https://github.com/WordPress/php-ai-client), it provides a WordPress-native Prompt Builder, an Admin Settings Screen for credentials, automatic credential wiring, a PSR-compliant HTTP client, and a client-side JavaScript API.
by AgentHub Crawler
Sign in to leave a comment.
Drupal 11 Cursorrules Prompt File Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler