Sandbox
@michtio/craftcms-claude-skills

Claude Code skills and agents for Craft CMS 5

This repo packages reusable Claude Code skills, subagents, and starter files for Craft CMS 5 work. The skills cover content modeling, Twig, plugin development, DDEV, hosting, and testing, while the agents handle planning, building, debugging, and review.

78 stars9 forksShellUpdated 14d ago
Who it's for

Builders who use Claude Code to build Craft CMS plugins, modules, and sites.

What it delivers

You can set up project rules and get Craft-aware help without re-explaining your stack each time.

What it does

Craft-specific skills

Skills in `skills/` cover content modeling, Craft CMS APIs, Twig, PHP guidelines, DDEV, hosting, and plugin release work.

Multi-agent workflow

Agents in `agents/` include planners, feature builders, debuggers, and code reviewers with different verification gates.

Project setup templates

`project-template/` and `craft-project-setup` generate a tailored `CLAUDE.md` and `.claude/rules/` for a Craft project.

Plugin reference library

`craft-plugins` routes Craft plugin guidance for tools like Blitz, Formie, CKEditor, Vite, and others.

Composer helper

`src/Skills.php` exposes the bundled markdown to PHP code through a read-only helper.

How to get it

  1. 1Open Claude Code in your Craft project and say
    Set up Claude for this Craft project
  2. 2The 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

README

Craft CMS Claude Skills

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@michtio/craftcms-claude-skills

# Or via Vercel Skills CLI
npx skills add michtio/craftcms-claude-skills --all

# Or clone manually
git clone https://github.com/michtio/craftcms-claude-skills.git ~/.claude/craftcms-claude-skills
cd ~/.claude/craftcms-claude-skills && bash install.sh

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.

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.

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.
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

SkillTrackKey Coverage
craftcmsPluginElements, 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-guidelinesPluginPHPDocs, section headers, naming, class organization, ECS/PHPStan. 6 reference files.
craft-content-modelingSiteSections, entry types, fields, Matrix, relations, eager loading, entrification. Reuse-first field workflow. 7 reference files.
craft-siteSiteAtomic design, component patterns, routing, Vite, auth flows, search, feeds, headless. 19 reference files.
craft-pluginsPlugin ReferencesName-routed index of third-party plugin guidance (config, Twig/PHP API, migrations, deployment, pitfalls), discoverable from any task altitude. 24 plugin references.
craft-twig-guidelinesSiteVariable naming, null handling, whitespace, include isolation, Craft helpers, collect().
craft-garnishPluginGarnish CP JavaScript: class system, UI widgets, drag system, ARIA/focus, Craft.* pattern. 5 reference files.
craft-pestPluginTesting 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-releasePluginRelease 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.
ddevSharedCommands, services, configuration, Xdebug, site sharing, troubleshooting.
craft-project-setupSharedProject scaffolding, upgrade, and audit. Generates CLAUDE.md, .claude/rules/, .claude/settings.local.json (permissions). Gap analysis for existing configs.
craft-cloudSharedCraft 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.
servdSharedServd 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.

13 skills, 118 reference files. Skills load automatically and declare companion skills so related knowledge loads together. See docs/skills-overview.md for the full breakdown.

Agents

AgentModelPurpose
craft-plannerOpusDecompose features into vertical slices with verification gates. Can research/audit public plugins via gh and git clone.
craft-feature-builderOpusBuild plugin code feature by feature with automated + manual test gates
craft-site-builderOpusSite templates and components feature by feature with build-verify gates
craft-debuggerSonnetSystematic bug investigation
craft-code-reviewerSonnetFull-stack review against a structured checklist: PHP, Twig, JS, CSS, config
craft-code-reviewer-deepOpusDeep review for high-stakes PRs (release branches, security, migrations, multi-service flows): cross-file data flow, untested paths, race conditions, scale concerns

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 (Opus) goes further for high-stakes changes. 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
PluginAuthorKey Surface
SEOmaticnystudio107Meta cascade, JSON-LD, sitemaps, GraphQL
BlitzputyourlightsonStatic caching, Cloudflare, dynamic content, purgers
FormieverbbForm rendering, Tailwind theming, submissions, hooks
ImageOptimizenystudio107Responsive images, transforms, loading strategies
CKEditorcraftcmsRich text, nested entries, HTML Purifier
SprigputyourlightsonReactive Twig components (htmx)
Element APIcraftcmsJSON API endpoints
Retournystudio107Redirects, 404 tracking
NavigationverbbMenu node querying, active states
HyperverbbLink fields, button integration
Colour SwatchescraftpulseColor palettes, Tailwind class mapping
Password PolicycraftpulseValidation rules, HIBP check
Typogrifynystudio107Typography filters, widow prevention
Cache IgniterputyourlightsonCDN cache warming
Knock KnockverbbStaging password protection
Elements PanelputyourlightsonDebug toolbar, N+1 detection
SherlockputyourlightsonSecurity scanning
Embedded AssetsspicyweboEmbed as assets
Amazon SESputyourlightsonSES mail transport
TimeloopcraftpulseRecurring dates
Feed MecraftcmsData import from XML/JSON/CSV, CLI automation
Imager-XspacecatninjaAdvanced image transforms, named presets, effects
Vitenystudio107Asset loading (craft.vite.*), critical CSS, dev server, manifest
WarpcraftpulsePasswordless auth: magic links, one-time codes, passkeys, sessions

Documentation

GuideWhat it covers
Getting StartedInstallation, project setup, how skills auto-trigger, first steps
Skills OverviewAll 13 skills with triggers, companion skills, reference counts, boundaries
Prompt Guide40+ real-world prompts organized by task type
Agents6 agents with tools, gate patterns, composition examples
ContributingAdding plugin references, improving skills, reporting issues
Code of ConductContributor Covenant 2.1 — expected behavior and enforcement
Security PolicySupported versions, private vulnerability reporting, what's in and out of scope

Requirements

  • Claude Code installed and configured
  • DDEV for local Craft CMS development
  • Craft CMS 5.x
  • 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

The pack targets Craft CMS 5, latest minor (currently 5.10). Behaviour specific to a Craft minor is annotated inline in the content (e.g. "since 5.10.0"), so a single line serves projects on any Craft 5 minor — the minors are additive and backward-compatible. 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.

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:

License

MIT -- see LICENSE.

Files in the repo

Repository payload19 top-level entries
  • .claude-plugin
  • .github
  • agents
  • bin
  • docs
  • evals
  • project-template
  • reference
  • skills
  • src
  • .gitignore
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • composer.json
  • install.sh
  • LICENSE
  • README.md
  • SECURITY.md
  • uninstall.sh

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k