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.
npx agentmods add skills/trebormc/drupal-ai-agents/phpstan-phpcs-conflict-resolutionnpx skills add trebormc/drupal-ai-agents --skill phpstan-phpcs-conflict-resolutiongit clone --depth 1 https://github.com/trebormc/drupal-ai-agentsWrote 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/trebormc/drupal-ai-agents/phpstan-phpcs-conflict-resolution)<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/phpstan-phpcs-conflict-resolution"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/phpstan-phpcs-conflict-resolution.svg" alt="Measured on agentmods" 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 | $0.00204 | $0.01235 |
| Opus 5 | $0.00102 | $0.00617 |
| Sonnet 5 | $0.00041 | $0.00247 |
| Haiku 4.5 | $0.00020 | $0.00123 |
Grade A, and why
phpstan-phpcs-conflict-resolution 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 4d 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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHPStan ↔ PHPCS Conflict Resolution
When both tools flag the same line they can demand OPPOSITE changes. Fixing one then
re-triggers the other — an infinite alternation. This skill encodes the resolutions
that survive BOTH tools at zero, plus the suppression mechanics that make
@phpstan-ignore behave. All commands via ssh web.
Golden rule
Determine which tool's complaint reflects a REAL contract (read the code that calls or implements the line). Satisfy that one; suppress the OTHER as narrowly as possible with a comment stating why. Alternate-fixing without this analysis is the failure mode this skill exists to prevent.
Recipe 1 — Hook docblocks: "no @param" vs "type the array"
Coder warns "Hook implementations should not duplicate @param/@return"; PHPStan level 8
raises missingType.iterableValue on the same hooks. {@inheritdoc} does NOT satisfy
PHPStan (procedural hooks inherit nothing). Core's approach wins: remove the docs, ignore
the rule for hook files in phpstan.neon:
ignoreErrors:
-
identifier: missingType.iterableValue
paths: ['*.module', '*.install', '*.theme']
phpstan-drupal DOES analyze .module/.install/.theme (it extends fileExtensions), so run
a targeted analyse to confirm the ignore matches — do not assume they are excluded.
Recipe 2 — Native type hints vs mockability
Narrowing object $x to a concrete class (e.g. \Drupal\Core\Extension\Extension)
silences PHPStan method.notFound but throws TypeError in unit tests that inject
anonymous-class mocks. Keep the native object; suppress per call line with a targeted
// @phpstan-ignore method.notFound. Never let a static-analysis pass change a runtime
signature that tests depend on. Run the unit suite after every PHPStan batch.
Recipe 3 — By-reference docblock variance
Two methods sharing a by-ref accumulator MUST declare the identical array type, or the
wider one re-widens the variable between iterations and the stricter one errors at the
call site. Overriding ConfigFormBase::validateForm() with @param array<string, mixed> $form
conflicts with the parent's plain array by-ref contract — array<mixed> satisfies both
missingType and variance.
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.
- 4d ago First seen · 102 lines · 204 tokens per session scan A f8bdafb21304
phpstan-phpcs-conflict-resolution is a skill published in the GitHub repository trebormc/drupal-ai-agents (10 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 204 tokens to every session and 1,235 once invoked, about $0.0010 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-31.
Other skills, from other repositories
laravel-actions
Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.
laravel-specialist
Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…
laravel-best-practices
Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…
owl-admin-devtools-generator
Use this skill for Owl Admin development tools, code generator, dynamic API templates, relationships, visual pages, generated CRUD code, app/ApiTemplates, Support/Apis, Support/CodeGenerator, Controllers/DevTools, or questions about “代码生成器”, “动态 API”, “API 模板”, “关系管理”, “可视化页面”, and “生成 CRUD”.
create-module
Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package. Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module…
examples-qa
Verify Instructor behavior through the repository's ./examples/ suite in pass, live record, or hermetic replay mode. Use when running selected examples or the corpus, capturing and reusing recorded LLM HTTP responses, diagnosing hub results, or distinguishing real errors, assertion failures, skipped examples, and…