php-object-calisthenics

php-object-calisthenics is a skill for Claude Code from paulinevos/claude-stuff. It costs 47 tokens per session (739 once invoked), scanned A, original, MIT.

PHP coding guidance based on object calisthenics, a set of rules for keeping object-oriented code small and easy to understand. It also covers PHP features such as strict types, value objects, enums, and match expressions.

In plain words
What is it for?
Use it when writing or reviewing PHP code, including Laravel projects, while respecting the project's existing standards and any Laravel Boost guidance.
Why use it?
It gives new code consistent structure and limits confusing patterns such as deep nesting, long method chains, vague names, and unnecessary getters or setters. It also tells developers to follow the repository's PHP and framework versions.

Skill for Claude Code

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

Part of the php-style plugin — 1 skill shipped together

Good fit Use it when writing or reviewing PHP code, including Laravel projects, while respecting the project's existing standards and any Laravel Boost guidance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/paulinevos/claude-stuff/php-object-calisthenics
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 paulinevos/claude-stuff --skill php-object-calisthenics
Clone the repo
git clone --depth 1 https://github.com/paulinevos/claude-stuff

Made for: Claude Code.

Or install php-style, the plugin that ships this one along with the rest of its 1 skill.

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-object-calisthenics

README.md
[![agentmods](https://agentmods.dev/badge/skills/paulinevos/claude-stuff/php-object-calisthenics/github.svg)](https://agentmods.dev/skills/paulinevos/claude-stuff/php-object-calisthenics)
Your own site
<a href="https://agentmods.dev/skills/paulinevos/claude-stuff/php-object-calisthenics"><img src="https://agentmods.dev/badge/skills/paulinevos/claude-stuff/php-object-calisthenics/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-object-calisthenics

Your own site · 80×15
<a href="https://agentmods.dev/skills/paulinevos/claude-stuff/php-object-calisthenics"><img src="https://agentmods.dev/badge/skills/paulinevos/claude-stuff/php-object-calisthenics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 739 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.00047 $0.00739
Opus 5.5 $0.00019 $0.00296
Sonnet 5.5 $0.00009 $0.00148
Haiku 4.5 $0.00005 $0.00074

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

Security

Grade A, and why

php-object-calisthenics 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 2mo 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/php-style/skills/php-object-calisthenics/SKILL.md · 68 lines

How it starts

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

PHP object calisthenics

Apply these rules fully to new code when they improve clarity. In existing code, preserve local consistency: do not turn a narrow task into a style refactor. If a rule would make code less clear, deviate explicitly and explain why. Always honour the repository's PHP version, PSR/style tooling, and static-analysis level.

For Laravel with Boost, read its project guidance first and use its version-matched documentation and inspection tools. Boost wins on framework concerns; these rules still guide the domain layer.

Types and values

  • Put declare(strict_types=1); in every PHP file. Type parameters, returns, and properties; use mixed only with a stated reason. Use generic docblocks for collection contents.
  • Wrap domain-significant primitives and strings in value objects. Validate in named constructors, compare by value, and make the objects final readonly. Use backed enums for closed sets and put their behaviour on the enum.
  • Prefer first-class collection types to bare domain arrays. A collection holds only its elements and owns operations and invariants such as uniqueness, filtering, and totals.

Object shape

  • Keep one indentation level per method. Use guard clauses, extraction, and named private methods instead of nesting.
  • Do not use else; return or throw early, use match for closed choices, or model the variation with polymorphism, an enum, or a null object. ?-> and ?? are for genuinely optional data, not invalid object graphs.
  • One dot per line: ask the object in hand for the result instead of traversing its collaborators. Fluent builders and collection pipelines are exceptions.
  • Use full domain names; short local closure variables are fine. Keep methods, classes, and packages small enough to make responsibilities obvious.
  • Tell, do not ask. Prefer behaviour over getters; expose genuinely readable data as promoted public readonly properties. Never add setters: use a domain operation or an immutable with*() method.

Read the full file on GitHub · 68 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. 2mo ago Changed · -205 lines · -74 tokens per session fa2df3903963
  2. 3mo ago First seen · 273 lines · 121 tokens per session scan A 17069168ee3a

Subscribe to this mod's changes

php-object-calisthenics is a skill published in the GitHub repository paulinevos/claude-stuff (64 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 739 once invoked, about $0.0002 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-08-30.

Related

php-object-calisthenics compared with skills from other repositories

php-object-calisthenics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
php-object-calisthenicspaulinevos/claude-stuffSkill641mo agoMITA47Claude Code
laravel-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code
laravel-securityhashgraph-online/awesome-codex-pluginsSkill1.6ktodayApache-2.0A34Claude Code, Codex
create-modulemarko-php/markoSkill415todayMITA120Claude Code
integration-fixturephel-lang/phel-langSkill53714d agoMITA10Claude Code
update-application-configurationtarlepp/symfony-flex-backendSkill286todayMITA29Claude Code, Codex
Behat BDD TestingPramodDutta/qaskillsSkill25328d agoMITA37Claude Code, Codex