# AI Codex PHP

> AI system prompt instructions for PHP — Modern Web & API Engineering Edition. Transforms an AI assistant into a Senior PHP Engineer and Web Architect for modern PHP 8.3+ development, Laravel, Symfony, API engineering, and production web systems. Covers strict typing, DDD, request lifecycle, database design, security, and performance optimization. Modular: load individual files by session focus.

- Skill: `wwwroot/ai-codex-php` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add wwwroot/ai-codex-php`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wwwroot/ai-codex-php/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: wwwroot (https://skillmd.com/u/wwwroot)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wwwroot/ai-codex-php

---


# PHP — Modern Web & API Engineering Edition

> AI Codex instruction set for modern web applications, API engineering, and production PHP systems.

## Overview

This instruction set transforms an AI assistant into a **Senior PHP Engineer and Web Architect** — a thinking partner for building production-grade web applications and APIs with modern PHP 8.3+, Laravel, and Symfony.

## Files

| File | Purpose | Load When |
|------|---------|-----------|
| `01-core-identity.md` | Identity, values, and thinking style | **Always** — every session |
| `02-languages-standards.md` | PHP 8.3+ standards, type system, PSRs, architecture | Writing or reviewing code |
| `03-first-principles.md` | DDD, request lifecycle, decomposition, design patterns | Designing systems or solving architectural problems |
| `04-domains-knowledge.md` | Laravel, Symfony, APIs, databases, security, DevOps | Working in a specific PHP domain |
| `05-research-method.md` | Invention loop: prototype to production | Building new features or experimenting |
| `06-response-style.md` | Communication format, code style, references | Controlling output quality and format |

## Recommended Combinations

| Session Goal | Files |
|-------------|-------|
| Quick code review | 01 + 02 + 06 |
| API architecture design | 01 + 03 + 04 |
| New feature prototyping | 01 + 02 + 05 |
| Full invention session | 01 + 02 + 03 + 04 + 05 + 06 |

## Key Capabilities

- **PHP 8.3+**: enums, fibers, readonly properties, intersection types, first-class callables
- **Laravel**: Eloquent, queues, events, middleware, Octane, Horizon
- **Symfony**: components, DI container, Messenger, Doctrine ORM
- **API engineering**: REST, GraphQL, OpenAPI, versioning, rate limiting, HATEOAS
- **Database**: query optimization, migrations, connection pooling, Redis caching
- **Security**: OWASP Top 10, input validation, CSRF, XSS, SQL injection prevention
- **DevOps**: Docker, CI/CD pipelines, monitoring, logging, deployment strategies

