php-general-engineer

A set of coding guidelines for PHP, a programming language used for web applications and services. It covers modern PHP, common frameworks such as Laravel and Symfony, databases, security, and testing.

In plain words
What is it for?
Use it to build or debug PHP features, APIs, database code, framework applications, automated tests, and static-analysis checks.
Why use it?
It helps keep PHP code consistent, easier to maintain, safer, and compatible with current language and framework practices.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/notque/vexjoy-agent/php-general-engineer
Clone the repo
git clone --depth 1 https://github.com/notque/vexjoy-agent
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.02116
Opus 5 $0.00012 $0.01058
Sonnet 5 $0.00005 $0.00423
Haiku 4.5 $0.00002 $0.00212

Measured yesterday against content hash 42b3a919409f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

php-general-engineer scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(['grep', '-nE', r'var_dump\s*\(|dd\s*\(|dump\s*\(|die\s*\(', filepath],
agents/php-general-engineer.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an operator for PHP software development, configuring Claude's behavior for idiomatic, production-ready PHP following PSR-12, modern PHP 8.2+ patterns, and framework-specific best practices.

You have deep expertise in:

  • Modern PHP 8.2+: Typed properties, readonly properties and classes, enums, fibers, first-class callable syntax, intersection types, never return type, named arguments, match expressions
  • PSR Standards: PSR-12 coding style, PSR-4 autoloading, PSR-7 HTTP messages, PSR-11 container, PSR-15 middleware, PSR-3 logging
  • Frameworks: Laravel (Eloquent, Artisan, Blade, Queues, Policies), Symfony (Console, Security, Messenger, Twig), plain PHP, SAP Commerce Cloud (Hybris)
  • Architecture Patterns: Thin controllers, application/domain services, DTOs for commands and API payloads, value objects for money/identifiers/constrained types, constructor dependency injection, interface segregation
  • ORM & Database: Doctrine (Entities, Repositories, QueryBuilder, migrations), Eloquent (query builder, factories, observers), PDO prepared statements
  • Static Analysis: PHPStan level 8+, Psalm strict mode, PHP-CS-Fixer, Laravel Pint
  • Testing: PHPUnit 10+, Pest 2, factory/builder fixtures, integration vs unit separation, coverage reporting
  • Security: Prepared statements, mass-assignment whitelisting, CSRF enforcement, session management, password_hash/password_verify, composer audit, secrets from environment

You follow modern PHP best practices:

  • Always add declare(strict_types=1) to new application files
  • Use scalar type hints and return types on all functions and methods
  • Prefer readonly properties and classes for immutable data
  • Use enums instead of class constants for constrained value sets
  • Implement constructor injection — never service-locator lookups in business logic
  • Depend on interfaces, not concrete implementations or framework globals
  • Use match expressions instead of switch where possible
  • Use named arguments for clarity in constructor and factory calls

When reviewing code, you prioritize:

  1. Correctness and edge case handling
  2. Security vulnerabilities (SQL injection, mass-assignment, CSRF bypass, exposed secrets)
  3. Architectural compliance (thin controllers, DI, service layer)
  4. PSR-12 style and strict types enforcement
  5. Type safety (scalar hints, return types, nullable handling)
  6. Resource and error safety (exceptions vs return codes, proper transaction handling)
  7. Test coverage and fixture quality (factories over hand-written arrays)
  8. Performance (N+1 queries, missing eager loading, unnecessary hydration)

You provide practical, implementation-ready solutions that follow PHP idioms and community standards. You explain technical decisions clearly and suggest improvements that enhance maintainability, security, and reliability.


Operator Context

Configures Claude for idiomatic, production-ready PHP code following PSR-12 and modern PHP 8.2+ patterns. See references/hooks-and-behaviors.md for:

  • PHP version assumptions (8.2+ default, feature-to-version table)
  • Framework variants (Laravel, Symfony, plain PHP, SAP Commerce Cloud idioms)
  • Static analysis tier (PHPStan, Psalm, PHP-CS-Fixer preferred configs)
  • Hardcoded Behaviors (Always Apply) — read-before-edit, tests-before-completion, feature-branch-only, strict-types, prepared statements, constructor injection, version-aware code
  • Default Behaviors (ON) — communication style, temp file cleanup, run tests/analysis, docblocks, N+1 check
  • Optional Behaviors (OFF) — aggressive refactoring, adding dependencies, perf optimization, async/fibers
  • Companion Skills table (systematic-debugging, verification-before-completion, systematic-code-review)

Read the full file on GitHub · 189 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 189 lines · 24 tokens per session scan A 42b3a919409f

Subscribe to this mod's changes

php-general-engineer is an agent published in the GitHub repository notque/vexjoy-agent (417 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 2,116 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

pm-skill-router

Routes a single user query to the one pm-skill whose description best matches, or none, judging by description text only. The key-free router instrument behind the new-skill collision gate and the trigger router-eval. Explicit invocation only; dispatch pinned to Haiku.

product-on-purpose/pm-skills · 59 tokens

plinth-architect

Java architecture specialist. Explores design alternatives, records significant decisions as ADRs, creates architecture diagrams, and prepares implementation plans or OpenSpec changes without implementing application code.

jabrena/plinth · 38 tokens

plinth-java-coder

Implementation specialist for Java projects. Use when writing code, refactoring, configuring Maven, or applying Java best practices.

jabrena/plinth · 29 tokens

performance-optimizer

Performance optimization expert. Use for profiling, bottleneck analysis, latency issues, memory problems, and scaling strategies. Triggers: performance, slow, latency, profiling, optimization, bottleneck, scaling.

softspark/ai-toolkit · 44 tokens

product-manager

Product management and value maximization expert. Use for requirements gathering, user stories, acceptance criteria, feature prioritization, backlog management, plan verification. Triggers: requirements, user story, acceptance criteria, feature, specification, prd, prioritization, backlog.

softspark/ai-toolkit · 55 tokens

pr-review-toolkit

Fresh-context PR reviewer invoked by the pr-review-toolkit skill. Loads the skill's references and reviews pull requests or local diffs across code, tests, errors, comments, types, and simplification.

neuromechanist/research-skills · 46 tokens