php-object-calisthenics

php-object-calisthenics is a skill for Claude Code from paulinevos/claude-stuff. It costs 121 tokens per session (2,735 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. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

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 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,735 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.00121 $0.02735
Opus 5 $0.00060 $0.01367
Sonnet 5 $0.00024 $0.00547
Haiku 4.5 $0.00012 $0.00274

Measured 9d ago against content hash 17069168ee3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 273 lines

How it starts

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

PHP object calisthenics

Write PHP according to object calisthenics. Apply the rules below fully to new code, where the cost is low and the payoff in clarity is high. Go lighter on existing code — they're not a licence to refactor what you weren't asked to touch, and a codebase in two conflicting styles is worse than one consistently in the lesser style.

When a rule genuinely makes code harder to read, break it and say so in one sentence. Silent deviation is the real failure mode — it's indistinguishable from not knowing the rule.

Defer to the repository throughout: its PSR level, PHPStan/Psalm level, CS-fixer rules, and the PHP version pinned in composer.json — don't reach for syntax it doesn't have.

Laravel projects: follow Boost

If the project has Laravel Boost installed, its guidelines take precedence over this skill wherever they overlap. Boost ships version-specific conventions for the exact Laravel, Livewire, Inertia, Pest and Filament versions in play, plus an MCP server for querying the app.

  • Look for Boost's guidelines in the project's AGENTS.md / CLAUDE.md and read them before writing Laravel code.
  • Use Boost's documentation search rather than recalling APIs from memory — it returns docs matched to the installed versions, which is where memory is least reliable.
  • Prefer its tooling for inspecting the running app (tinker, database queries, logs, artisan commands) over guessing at application state.

Everything below still applies to the domain layer, which is the part of a Laravel app Boost has least to say about.

Types

  • declare(strict_types=1); in every file. Coercion hides exactly the bugs that wrapping primitives is meant to eliminate.
  • Type every parameter, return, and property. mixed is an admission, not a type; if you need it, say why.
  • Generics in docblocks (@param list<OrderLine> $lines, @return array<string, Money>) — the only way to type a collection's contents precisely, and the static analyser reads them.

Read the full file on GitHub · 273 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. 9d 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 27d ago), licensed MIT. It adds 121 tokens to every session and 2,735 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

laravel-security

Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

hashgraph-online/awesome-codex-plugins · 34 tokens

integration-fixture

Create or validate a .test integration fixture under tests/php/Integration/Fixtures.

phel-lang/phel-lang · 16 tokens

create-module

Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package. Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module…

marko-php/marko · 120 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

Behat BDD Testing

PHP BDD testing with Behat framework using Gherkin feature files, Mink browser extension, context classes, and Symfony integration for behavior-driven acceptance testing.

PramodDutta/qaskills · 37 tokens