php

php is a skill for Claude Code from nimadorostkar/Claude-Skills-collection. It costs 96 tokens per session (858 once invoked), scanned A, original, MIT.

A PHP coding guide for PHP 8.2+ and Laravel or Symfony projects. It promotes strict types, modern language features, standard conventions, and static analysis with PHPStan.

In plain words
What is it for?
Use it to write or review PHP, add type checking to legacy code, model domain values, improve ORM-heavy performance, and follow PSR standards.
Why use it?
It helps catch defects earlier and makes loosely typed or older PHP code easier to understand and maintain.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the languages plugin — 12 skills shipped together

Good fit Use it to write or review PHP, add type checking to legacy code, model domain values, improve ORM-heavy performance, and follow PSR standards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/php
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.

Any agent
npx skills add nimadorostkar/Claude-Skills-collection --skill php
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

Made for: Claude Code.

Or install languages, the plugin that ships this one along with the rest of its 12 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/php/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/php)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/php"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/php/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for php

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/php"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 858 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00096 $0.00858
Opus 5.5 $0.00038 $0.00343
Sonnet 5.5 $0.00019 $0.00172
Haiku 4.5 $0.00010 $0.00086

Measured 1mo ago against content hash 3b91b562e3ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

php 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 1mo 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.

skills/languages/php/SKILL.md · 99 lines

How it starts

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

PHP

Purpose

Write PHP that behaves like a typed language: strict types on, enums instead of string constants, readonly value objects, and PHPStan at a level high enough to catch real defects.

When to Use

  • Writing or reviewing PHP 8.2+.
  • Working in Laravel or Symfony applications.
  • Introducing static analysis to a legacy PHP codebase.
  • Modeling domain values and states.
  • Fixing performance problems in ORM-heavy code.

Capabilities

  • Strict typing, union and intersection types, never and readonly.
  • Enums with backing values and interfaces.
  • Attributes for routing, validation, and DI metadata.
  • PSR-4 autoloading, PSR-12 style, PSR-3 logging.
  • PHPStan configuration and incremental adoption via baselines.

Inputs

  • Source tree, composer.json, framework and version.
  • Existing analysis configuration and baseline, if any.

Outputs

  • Files opening with declare(strict_types=1);.
  • Typed properties, parameters, and return types throughout.
  • A PHPStan configuration at level 8 (or a baseline plus a plan to reach it).

Workflow

  1. Turn on strictness — declare(strict_types=1) in every file; PHPStan with a baseline to freeze existing debt.
  2. Replace magic with types — String constants become enums; array shapes become value objects or DTOs.
  3. Implement — Constructor promotion, readonly properties, named arguments at call sites.
  4. Eliminate ORM traps — Eager-load relations; never query inside a loop.
  5. Gate — PHPStan, PHP-CS-Fixer, PHPUnit or Pest.

Best Practices

  • Never use array as a domain type. An untyped array is a shape that no tool can check.
  • Enums replace class constants and give you exhaustive match.
  • Readonly promoted constructor properties are the shortest path to immutable value objects.
  • In Eloquent, with() your relations. An N+1 query in a list endpoint is the single most common PHP performance defect.
  • Do not catch \Exception broadly. Catch the specific type, or let it reach the handler.
  • Keep framework types out of the domain layer — a domain service should not know what an HTTP request is.

Read the full file on GitHub · 99 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. 1mo ago Changed · +54 tokens per session 3b91b562e3ed
  2. 2mo ago First seen · 99 lines · 42 tokens per session scan A ab9ac6eb8425

Subscribe to this mod's changes

php is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (41 stars, last pushed today), licensed MIT. It adds 96 tokens to every session and 858 once invoked, about $0.0004 per session on Opus 5.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-09-03.

Related

php compared with skills from other repositories

php next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
phpnimadorostkar/Claude-Skills-collectionSkill41todayMITA96Claude Code
emlog-app-devemlog/emlog-app-dev-skillSkill45mo agononeA125Claude Code, Codex
laravel-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code
php-proJeffallan/claude-skillsSkill13ktodayMITA107Claude Code
mvc-expertroedyrustam/vibes-plugSkill1293d agoMITA30Cursor
craft-pestmichtio/craftcms-claude-skillsSkill903d agoMITA159Claude Code
craft-php-guidelinesmichtio/craftcms-claude-skillsSkill903d agoMITA144Claude Code