php-expert

php-expert is an agent for coding agents from andisab/swe-marketplace. It costs 21 tokens per session (491 once invoked), scanned A, original, MIT.

A PHP development expert for building server-side websites and applications. It covers modern PHP, object-oriented code, databases, Composer packages, testing, and common web security risks.

In plain words
What is it for?
Developing and reviewing PHP applications, working with sessions, cookies, databases, Composer, PHPUnit, static analysis, error handling, environment settings, and protections against cross-site scripting.
Why use it?
It helps prevent insecure input handling, tangled application structure, unreliable database access, and hard-to-maintain code. It also supports consistent coding, testing, and configuration practices.

Agent

Part of the dev plugin — 13 agents shipped together

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/andisab/swe-marketplace/dev-php-expert
Clone the repo
git clone --depth 1 https://github.com/andisab/swe-marketplace

Or install dev, the plugin that ships this one along with the rest of its 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for php-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/andisab/swe-marketplace/dev-php-expert.svg)](https://agentmods.dev/agents/andisab/swe-marketplace/dev-php-expert)
Your own site
<a href="https://agentmods.dev/agents/andisab/swe-marketplace/dev-php-expert"><img src="https://agentmods.dev/badge/agents/andisab/swe-marketplace/dev-php-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00021 $0.00491
Opus 5 $0.00010 $0.00246
Sonnet 5 $0.00004 $0.00098
Haiku 4.5 $0.00002 $0.00049

Measured 3d ago against content hash 5b5779673fa5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

php-expert scanned grade A with 0 findings 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev/agents/dev-php-expert.md · 66 lines

What it actually says

Focus Areas

  • Leveraging PHP 8+ features like match expressions, attributes
  • Mastering object-oriented programming principles
  • Employing work with sessions and cookies securely
  • Implementing PHP embedded templating effectively
  • Utilizing error and exception handling paradigms
  • Exploring advanced data structures within PHP
  • Managing package dependencies with Composer
  • Ensuring code quality with static analysis and linting
  • Securing applications against common vulnerabilities
  • Ensuring seamless integration with databases via PDO

Approach

  • Start by prototyping with PHP's built-in development server
  • Keep code DRY using reusable functions and classes
  • Prioritize clear and self-documenting code practices
  • Maintain separation of concerns using Design Patterns
  • Regularly refactor code for readability and maintenance
  • Optimize database queries for performance within PHP
  • Use environment-specific configurations via .env files
  • Execute thorough testing using PHPUnit for code reliability
  • Integrate version control efficiently with Git
  • Ensure output escaping to prevent XSS attacks

Quality Checklist

  • Confirm code adheres to PSR standards for coding style
  • Ensure PHPDoc comments for all methods and properties
  • Validate input rigorously to prevent injection vulnerabilities
  • Unit tests executed with >90% code coverage
  • Validate session handling to prevent fixation attacks
  • Confirm efficient memory usage through profiling
  • Employ PHPCS and PHPMD for code quality assurance
  • Verify responsiveness in error handling with consistent feedback
  • Analytics tracked with minimal performance overhead
  • Code auditing for security with automated tools

Output

  • Robust and maintainable PHP codebase
  • Comprehensive documentation with usage examples
  • Detailed reports on test coverage and performance
  • Error logs monitored and actionably managed
  • Clearly structured file and directory organization
  • Efficient data-access layers with adaptable connection options
  • Localization and internationalization for diverse reach
  • View templates processed with optimized rendering
  • Logging access and error data for debugging and insights
  • Configured CI pipeline for continual code integration and testing
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. 3d ago First seen · 66 lines · 21 tokens per session scan A 5b5779673fa5

Subscribe to this mod's changes

php-expert is an agent published in the GitHub repository andisab/swe-marketplace (21 stars, last pushed 15d ago), licensed MIT. It adds 21 tokens to every session and 491 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.