snr-php

snr-php is a command for Claude Code from Kin9Zeus/senior-engineer-skills. It costs 34 tokens per session (559 once invoked), scanned A, original, MIT.

A defensive security pass for PHP projects and their deployment settings. It checks the PHP runtime, server configuration, and PHP code, including protections related to a specified PHP security incident.

In plain words
What is it for?
Use it to inventory the running PHP environment, check official patch status, apply or plan mitigations, harden configuration and code, restart and verify services, and assess possible compromise.
Why use it?
It helps find unpatched or misconfigured PHP systems and gives a controlled response path when patching must wait. It also considers whether secrets accessible to PHP should be replaced after exposure.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash skills/php-hardening/scripts/php-check.sh . # PowerShell: php-check.ps1.

Part of the senior-engineer-skills plugin — 20 skills, 14 commands, 8 agents shipped together

Good fit Use it to inventory the running PHP environment, check official patch status, apply or plan mitigations, harden configuration and code, restart and verify services, and assess possible compromise.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Kin9Zeus/senior-engineer-skills
agentmods
npx agentmods add commands/kin9zeus/senior-engineer-skills/snr-php

Made for: Claude Code.

Or install senior-engineer-skills, the plugin that ships this one along with the rest of its 20 skills, 14 commands, 8 agents.

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 snr-php

README.md
[![agentmods](https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-php/github.svg)](https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-php)
Your own site
<a href="https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-php"><img src="https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-php/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 snr-php

Your own site · 80×15
<a href="https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-php"><img src="https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 559 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.00034 $0.00559
Opus 5.5 $0.00014 $0.00224
Sonnet 5.5 $0.00007 $0.00112
Haiku 4.5 $0.00003 $0.00056

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

Security

Grade A, and why

snr-php 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 2d 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.

commands/snr-php.md · 54 lines

How it starts

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

PHP Security Pass

Scope: $ARGUMENTS (default: the whole repository and its deployment config).

Load the php-hardening skill. Defensive only. Do not trust remembered versions or CVEs — the incident facts in the skill are dated 2026-10-23; re-read the official PHP advisory and your distribution's tracker before asserting anything.

1 · Run the inventory

bash skills/php-hardening/scripts/php-check.sh .      # PowerShell: php-check.ps1

Every hit is a lead. Then answer from the real environment, not the repo:

  • Which PHP actually serves requests? (FPM / Apache mod_php / container / platform build)
  • Is it at or above the fixed release for its branch, or a vendor-fixed build?
  • Were all workers restarted after patching? Is the running build verified?

2 · If anything is unpatched

Follow references/php2shell-response.md: patch → restart → verify; interim mitigations only if patching must wait (each with owner and removal date); edge restrictions; then the compromise assessment — assume exposure for the window since 17 October 2026, rotate secrets the PHP process could read, and hunt (security-incident-response). If the platform also reported a secrets incident, treat both as one.

3 · Then harden

In yield order: supported branch with a patch SLA → PHP-FPM over mod_php and a pool per app → baseline config (references/php-ini-baseline.md) → least-privilege process and container → application code (references/php-code-security.md) → Composer / WordPress / Laravel / Symfony hygiene (references/php-ecosystem.md).

4 · Output

Findings in the suite format (what is wrong → why it matters → fix → verify), P0 first:

### <Title> — P0
**Class** · **Location** · **Confidence** CONFIRMED | PLAUSIBLE · **Impact** ·
**Reproduce/Evidence** · **Fix** · **Verify**

For code findings, include a failing regression test. End with What I could not verify — typically the serving SAPI, the real running build, and distro backports.

Read the full file on GitHub · 54 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. 2d ago First seen · 54 lines · 34 tokens per session scan A 886fb8cbf320

Subscribe to this mod's changes

snr-php is a command published in the GitHub repository Kin9Zeus/senior-engineer-skills (3 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 559 once invoked, about $0.0001 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-10-24.