developing-with-php

developing-with-php is a skill for Claude Code, Codex from FortiumPartners/ensemble. It costs 37 tokens per session (3,069 once invoked), scanned A, original, MIT.

A skill for writing modern PHP 8.x code, including its type system, object-oriented patterns, errors, and Composer package management. Composer is PHP's tool for installing and loading libraries.

In plain words
What is it for?
Use it to write PHP applications, define typed classes and functions, manage Composer dependencies, access databases with PDO, and add PHPUnit tests.
Why use it?
It helps keep PHP code consistent with current language features and avoids common problems with types, dependencies, and error handling.

Skill for Claude CodeCodex

Part of the ensemble-development plugin — 11 skills, 7 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 skills/fortiumpartners/ensemble/developing-with-php
Any agent
npx skills add FortiumPartners/ensemble --skill developing-with-php
Clone the repo
git clone --depth 1 https://github.com/FortiumPartners/ensemble

Made for: Claude Code, Codex.

Or install ensemble-development, the plugin that ships this one along with the rest of its 11 skills, 7 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 developing-with-php

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortiumpartners/ensemble/developing-with-php.svg)](https://agentmods.dev/skills/fortiumpartners/ensemble/developing-with-php)
Your own site
<a href="https://agentmods.dev/skills/fortiumpartners/ensemble/developing-with-php"><img src="https://agentmods.dev/badge/skills/fortiumpartners/ensemble/developing-with-php.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,069 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.00037 $0.03069
Opus 5 $0.00018 $0.01535
Sonnet 5 $0.00007 $0.00614
Haiku 4.5 $0.00004 $0.00307

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

Security

Grade A, and why

developing-with-php 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

$user = $stmt->fetch(PDO::FETCH_ASSOC);
packages/development/skills/developing-with-php/SKILL.md · 514 lines

How it starts

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

PHP Skill - Quick Reference

Core PHP language patterns for modern development. For Laravel-specific patterns, see the Laravel skill.

Progressive Disclosure: This is the quick reference. See REFERENCE.md for comprehensive patterns, advanced examples, and deep-dives.

Table of Contents

  1. PHP 8.x Type System
  2. Constructor Property Promotion
  3. Enums
  4. Match Expression & Named Arguments
  5. Attributes
  6. Null Safety
  7. OOP Essentials
  8. Handler/Service Pattern
  9. Map/DTO Pattern
  10. PDO Database Access
  11. Composer & Autoloading
  12. Error Handling
  13. Testing with PHPUnit
  14. Array Operations Quick Reference
  15. Security Essentials
  16. Quick Reference Tables
  17. Related Resources

PHP 8.x Type System

<?php
// Union types (8.0+)
function process(string|int $value): string|false { }

// Intersection types (8.1+)
function handle(Countable&Iterator $collection): void { }

// Nullable types
function find(int $id): ?User { }

// Never return type (8.1+)
function fail(): never {
    throw new Exception('Fatal error');
}

// True, false, null as standalone types (8.2+)
function isValid(): true { return true; }

Constructor Property Promotion

<?php
// Promoted properties (8.0+) - replaces boilerplate
class User {
    public function __construct(
        private string $name,
        private string $email,
        private bool $active = true,
    ) {}
}

// Readonly class (8.2+) - all properties are readonly
readonly class ValueObject {
    public function __construct(
        public string $value,
        public DateTimeImmutable $createdAt,
    ) {}
}

Read the full file on GitHub · 514 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 · 514 lines · 37 tokens per session scan A f7a524172bfe

Subscribe to this mod's changes

developing-with-php is a skill published in the GitHub repository FortiumPartners/ensemble (11 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 3,069 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

laravel-actions

Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.

coollabsio/coolify · 62 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

coollabsio/coolify · 114 tokens

meta-dev

AGENT-11 framework development. Use when modifying agents, commands, missions, skills, or library files inside the agent-11 repository itself. Distinguishes the LIBRARY surface (project/agents/specialists/, project/commands/, library/) — which is deployed to users — from the WORKING SQUAD (.claude/agents/…

TheWayWithin/agent-11 · 107 tokens

saas-analytics

Implement product analytics for understanding user behavior, tracking key metrics, and making data-driven decisions. Covers event tracking, user identification, cohort analysis, and integration with analytics platforms like PostHog, Mixpanel, or custom solutions.

TheWayWithin/agent-11 · 4 tokens

saas-auth

Implement production-ready authentication for SaaS applications including email/password, OAuth social login, session management, and security best practices. This skill covers the complete auth lifecycle from signup through password recovery.

TheWayWithin/agent-11 · 3 tokens

saas-billing

Implement subscription lifecycle management, plan enforcement, usage tracking, and billing operations. Covers trial periods, plan changes, quota enforcement, and subscription status synchronization with payment providers.

TheWayWithin/agent-11 · 4 tokens