php-environment-check

php-environment-check is a skill for Claude Code, Codex from symfony/ai-mate. It costs 82 tokens per session (534 once invoked), scanned A, a copy of mate-php-environment-check, MIT.

A PHP runtime diagnostic that reports the PHP version, operating system, and loaded extensions. PHP extensions are optional components that add capabilities to the runtime.

In plain words
What is it for?
Use it when a tool fails unexpectedly or a feature is missing, especially when checking extensions such as SimpleXML needed to read Symfony container data.
Why use it?
It helps distinguish a missing or incompatible PHP runtime component from a problem in the application or its configuration.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a tool fails unexpectedly or a feature is missing, especially when checking extensions such as SimpleXML needed to read Symfony container data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/symfony/ai-mate/php-environment-check
About the project

Symfony AI Mate is a command-line assistant and MCP server that gives coding agents access to development tools tailored to a Symfony project. Developers and agents use it during development to inspect tools and run project-aware commands directly.

symfony/ai-mate · 42 stars · on GitHub · symfony.com

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 symfony/ai-mate --skill php-environment-check
Clone the repo
git clone --depth 1 https://github.com/symfony/ai-mate

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-environment-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/symfony/ai-mate/php-environment-check/github.svg)](https://agentmods.dev/skills/symfony/ai-mate/php-environment-check)
Your own site
<a href="https://agentmods.dev/skills/symfony/ai-mate/php-environment-check"><img src="https://agentmods.dev/badge/skills/symfony/ai-mate/php-environment-check/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-environment-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/symfony/ai-mate/php-environment-check"><img src="https://agentmods.dev/badge/skills/symfony/ai-mate/php-environment-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 534 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 100% copy Near-identical to another mod 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.00082 $0.00534
Opus 5.5 $0.00033 $0.00214
Sonnet 5.5 $0.00016 $0.00107
Haiku 4.5 $0.00008 $0.00053

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

Security

Grade A, and why

php-environment-check 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 1mo 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.

Origin

This is a copy

100% identical to mate-php-environment-check — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/php-environment-check/SKILL.md · 26 lines

How it starts

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

PHP environment check

server-info takes no arguments and returns php_version, operating_system, operating_system_family, and extensions (the extensions loaded for this runtime). Calling it is trivial; the judgment is knowing when a failure is the runtime, not the code, and reading the result against what a feature needs.

server-info accepts --format: json to parse the result, toon (when helgesverre/toon is installed) for the smallest context footprint. The loaded-extension list is long, so pass --format=json when you only need to test for one extension.

When to reach for it

Reach for server-info when a Mate tool fails or behaves oddly while the application under inspection looks fine. That gap usually means the runtime running Mate, not the app.

  • Container inspection returns nothing or errors. symfony-services / symfony-service-detail parse the dumped container XML with SimpleXML. If simplexml is absent from extensions, that parse fails and the service map comes back empty regardless of the app. Check for simplexml before assuming the container was never compiled.
  • Mate itself refuses to run or a feature is missing. Mate requires PHP >= 8.2. Read php_version before blaming config; an old CLI PHP on the box is a common cause.
  • Path or behavior differs from expectation. operating_system_family (Windows vs Linux/Darwin) explains divergent path handling or line endings.

Reading

  • extensions is the loaded list for this SAPI, not the installed-but-disabled list. Absent means not loaded for the runtime Mate is using, which is enough on its own to explain a dependent tool failing.
  • The PHP running the Mate CLI may differ from the one serving the app (different SAPI, different version). server-info reports the CLI runtime, so a mismatch here versus what the app runs is itself a finding.

Do not use this to diagnose application behavior. It answers one question: is the environment the reason a tool did not work.

Read the full file on GitHub · 26 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. 1mo ago First seen · 26 lines · 82 tokens per session scan A 2bb5dbeee5e4

Subscribe to this mod's changes

php-environment-check is a skill published in the GitHub repository symfony/ai-mate (42 stars, last pushed 2d ago), licensed MIT. It adds 82 tokens to every session and 534 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to mate-php-environment-check, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

neuron-symfony-integration

Integrate Neuron AI agents into a Symfony 8 app, from packages, env keys, a Doctrine migration for the Neuron tables and services.yaml wiring to a shared agent bound per request with for(), a thread voter, JSON and AG-UI (CopilotKit) or useChat streaming with StreamedResponse, reload with pending approvals, Messenger…

neuron-core/neuron-ai · 221 tokens

update-symfony-recipes

Inspect and update Symfony Flex recipes with Composer, preserving project customizations, reviewing staged changes and conflicts, and validating affected configuration.

tarlepp/symfony-flex-backend · 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

mvc-expert

Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel.

roedyrustam/vibes-plug · 51 tokens

add-api-dto-mapping

Add or update API DTOs, validation constraints, AutoMapper request mappings, and request value resolution using this repository's create, update, and patch conventions.

tarlepp/symfony-flex-backend · 38 tokens

update-application-configuration

Update Symfony service wiring, environment-backed settings, and custom JSON application configuration using this repository's configuration and validation conventions.

tarlepp/symfony-flex-backend · 29 tokens