michtio / craftcms-claude-skills
Craft CMS 5 expertise as Claude Code skills + a thin PHP API. Consumed by Claude Code (skills plugin) and craftpulse/craft-cortex (MCP prompts/resources).
Package info
github.com/michtio/craftcms-claude-skills
Language:Python
pkg:composer/michtio/craftcms-claude-skills
Requires
- php: ^8.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main / 1.x-dev
- v1.35.1
- v1.35.0
- v1.34.0
- v1.33.0
- v1.32.1
- v1.32.0
- v1.31.0
- v1.30.0
- v1.29.0
- v1.28.2
- v1.28.1
- v1.28.0
- v1.27.0
- v1.26.0
- v1.25.0
- v1.24.0
- v1.23.0
- v1.22.1
- v1.22.0
- v1.21.0
- v1.20.1
- v1.20.0
- v1.19.0
- v1.18.1
- v1.18.0
- v1.17.0
- v1.16.1
- v1.16.0
- v1.15.0
- v1.14.0
- v1.13.1
- v1.13.0
- v1.12.4
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- 1.4.x-dev
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- dev-docs/changelog-1.24-1.34
- dev-fix/release-test-version
- dev-fix/craft-6-notice
- dev-fix/craft-5-12-5
- dev-chore/maintenance-2026-10
- dev-fix/16-spec-compliant-descriptions
- dev-docs/slim-skill-descriptions
- dev-docs/programmatic-schema-authoring
- dev-docs/cp-ui-guide-reconcile
- dev-docs/cloud-reserved-env-vars
This package is auto-updated.
Last update: 2026-12-03 18:21:52 UTC
README
Production-ready Claude Code skills, agents, and project templates for Craft CMS 5 development.
Built and maintained by michtio. Covers both plugin/module development (extending Craft) and site development (content modeling, Twig templates, front-end architecture).
Support
If this project saves you time, consider supporting its development:
Quick Start
1. Install
# Claude Code Plugin (recommended) # First time: add the marketplace, then install /plugin marketplace add michtio/craftcms-claude-skills /plugin install craftcms-claude-skills@craftcms-claude-skills # Or via Vercel Skills CLI npx skills add michtio/craftcms-claude-skills --all
To work on the pack itself, see Working on the pack.
2. Set Up Your Project
Open Claude Code in your Craft project and say:
Set up Claude for this Craft project
The craft-project-setup skill detects your project type (plugin, site, module, hybrid, or monorepo) and generates a tailored CLAUDE.md and .claude/rules/ directory.
It also offers to hide skills, plugins and MCP servers installed for other work (marketing, other frameworks) in this project only, so they stop costing tokens at every step. It lists each with its cost and writes .claude/settings.local.json only after your yes.
3. Start Building
The skills trigger automatically based on what you're doing. Just describe what you need:
Build a blog with topics, authors, and a flexible body builder using CKEditor
Claude loads the right skills, follows Craft conventions, and uses the correct field handles, DDEV commands, and project config workflow.
Staying up to date
How you update depends on how you installed:
- Plugin -- third-party marketplaces do not auto-update by default. Turn auto-update on under
/plugin> Marketplaces > craftcms-claude-skills (craft-project-setupoffers to do it for you), or update by hand withclaude plugin update craftcms-claude-skills@craftcms-claude-skills. When a newer release exists, a notice at session start names both versions and that command, followed by the release's highlights, a link to its release notes and a sponsorship line; Claude sees only the version line. The highlights need a workingpython3; without it the notice shows without them.NO_COLORturns the colors off. The check makes at most one request a day to the GitHub releases API, sends no project or user data, gives up after 3 seconds and stays silent on any failure. It does not run whenCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,DISABLE_UPDATESorDISABLE_AUTOUPDATERis set. After an update, the first session start shows once what changed, read from the installed changelog without a request (so those variables do not hide it), and adds nothing to Claude's context. An install from before 1.35.0 counts as updated, so the first session on 1.35.0 shows it too. npx skills--npx skills checklists available updates andnpx skills updateinstalls them. Skills that are new in a release neednpx skills add michtio/craftcms-claude-skills --allagain. This route installs skills only: no hooks, so no update notice and no Craft version line at session start.
A manual clone is for working on the pack, not for using it: update it with git pull. It gets no update notice, since that comes from a plugin hook. See Working on the pack.
Working on the pack
Clone the repository anywhere and link your working copy:
git clone https://github.com/michtio/craftcms-claude-skills.git cd craftcms-claude-skills && bash install.sh
install.sh symlinks the skills and agents into $CLAUDE_CONFIG_DIR (default ~/.claude), so edits in the clone apply at once. Uninstall the plugin first, or the same skills load twice. Update the clone with git pull and rerun install.sh; there is no update notice, since it comes from a plugin hook. install.sh prints the session-start hook that shows the project's Craft version, to merge into your settings.json yourself. Rerunning install.sh or uninstall.sh also removes links to skills and agents the pack no longer has.
Example Prompts
Just describe what you need — skills trigger automatically and produce high-quality results. A few to show the range, grouped by domain:
Content modeling & architecture
Plan the content architecture for a multi-language corporate site with
news, team members, office locations, and a service catalog. We need
English, German, and French with subfolder-per-language routing.
Plugins & modules
Build a custom element type for "Job Listings" with postDate/expiryDate
status, a categories relation for departments, and a CP edit page with
field layout designer.
Control panel & author experience
I need a modal dialog for my Craft plugin that opens when clicking
"Add Item", shows a form with name and handle fields, POSTs to my
plugin's save action, and closes on success. Make it keyboard accessible.
Front-end & Twig
Create an atomic button component that supports links, form submits,
and disabled states. It needs size variants and a loading spinner option.
Build a member area with registration, login, password reset, and
profile editing. Users should be in the "Members" group and only see
content in the gated section.
Hosting & deployment
Set this project up to deploy on Servd: Servd asset storage, static
caching with Blitz in reverse-proxy mode, and the dedicated queue
runner. Document the constraints in CLAUDE.md.
This project deploys to fortrabbit. Add a deploy file that keeps our
asset volumes, move the queue into a worker job, and pull the
production database into DDEV.
Configure Redis for cache, sessions, and mutex in our Craft project.
We're running DDEV locally and deploying to a VPS with Redis installed.
See docs/prompt-guide.md for 40+ prompts organized by task type — content modeling, plugin development, field types, security, Twig, CP/JS, configuration & deployment, testing, and headless.
What's Inside
Skills
| Skill | Track | Key Coverage |
|---|---|---|
craftcms |
Plugin | Elements, queries, services, controllers, migrations, events, GraphQL, configuration, caching, permissions, CP templates (form macros, settings, navigation), CP components (widgets, utilities, slideouts), CP UI patterns (tri-state, condition builders, asset bundles), console commands (80+ commands), debugging, identity protocols for SSO/SCIM plugins. 31 reference files. |
craft-php-guidelines |
Plugin | PHPDocs, section headers, naming, class organization, ECS/PHPStan. 6 reference files. |
craft-content-modeling |
Site | Sections, entry types, fields, Matrix, relations, eager loading, entrification. Reuse-first field workflow. 7 reference files. |
craft-site |
Site | Atomic design, component patterns, routing, Vite, auth flows, search, feeds, headless, template caching. 20 reference files. |
craft-plugins |
Plugin References | Name-routed index of third-party plugin guidance (config, Twig/PHP API, migrations, deployment, pitfalls), discoverable from any task altitude. 24 plugin references. |
craft-twig-guidelines |
Site | Variable naming, null handling, whitespace, include isolation, Craft helpers, collect(). |
craft-garnish |
Plugin | Garnish CP JavaScript: class system, UI widgets, drag system, ARIA/focus, Craft.* pattern. 5 reference files. |
craft-pest |
Plugin | Testing with Pest and markhuot/craft-pest-core: database isolation (rollback is opt-in, env overrides are cwd-bound), factories, HTTP/queue/DB assertions, Craft internals that bite in tests, shared-install hygiene, CI test jobs. 5 reference files. |
craft-plugin-release |
Plugin | Release mechanics: composer.json version key, Packagist verification via repo.packagist.org/p2, tag recreation risk model, GitHub release objects vs tags, gh release pitfalls, branch promotion hygiene, shared-library release ordering, Composer path repositories, git filter-repo purges. 2 reference files. |
ddev |
Shared | Commands, services, configuration, Xdebug, site sharing, troubleshooting. |
craft-project-setup |
Shared | Project scaffolding, upgrade, and audit. Generates CLAUDE.md, .claude/rules/, .claude/settings.local.json (permissions). Gap analysis for existing configs. |
craft-cloud |
Shared | Craft Cloud serverless hosting: craft-cloud.yaml, Build → Migrate → Release pipeline, the craftcms/cloud extension, edge image transforms, static caching + ESI, MySQL 8 / Postgres 15 constraints, Console command runner, plugin Cloud-compatibility, headless apps + request signing, self-hosted → Cloud migration. 13 reference files. |
craft-fortrabbit |
Shared | fortrabbit managed PHP hosting: git push via the GitHub App, the Craft software template (build + post-deploy commands, merge strategy, /config/project replace pattern), the .fortrabbit/deploy.yml deploy file, CRAFT_* ENV vars mapped from FORTRABBIT_DB_*, persistent storage + rsync, MySQL over SSH, queue and transforms in a worker job, crons, platform limits. 5 reference files. |
craft-mcp |
Shared | Craft 5.12+ MCP servers (authenticated, public, stdio mcp/serve), the OAuth server and its signing keys, personal access tokens, connecting Claude Code over HTTP or stdio (DDEV, production, Cloud, Servd, fortrabbit), the snake_case tool catalogue, plugin MCP tools and field interfaces, security. 7 reference files. |
craft-gated-build |
Plugin | Gated build with outside builders: when .ai/skills-profile.json names builders (a local AI, a script), runs one approved slice through them in order with the gate writer first, a brief file and a checked hand-back, both lock checks, the checker gate and the 3-round cap, and falls back to craft-feature-builder. Without a profile, nothing changes. |
servd |
Shared | Servd managed hosting: git push-to-deploy + servd.yaml, local → staging → production sync, the servd/craft-asset-storage plugin (svdcdn CDN, off-server transforms), Servd static caching + Blitz reverse-proxy mode, MariaDB/MySQL over SSH, backups, Dedicated Queue Runner, ephemeral filesystem. 6 reference files. |
16 skills, 150 reference files. Skills load automatically and declare companion skills so related knowledge loads together. See docs/skills-overview.md for the full breakdown.
Agents
| Agent | Model | Purpose |
|---|---|---|
craft-planner |
Opus | Decompose features into vertical slices with verification gates. Can research/audit public plugins via gh and git clone. |
craft-feature-builder |
Opus | Build plugin code feature by feature with automated + manual test gates, gate tests written and locked first by craft-gate-writer (or its own tests red before green), one independent checker before hand-back |
craft-site-builder |
Opus | Site templates and components feature by feature with build-verify gates, one independent checker before hand-back |
craft-debugger |
Sonnet | Systematic bug investigation |
craft-code-reviewer |
Sonnet | Full-stack review against a structured checklist: PHP, Twig, JS, CSS, config |
craft-code-reviewer-deep |
Opus | Deep review for high-stakes PRs (release branches, security, migrations, multi-service flows) as a small team: read-only checkers chosen by the diff, PHPStan/ECS as evidence, one challenge round per serious finding, one merged report. Small diffs get a single pass. |
craft-gate-writer |
Sonnet | Writes a slice's gate tests from its acceptance criteria before the build, runs them red, commits them as the gate commit the builder may not change. Started by craft-feature-builder, not for direct use. |
craft-review-checker |
Sonnet | One lens of a deep review (conventions, security, performance, migrations, CP JavaScript, release and hosting). Started by craft-code-reviewer-deep and the builders, not for direct use. |
Agents build feature by feature (vertical slices), not layer by layer. Tests are written alongside each layer, not batched at the end. Manual testing gates (required + optional) are identified per feature. The builder's prevention rules map directly to the reviewer's checklist across PHP, Twig, JS, and CSS; craft-code-reviewer-deep goes further for high-stakes changes with a team of checkers. See docs/agents.md for details.
Plugin Reference Library
24 Craft plugins with detailed configuration, Twig/PHP API, and common pitfalls — indexed and name-routed by the craft-plugins skill, so they surface from front-end, PHP, migration, and deployment tasks alike:
View all 24 plugin references
| Plugin | Author | Key Surface |
|---|---|---|
| SEOmatic | nystudio107 | Meta cascade, JSON-LD, sitemaps, GraphQL |
| Blitz | putyourlightson | Static caching, Cloudflare, dynamic content, purgers |
| Formie | verbb | Form rendering, Tailwind theming, submissions, hooks |
| ImageOptimize | nystudio107 | Responsive images, transforms, loading strategies |
| CKEditor | craftcms | Rich text, nested entries, HTML Purifier |
| Sprig | putyourlightson | Reactive Twig components (htmx) |
| Element API | craftcms | JSON API endpoints |
| Retour | nystudio107 | Redirects, 404 tracking |
| Navigation | verbb | Menu node querying, active states |
| Hyper | verbb | Link fields, button integration |
| Colour Swatches | craftpulse | Color palettes, Tailwind class mapping |
| Password Policy | craftpulse | Validation rules, HIBP check |
| Typogrify | nystudio107 | Typography filters, widow prevention |
| Cache Igniter | putyourlightson | CDN cache warming |
| Knock Knock | verbb | Staging password protection |
| Elements Panel | putyourlightson | Debug toolbar, N+1 detection |
| Sherlock | putyourlightson | Security scanning |
| Embedded Assets | spicyweb | oEmbed as assets |
| Amazon SES | putyourlightson | SES mail transport |
| Timeloop | craftpulse | Recurring dates |
| Feed Me | craftcms | Data import from XML/JSON/CSV, CLI automation |
| Imager-X | spacecatninja | Advanced image transforms, named presets, effects |
| Vite | nystudio107 | Asset loading (craft.vite.*), critical CSS, dev server, manifest |
| Warp | craftpulse | Passwordless auth: magic links, one-time codes, passkeys, sessions |
Documentation
| Guide | What it covers |
|---|---|
| Getting Started | Installation, project setup, how skills auto-trigger, first steps |
| Skills Overview | All 16 skills with triggers, companion skills, reference counts, boundaries |
| Prompt Guide | 40+ real-world prompts organized by task type |
| Agents | 8 agents with tools, gate patterns, composition examples |
| Skills Profile | .ai/skills-profile.json: setup answers, gate flow, outside builders |
| Outside Builders | Protocol for a local AI or script building a slice: call form, exit codes, isolation |
| Brief Format | The brief a builder reads and the hand-back it writes |
| Contributing | Adding plugin references, improving skills, reporting issues |
| Code of Conduct | Contributor Covenant 2.1 — expected behavior and enforcement |
| Security Policy | Supported versions, private vulnerability reporting, what's in and out of scope |
Extension Points
One optional file, .ai/skills-profile.json, lets a team tool plug into the pack. Without it, nothing changes.
- Project setup reads it to answer the setup questions in advance (gate tests, hosting, passwordless login, dev root) and to add the team's extra steps. Each step runs only after an explicit yes. A rerun applies only what changed.
- Outside builders (a local AI, a script) can build an approved slice through
craft-gated-build. They work in a throwaway clone, under the same gates ascraft-feature-builder: locked gate tests first, a checked hand-back, the review checker, the lock check and a 3-round cap. Their commits reach the project only after a protected-path check and the review checker pass. Builder commands come from the repository, so none runs without your yes.
Format: docs/profile.md. Builder protocol: docs/outside-builders.md.
Requirements
- Claude Code installed and configured
- DDEV for local Craft CMS development
- Craft CMS 5.0–5.12.x (see Craft Versions)
- Bash (macOS/Linux) for the install script
Versioning
This package follows its own semantic versioning, driven by the pack's own content — it is not pinned to Craft's minor releases:
- Patch (e.g. 1.6.0 → 1.6.1) — accuracy fixes, corrections, small content updates
- Minor (e.g. 1.5.x → 1.6.0) — new skills, new plugin references, significant content additions
- Major (1.x → 2.x) — Craft's next major (5.x → 6.x, where APIs break) or a major reorganization of the pack
New content like a hosting skill or plugin reference is a feature of the pack, independent of which Craft minor is current.
Development happens on main. The 1.4.x branch is a frozen snapshot targeting Craft 5.9 — it received a final quality release and no longer takes new work; all new development lands on main. The release-validation workflow enforces that manifest versions match the release tag.
Craft Versions
The pack supports Craft CMS 5.0–5.12.x. Its version tags are checked against Craft's CHANGELOG through 5.12.5, and references cite the craftcms/cms release they were verified against.
Anything that needs a specific Craft release carries a tag: [5.10+] for a feature added in 5.10, [changed 5.12] for a behaviour change, [seomatic 5.1+] for a plugin's own version. For features from the last three minors, the pack also gives the older alternative. The version table lists every tag in one place.
The skills detect your project's Craft version. In a Craft project, each skill reports the version when it loads, and a plugin install also reports it when the session starts and after compaction. Answers then fit your version, or say which version a feature needs and how to upgrade. Specifically:
- Site: the
craftcms/cmsversion incomposer.lock, plus the version installed invendor/. If they differ, it suggestsddev composer install. - Plugin: the lowest version your
craftcms/cmsconstraint allows, so code for a newer API comes with a constraint bump or a runtime guard. - Below the minimum safe version (currently 5.12.5, the latest release with security fixes): a warning, plus a pointer to
ddev composer audit. Craft doesn't backport security fixes to older minors. - Craft 4: a one-line end-of-life notice.
How it works: a read-only POSIX shell script (scripts/craft-version.sh, copied into each skill). It reads composer.json, composer.lock and vendor/craftcms/cms/src/config/app.php in the current folder, its cms/ subfolder or up to three parent folders. It never writes files, never touches the network, and prints nothing outside Craft projects.
It runs in two places:
- From a
!line in each SKILL.md, which each skill pre-approves in itsallowed-tools. - For plugin installs, from a
SessionStarthook inhooks/hooks.json.
To turn it off:
- Set
"disableSkillShellExecution": truein your Claude Code settings for the skill lines. Each skill then tells Claude to checkcomposer.lockor ask you instead. - Set
"disableAllHooks": truefor the hook. That turns off every hook, not just this one.
Roadmap
- Upgrade guide (Craft 3→4, 4→5, 3→5) with deprecated plugin mapping and migration paths
- DDEV skill expansion (Xdebug deep-dive, custom services, production parity)
- Commerce skill (products, variants, orders, carts, payments -- separate skill)
- CKEditor 4→5 migration guide (config conversion, custom styles, plugin mapping, HTML cleanup)
- More plugin references (Neo, Scout, Campaign)
Contributing
Contributions welcome. See docs/contributing.md for how to add plugin references, improve skills, and report issues.
For PHP consumers (composer)
The same repo also ships as a small composer package, exposing the bundled skills' markdown to PHP code through a thin static helper. The primary consumer is craftpulse/craft-cortex — a Craft CMS 5 MCP server plugin that surfaces these skills as MCP prompts and resources to AI agents.
composer require michtio/craftcms-claude-skills
use Michtio\CraftCmsClaudeSkills\Skills; Skills::skillNames(); // ['craft-content-modeling', 'craft-garnish', 'craft-php-guidelines', ...] Skills::content('craftcms'); // Full SKILL.md content as a string Skills::references('craftcms'); // ['architecture', 'caching', 'conditions', ...] Skills::referenceContent('craftcms', 'elements'); // Full reference markdown as a string Skills::agentNames(); // ['craft-code-reviewer', 'craft-debugger', 'craft-feature-builder', ...] Skills::agentContent('craft-debugger'); // Full agent markdown (frontmatter + body) as a string
The helper is read-only and does no caching — wrap it in your own registry if you need that. PHP 8.2+.
Acknowledgements
Thanks to the people whose contributions and work have improved this pack:
- William Bocchinelli (@willbocc) — element-index sources guidance for content modeling (PR #7).
- André Elvan (@aelvan) — the Imager X reference rewrite, checked against the plugin source by its author (PR #14).
- Frank Lämmer (@frank-laemmer) — the
craft-fortrabbithosting skill (PR #18). - John Henry (@john-henry) — the Craft CP UI & Brand style guide that prompted the v1.9.0 control-panel UI reconciliation pass.
License
MIT -- see LICENSE.