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.
git clone --depth 1 https://github.com/cosmix/loomnpx agentmods add skills/cosmix/loom/loom-phpWrote 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.
[](https://agentmods.dev/skills/cosmix/loom/loom-php)<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.
<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>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00015 | $0.06154 |
| Opus 5.5 | $0.00006 | $0.02462 |
| Sonnet 5.5 | $0.00003 | $0.01231 |
| Haiku 4.5 | $0.00002 | $0.00615 |
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 21d 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.
How it starts
The opening of the file, as written. The whole thing — 453 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.lockfor applications. Add and remove packages withcomposer require/composer remove; theautoload,configandscriptssections are edited by hand. config.platform.phppins 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.
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.
- 21d ago First seen · 453 lines · 15 tokens per session scan A a6b6c140d5e4
loom-php is a skill published in the GitHub repository cosmix/loom (62 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 6,154 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.
Other skills, from other repositories
idiomatic-go
Apply Go community idioms for API and package design, error and concurrency patterns, naming (initialisms, stutter, receivers), generics vs interfaces, and Go code review — including PR or diff review, questions about "the Go way", pointer vs value receivers, channels vs mutexes, and building Go language tooling…
go-documentation
Write idiomatic Go doc comments that render correctly on pkg.go.dev — package comments, doc.go, exported-symbol comments, testable Example functions, deprecation notices — and publish or debug modules on pkg.go.dev (pkgsite, the module proxy). Use when writing or reviewing Go documentation, or when a developer used to…
drupaltools-optimize
Optimize selected Drupal PHP code for the Drupal and PHP versions currently in use in the project. Use this skill whenever the user selects code and asks to optimize, modernize, refactor, or improve it for their current environment — e.g. "optimize this for my Drupal version", "update this code to use modern PHP"…
drupaltools-phpstan
Run PHPStan static analysis in a Drupal project and resolve the reported errors. Use this skill whenever the user asks to run phpstan, run static analysis, fix type errors, or says "run phpstan and fix the errors".
pw-expert
Use when working with Laravel Prompts/Symfony Console command patterns, or when determining the correct, context-safe way to access ProcessWire API variables like $page, $pages, or $user.
pw-module-development
Use when building, structuring, or refactoring native backend modules for ProcessWire using PHP 8.4 and strict typing.