php-pure

php-pure is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 76 tokens per session (4,403 once invoked), scanned A, original, MIT.

A coding guide for building PHP applications without a full framework, using PHP standards for requests, responses, middleware, dependency injection, logging, and database access.

In plain words
What is it for?
Use it for standalone PHP services and APIs that need PSR-4 loading, PSR-7 requests and responses, PSR-15 middleware, containers, and prepared database queries.
Why use it?
It provides a consistent structure for assembling common web-application parts yourself while keeping routing, security, and database code organised.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex.

Good fit Use it for standalone PHP services and APIs that need PSR-4 loading, PSR-7 requests and responses, PSR-15 middleware, containers, and prepared database queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/pure
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 j4flmao/agent-skills --skill pure
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

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-pure

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/pure/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/pure)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/pure"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/pure/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-pure

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/pure"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/pure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,403 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00076 $0.04403
Opus 5.5 $0.00030 $0.01761
Sonnet 5.5 $0.00015 $0.00881
Haiku 4.5 $0.00008 $0.00440

Measured 12d ago against content hash 5ef5670631e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

php-pure 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 12d 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.

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);
skills/backend/php/pure/SKILL.md · 599 lines

How it starts

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

PHP (Pure/Standard)

Purpose

Build PHP applications without a framework — PSR standards-based architecture, routing, middleware, database access, type-safe with PHP 8.x features, and security-first patterns.

Agent Protocol

Trigger

User request includes: pure PHP, PHP without framework, PHP PSR, PHP routing, PHP middleware, PHP DI, PHP database, PHP 8 attributes, PHP enum.

Input Context

  • PHP version (8.1+)
  • PSR implementations (PSR-7, PSR-15, PSR-11, PSR-3)
  • Database (PDO, Doctrine DBAL, MySQLi)
  • Container (PHP-DI, custom)

Output Artifact

Project structure, router class, middleware chain, controller, database repository.

Response Format

Produce artifact directly. No preamble, no postamble, no explanations.

Completion Criteria

  • PSR-4 autoloading configured
  • PSR-7 request/response handling
  • PSR-15 middleware pipeline
  • PSR-11 container for DI
  • Route matching with attributes or configuration
  • PDO with prepared statements

Max Response Length

4096 tokens

Architecture Decision Trees

Micro-framework vs Full Framework vs Pure PHP

Criterion Pure PHP (PSR stack) Micro-framework (Slim) Full Framework (Laravel)
Control Complete High Framework conventions
Setup time High Low Very low
Performance Best Good Moderate
Learning curve Steep Low Moderate
Flexibility Max High Constrained by conventions

Decision: Full control + performance → Pure PHP. Quick REST API → Slim/Fat-Free. Full features → Laravel/Symfony.

PHP 8 Features for Clean Architecture

Feature Use Benefit
Attributes Route definitions, validation, middleware Declarative metadata without annotations
Enums Status, roles, types Type-safe constants
Readonly properties DTOs, value objects Immutability by default
Named arguments Constructor DI Self-documenting dependencies
Match expression Error mapping, event routing Exhaustive pattern matching
Union types Multi-type returns Type-safe polymorphic returns
Constructor promotion DTOs, services Reduces boilerplate

Read the full file on GitHub · 599 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago Changed · +1 lines · -20 tokens per session 5ef5670631e2
  2. 26d ago Changed · +6 lines 6e0ea6d7dc45
  3. 3mo ago First seen · 592 lines · 96 tokens per session scan A 93d63f7fc992

Subscribe to this mod's changes

php-pure is a skill published in the GitHub repository j4flmao/agent-skills (46 stars, last pushed 13d ago), licensed MIT. It adds 76 tokens to every session and 4,403 once invoked, about $0.0003 per session on Opus 5.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-08-30.

Related

php-pure compared with skills from other repositories

php-pure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
php-purej4flmao/agent-skillsSkill4613d agoMITA76Claude Code, Codex
Laravel Eloquent N+1 and Query Efficiency Reviews977043/river-reviewSkill8todayMITA48Claude Code
event-store-designwshobson/agentsSkill43k6d agoMITA33Claude Code
platform-custom-field-generateforcedotcom/sf-skillsSkill1.2k3d agoApache-2.0A139Claude Code
field-service-sobject-create-configureforcedotcom/sf-skillsSkill1.2k3d agoApache-2.0A74Claude Code
nornicdb-grpcorneryd/NornicDBSkill938todayMITA98Claude Code, Codex
firebaseericrisco/rsc-harnessSkill6825d agoMITA77Claude Code, Codex