psr-generator

psr-generator is an agent for Claude Code from dykyi-roman/awesome-claude-code. It costs 84 tokens per session (749 once invoked), scanned A, original, MIT.

A PHP component generator that follows PSR standards, which are shared interface rules published by the PHP-FIG group. It covers components such as loggers, caches, HTTP messages, containers, events, middleware, links, and clocks.

In plain words
What is it for?
It is for generating PSR-3, PSR-6, PSR-7, PSR-11, PSR-13, PSR-14, PSR-15, PSR-16, PSR-17, PSR-18, and PSR-20 components in PHP 8.4.
Why use it?
It helps produce compatible PHP building blocks with the expected interfaces and accompanying unit tests.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

Good fit It is for generating PSR-3, PSR-6, PSR-7, PSR-11, PSR-13, PSR-14, PSR-15, PSR-16, PSR-17, PSR-18, and PSR-20 components in PHP 8.4.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/psr-generator
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.

Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Made for: Claude Code.

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

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 psr-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/psr-generator.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/psr-generator)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/psr-generator"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/psr-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 749 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.
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.00084 $0.00749
Opus 5 $0.00042 $0.00375
Sonnet 5 $0.00017 $0.00150
Haiku 4.5 $0.00008 $0.00075

Measured 8d ago against content hash 62be2e6a793a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

psr-generator 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 8d 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.

agents/psr-generator.md · 76 lines

What it actually says

PSR Component Generator

You are a PSR standards expert. Generate PHP-FIG compliant implementations.

Workflow

  1. Identify PSR Standard - Determine which PSR the user needs
  2. Load appropriate skill - Use the corresponding acc:create-psr* skill
  3. Generate code - Create implementations following templates
  4. Include tests - Always generate unit tests

PSR Quick Reference

PSR Purpose Skill
PSR-3 Logger Interface acc:create-psr3-logger
PSR-6 Caching Interface acc:create-psr6-cache
PSR-7 HTTP Message Interface acc:create-psr7-http-message
PSR-11 Container Interface acc:create-psr11-container
PSR-13 Hypermedia Links acc:create-psr13-link
PSR-14 Event Dispatcher acc:create-psr14-event-dispatcher
PSR-15 HTTP Handlers acc:create-psr15-middleware
PSR-16 Simple Cache acc:create-psr16-simple-cache
PSR-17 HTTP Factories acc:create-psr17-http-factory
PSR-18 HTTP Client acc:create-psr18-http-client
PSR-20 Clock acc:create-psr20-clock

Code Standards

  • PHP 8.4 with declare(strict_types=1)
  • Use final readonly class where appropriate
  • Constructor property promotion
  • Named arguments for clarity
  • PSR-12 coding style

Output Structure

For each generated component:

src/Infrastructure/{Component}/
├── {Interface}Interface.php
├── {Implementation}.php
└── Exception/
    └── {Component}Exception.php

tests/Unit/Infrastructure/{Component}/
└── {Implementation}Test.php

Common Combinations

HTTP Stack (PSR-7 + PSR-15 + PSR-17 + PSR-18)

Request → Middleware Pipeline → Handler → Response
Factory → Message → Client → External API

Caching (PSR-6 or PSR-16)

  • PSR-6: Complex caching with pools and deferred saves
  • PSR-16: Simple get/set/delete operations

Infrastructure Services

  • PSR-3: Logging
  • PSR-11: Dependency Injection
  • PSR-14: Event handling
  • PSR-20: Time abstraction
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. 8d ago First seen · 76 lines · 84 tokens per session scan A 62be2e6a793a

Subscribe to this mod's changes

psr-generator is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 22d ago), licensed MIT. It adds 84 tokens to every session and 749 once invoked, about $0.0004 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 agents, from other repositories

Laravel Expert Agent

Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices.

github/awesome-copilot · 27 tokens

php-developer

Write idiomatic PHP code with design patterns, SOLID principles, and modern best practices. Implements PSR standards, dependency injection, and comprehensive testing. Use PROACTIVELY for PHP architecture, refactoring, or implementing design patterns.

davepoon/buildwithclaude · 51 tokens

php-general-engineer

PHP development: features, debugging, code quality, security, modern PHP 8.x patterns.

notque/vexjoy-agent · 24 tokens

symfony-engineer

Implements Symfony application code following framework best practices, drawing on the superpowers-symfony skill library. Use for general Symfony coding — controllers, services, dependency injection, value objects/DTOs, forms, Twig components, configuration — when no more specialized agent (api-platform-builder…

dev-toolings/superpowers-symfony · 76 tokens

php-developer

Implementación de código PHP/Laravel siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en PHP/Laravel (controllers, services, migrations, models), se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.

gonzalezpazmonica/savia · 77 tokens

laravel-architect

Laravel backend implementer (backend aspect). Replaces the vanilla developer on Laravel projects. Knows Action pattern, Form Requests, Policies, Eloquent relations; designs and documents the Inertia props contract for the inertia-vue/inertia-react architect. Do NOT use for: pure database work (artisan-specialist)…

AratKruglik/claude-sdlc · 102 tokens