craft-php-guidelines SKILL.md skillA
craft-php-guidelines from michtio/craftcms-claude-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add michtio/craftcms-claude-skills/craft-php-guidelines@git:20261005.8e2d9c5Pins git:20261005.8e2d9c5 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- michtio/craftcms-claude-skills
- Path
skills/craft-php-guidelines/SKILL.md- Versions recorded
- 7
- Latest version
- git:20261005.8e2d9c5, committed Oct 5, 2026
- First version recorded
- Jul 28, 2026
- Size
- 18,635 bytes
- Repository stars
- 88
- License
- MIT
Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers (=========), class organization, naming conventions (services, queue jobs, records, events, enums), defineRules() and validation, beforePrepare() and addSelect(), MemoizableArray…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Craft CMS 5 PHP Guidelines Complete PHP coding standards and conventions for Craft CMS 5 plugin and module development. These extend Craft's official coding guidelines with project-specific conventions. **Core principles:** PHPDocs on everything — classes, methods, and properties — regardless of type hints. No `declare(strict_types=1)` in plugin source files (matching Craft core convention). ## Companion Skills — Always Load Together - **`craftcms`** — Architecture patterns, element lifecycle, controllers, events, migrations. Required for any Craft plugin or module development. - **`ddev`** — All commands run through DDEV. Required for running ECS, PHPStan, scaffolding, and tests. ## Documentation - Official coding guidelines: https://craftcms.com/docs/5.x/extend/coding-guidelines.html - Class reference: https://docs.craftcms.com/api/v5/ - Generator reference: https://craftcms.com/docs/5.x/extend/generator.html When unsure about a convention, `WebFetch` the coding guidelines page for the authoritative answer. ## Common Pitfalls - `addSelect()` is the convention in `beforePrepare()` — safely additive when multiple extensions contribute columns. …
Read the whole file at its exact version.
How to install
mdr add michtio/craftcms-claude-skills/craft-php-guidelines@sha256:d74772b94516a3e6The line at the top of this page pins the label git:20261005.8e2d9c5, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_kmuwbheh3k4fodl3)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 7 versions of this file, between Jul 28, 2026 and Oct 5, 2026, about one every 11 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261005.8e2d9c5 latest | 2026-10-05 | 8e2d9c5 | 18,635 B | A | view · diff |
| git:20261005.e2e0a79 | 2026-10-05 | e2e0a79 | 18,635 B | A | view · diff |
| git:20260914.614a89e | 2026-09-14 | 614a89e | 18,620 B | A | view · diff |
| git:20260805.f744e20 | 2026-08-05 | f744e20 | 18,070 B | A | view · diff |
| git:20260804.d3a91c1 | 2026-08-04 | d3a91c1 | 17,454 B | A | view · diff |
| git:20260729.8079f3b | 2026-07-29 | 8079f3b | 15,340 B | A | view · diff |
| git:20260728.b45663b | 2026-07-28 | b45663b | 14,327 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (18635 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
michtio/craftcms-claude-skills · 88 stars · license MIT · pushed 2026-11-04 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_kmuwbheh3k4fodl3 GET https://markdownregistry.com/api/v1/resolve?ref=michtio/craftcms-claude-skills/craft-php-guidelines GET https://markdownregistry.com/api/v1/blob/d74772b94516a3e6f65f903c9f90d37ce6f8319250ce54080b378b044cca3692
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.