loom-php

loom-php is a skill for Claude Code, Codex from cosmix/loom. It costs 15 tokens per session (6,140 once invoked), scanned A, original, MIT.

PHP language guidance for PHP 8.x applications, including Composer, strict typing, modern language features, Laravel, Symfony, and PHPUnit or Pest tests. Composer manages PHP libraries and creates the project's autoloader.

In plain words
What is it for?
Use it to manage packages, install production dependencies, run tests, validate project configuration, regenerate the autoloader, and audit vulnerabilities.
Why use it?
It helps avoid loose comparisons, type coercion, reference-related loop bugs, state leaks in long-running workers, repeated database queries, and unsafe deserialization.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is yield 'traversal' => ['../etc/passwd'];.

Good fit Use it to manage packages, install production dependencies, run tests, validate project configuration, regenerate the autoloader, and audit vulnerabilities.

Compare 6 skills from other repositories ↓
View source ↗ cosmix/loom
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/cosmix/loom
agentmods
npx agentmods add skills/cosmix/loom/loom-php

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-php"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,140 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.00015 $0.06140
Opus 5.5 $0.00006 $0.02456
Sonnet 5.5 $0.00003 $0.01228
Haiku 4.5 $0.00002 $0.00614

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

Security

Grade A, and why

loom-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 13d 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.

skills/loom-php/SKILL.md · 450 lines

How it starts

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

PHP Language Expertise

Overview

Idiomatic, production-grade PHP 8.x: Composer, strict types, enums and readonly, the Laravel and Symfony essentials, and PHPUnit/Pest. Assumes competence; the value is in what is easy to get wrong (coercive typing, loose comparison, the by-reference foreach trap, state leaking in long-running workers, N+1 queries, unsafe unserialize) and in writing tests that loom's phpunit and pest adapters can select one at a time.

Tooling

Composer manages dependencies and generates the autoloader.

Task Command
Add a dependency composer require guzzlehttp/guzzle (updates composer.json and composer.lock)
Add a dev dependency composer require --dev phpunit/phpunit
Install from the lock composer install (CI: --no-interaction --prefer-dist)
Production install composer install --no-dev --classmap-authoritative
Update one package composer update vendor/package --with-dependencies
Regenerate the autoloader composer dump-autoload (after editing autoload)
Check the manifest composer validate --strict
Known vulnerabilities composer audit
  • Commit composer.lock for applications. Add and remove packages with composer require/composer remove; the autoload, config and scripts sections are edited by hand.
  • config.platform.php pins the PHP version used for resolution, so a newer local PHP cannot lock packages the server cannot run.
  • PSR-4: one class per file, namespace prefix mapped to a directory; a class whose path does not match its namespace fails to autoload only when first used.
{
    "require": { "php": "^8.3" },
    "autoload": { "psr-4": { "App\\": "src/" } },
    "autoload-dev": { "psr-4": { "Tests\\": "tests/" } },
    "config": { "platform": { "php": "8.3.0" }, "sort-packages": true },
    "scripts": { "test": "phpunit", "analyse": "phpstan analyse" }
}

Format: PHP-CS-Fixer (vendor/bin/php-cs-fixer fix), Laravel Pint (vendor/bin/pint, PHP-CS-Fixer with Laravel presets), or PHP_CodeSniffer (phpcs/phpcbf) with PSR-12 / PER Coding Style.

Read the full file on GitHub · 450 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. 13d ago Changed · -3 lines a3357274ae3e
  2. 2mo ago First seen · 453 lines · 15 tokens per session scan A a6b6c140d5e4

Subscribe to this mod's changes

loom-php is a skill published in the GitHub repository cosmix/loom (66 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 6,140 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-09-26.

Related

loom-php compared with skills from other repositories

loom-php next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loom-phpcosmix/loomSkill66yesterdayMITA15Claude Code, Codex
pw-experttrk/processwire-boostSkill5todayMITA47Claude Code, Codex
pw-module-developmenttrk/processwire-boostSkill5todayMITA66Claude Code, Codex
pw-testtrk/processwire-boostSkill5todayMITA60Claude Code, Codex
idiomatic-goTypeFox/agent-skillsSkill51mo agoMITA137Claude Code
go-documentationTypeFox/agent-skillsSkill51mo agoMITA98Claude Code
drupaltools-optimizedrupaltools/skillsSkill181mo agononeA100Claude Code, Codex