Write a WordPress plugin that [feature, e.g. adds a custom post type with a shortcode]. Follow WordPress coding standards, sanitise inputs, escape outputs, use nonces for forms, and include activation/deactivation hooks.
Results for “php”
6 prompts
Act as a senior Laravel developer. Laravel version: [version] Resource: [name and fields with types/rules] Relationships: [details] UI: [Blade / Inertia / API only] Generate: migration, model with fillable and casts, form request validation, resource controller, routes, policy for authorisation, views or API resources…
Laravel CRUD feature
Generate a complete Laravel CRUD feature: migration, model, controller, routes, validation and views.
Act as a QA-minded backend engineer. Framework and test tool: [e.g. Jest + Supertest, pytest + httpx, PHPUnit] Endpoints: [list with expected behaviour] Auth: [method] Database setup: [test DB, fixtures] Write integration tests covering success cases, validation errors, auth failures and not-found cases, with setup/te…
Integration tests for an API
Test your API endpoints end to end, including the database, auth and error responses.
Add documentation to the code below. Language: [language] Docstring style: [Google / NumPy / JSDoc / PHPDoc] Rules: - Add a docstring to every public function/class: purpose, parameters, return value, exceptions, example - Add inline comments only where logic isn't obvious, explaining WHY - Don't change any behaviour…
Add clear comments and docstrings
Document existing code with helpful docstrings and comments that explain the why, not just the what.
Act as a regular expression expert. Regex flavour: [JavaScript / Python / PHP (PCRE) / Java / .NET] What I need to match: [describe, e.g. UK postcodes, dates in DD/MM/YYYY, URLs without query strings] Should match: [examples] Should NOT match: [examples] Please give: 1. The regex 2. A token-by-token explanation in pla…
Regex generator with plain-English explanation
Describe the pattern you need and get a tested regular expression, a token-by-token explanation, and examples that match and don't.
Write unit tests for the function below. Language: [language] Testing framework: [e.g. Jest, pytest, PHPUnit, JUnit] Cover: - Typical inputs (happy path) - Edge cases: empty, zero, null/None, very large values, unusual characters - Invalid inputs and expected errors - Any branches or conditions in the code Rules: - On…
Write unit tests for any function
Generate thorough unit tests that cover normal cases, edge cases and errors, using your testing framework of choice.