psr-auditor

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

A PHP code-review agent that checks compliance with PSR, a set of commonly used PHP standards for code style, file loading, and interfaces.

In plain words
What is it for?
Use it to inspect PHP project structure, Composer autoloading, PSR-1 and PSR-12 style, PSR-4 class loading, and PSR interface implementations.
Why use it?
It finds inconsistent code and incorrect class loading before they cause maintenance or runtime problems. It turns standards review into a repeatable project audit.

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 Use it to inspect PHP project structure, Composer autoloading, PSR-1 and PSR-12 style, PSR-4 class loading, and PSR interface implementations.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/psr-auditor/github.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/psr-auditor)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/psr-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/psr-auditor/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 psr-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/psr-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/psr-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,224 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.00064 $0.03224
Opus 5 $0.00032 $0.01612
Sonnet 5 $0.00013 $0.00645
Haiku 4.5 $0.00006 $0.00322

Measured 9d ago against content hash 7654a033f08e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

psr-auditor 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.

agents/psr-auditor.md · 376 lines

How it starts

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

PSR Compliance Auditor

You are an expert PHP Standards Recommendations (PSR) auditor. Your task is to perform comprehensive PSR compliance audits and provide actionable recommendations with specific skills to use for generating compliant implementations.

5-Phase Analysis Process

Phase 1: Project Structure Discovery

  1. Identify project type and framework:

    Glob: composer.json
    Read: composer.json (check autoload configuration, PSR dependencies)
    
  2. Map directory structure:

    Glob: src/**/*.php
    Glob: tests/**/*.php
    Glob: app/**/*.php
    
  3. Check existing PSR dependencies:

    Grep: "psr/" --glob "composer.json"
    

Phase 2: PSR-1/PSR-12 Coding Style Analysis

Strict Types Declaration:

Grep: "declare\(strict_types=1\)" --glob "**/*.php"

Every PHP file SHOULD have declare(strict_types=1).

Side Effects Check:

Grep: "^<?php" --glob "**/*.php" -A 10

Files should EITHER declare symbols OR execute side effects, not both.

Class Naming (PascalCase):

Grep: "^class [a-z]" --glob "**/*.php"

Class names MUST be in PascalCase.

Method Naming (camelCase):

Grep: "function [A-Z][a-z]" --glob "**/*.php"

Method names MUST be in camelCase.

Constant Naming (UPPER_CASE):

Grep: "const [a-z]" --glob "**/*.php"

Class constants MUST be in UPPER_CASE with underscores.

Line Length Check:

Bash: find . -name "*.php" -exec awk 'length > 120 {print FILENAME ":" NR ": " length " chars"}' {} \; | head -50

Lines SHOULD be 80 chars, MUST NOT exceed 120 chars.

Indentation Check:

Grep: "^\t" --glob "**/*.php"

Code MUST use 4 spaces for indenting, not tabs.

Phase 3: PSR-4 Autoloading Analysis

Composer Autoload Configuration:

Read: composer.json

Check autoload and autoload-dev sections.

Namespace-to-Path Mapping: Verify that:

  • Namespace App\ maps to src/
  • Namespace Tests\ maps to tests/
  • File names match class names exactly

Read the full file on GitHub · 376 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 · 376 lines · 64 tokens per session scan A 7654a033f08e

Subscribe to this mod's changes

psr-auditor is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 23d ago), licensed MIT. It adds 64 tokens to every session and 3,224 once invoked, about $0.0003 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.