Prompt Engineering
& LLM Guides
Practical guides on writing better prompts, cutting token costs and building with LLM APIs, for ChatGPT, Claude and Gemini users.
AI Prompt for Unit Tests on Legacy Code
The exact AI prompt for unit tests I use on untested legacy PHP functions, built around real guarantees instead of a vague write-tests request.
Fix Laravel 419 CSRF Token Mismatch Error
A real fix for the Laravel 419 CSRF token mismatch error — session cookie settings, SPA/Axios setup, and when to actually use the except array.
OpenAI Function Calling in a Laravel App
How to wire OpenAI function calling into a Laravel backend so an LLM can trigger real actions, plus the validation and loop-depth safeguards you actually need.
AI Prompt to Document an Undocumented API
Turn a day of writing API docs by hand into an hour of review with the right AI prompt structure for documenting undocumented REST endpoints.
AI Code Review Prompt for Laravel PRs
A structured AI code review prompt that actually catches Laravel-specific bugs like mass assignment and N+1 queries, instead of generic AI praise.
MySQL Lock Wait Timeout Exceeded in Laravel
Still retrying jobs after a MySQL lock wait timeout exceeded error? Here's how to find the real blocking query in Laravel and fix it for good.
Fixing OpenAI API Timeouts in Laravel Jobs
OpenAI API calls timing out inside your Laravel queue? Here's why jobs fail mid-request and how to set timeouts that actually agree with each other.
AI Refactoring: Breaking Up a God Class
A real AI refactoring workflow for breaking up a legacy god class safely: the prompts that work, and the ones that quietly break production.
Debug Silent Laravel Queue Failures With AI
Laravel queue jobs can fail silently while Horizon still shows success. Learn why it happens and how AI helps trace the swallowed exception fast.
Stay ahead of the curve
Get the latest prompt engineering strategies, token optimization tricks, and platform updates delivered straight to your inbox once a month. No spam.