Skip to content
Back to search

craftcms-claude-skills

SkillWorks with Claude CodeGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/michtio--craftcms-claude-skills/badge.svg)](/listings/michtio--craftcms-claude-skills)

HTML

<a href="/listings/michtio--craftcms-claude-skills"><img src="/api/listings/michtio--craftcms-claude-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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

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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 45 lines
  1. {
  2. "name": "craftcms-claude-skills",
  3. "owner": {
  4. "name": "michtio",
  5. "email": "michael@bleuchaud.com"
  6. },
  7. "metadata": {
  8. "description": "Craft CMS 5 skills and agents for Claude Code — plugin development, site development, content modeling, headless, multi-site, and more.",
  9. "version": "1.23.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "craftcms-claude-skills",
  14. "source": "./",
  15. "description": "Production-ready skills and agents for Craft CMS 5 development. 14 skills (including a name-routed plugin-reference index, Pest testing, plugin release mechanics, Craft Cloud, Servd, and fortrabbit hosting), 6 specialized agents with explicit build-verify gates, 24 plugin references, project scaffolding.",
  16. "version": "1.23.0",
  17. "author": {
  18. "name": "michtio"
  19. },
  20. "homepage": "https://github.com/michtio/craftcms-claude-skills",
  21. "repository": "https://github.com/michtio/craftcms-claude-skills",
  22. "license": "MIT",
  23. "keywords": [
  24. "craft-cms",
  25. "craftcms",
  26. "craft-cms-5",
  27. "twig",
  28. "php",
  29. "ddev",
  30. "plugin-development",
  31. "content-modeling",
  32. "site-development",
  33. "atomic-design",
  34. "headless",
  35. "multi-site",
  36. "craft-cloud",
  37. "serverless-hosting",
  38. "servd",
  39. "fortrabbit",
  40. "managed-hosting"
  41. ],
  42. "category": "cms"
  43. }
  44. ]
  45. }
README.md · README · 272 lines
  1. # Craft CMS Claude Skills
  2. > Production-ready [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skills, agents, and project templates for Craft CMS 5 development.
  3. Built and maintained by [michtio](https://github.com/michtio). Covers both **plugin/module development** (extending Craft) and **site development** (content modeling, Twig templates, front-end architecture).
  4. ## Support
  5. If this project saves you time, consider supporting its development:
  6. - [GitHub Sponsors](https://github.com/sponsors/michtio)
  7. - [Buy Me a Coffee](https://buymeacoffee.com/michtio)
  8. ## Quick Start
  9. ### 1. Install
  10. ```bash
  11. # Claude Code Plugin (recommended)
  12. # First time: add the marketplace, then install
  13. /plugin marketplace add michtio/craftcms-claude-skills
  14. /plugin install craftcms-claude-skills@craftcms-claude-skills
  15. # Or via Vercel Skills CLI
  16. npx skills add michtio/craftcms-claude-skills --all
  17. # Or clone manually
  18. git clone https://github.com/michtio/craftcms-claude-skills.git ~/.claude/craftcms-claude-skills
  19. cd ~/.claude/craftcms-claude-skills && bash install.sh
  20. ```
  21. ### 2. Set Up Your Project
  22. Open Claude Code in your Craft project and say:
  23. ```
  24. Set up Claude for this Craft project
  25. ```
  26. 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.
  27. ### 3. Start Building
  28. The skills trigger automatically based on what you're doing. Just describe what you need:
  29. ```
  30. Build a blog with topics, authors, and a flexible body builder using CKEditor
  31. ```
  32. Claude loads the right skills, follows Craft conventions, and uses the correct field handles, DDEV commands, and project config workflow.
  33. ## Example Prompts
  34. Just describe what you need — skills trigger automatically and produce high-quality results. A few to show the range, grouped by domain:
  35. **Content modeling & architecture**
  36. ```
  37. Plan the content architecture for a multi-language corporate site with
  38. news, team members, office locations, and a service catalog. We need
  39. English, German, and French with subfolder-per-language routing.
  40. ```
  41. **Plugins & modules**
  42. ```
  43. Build a custom element type for "Job Listings" with postDate/expiryDate
  44. status, a categories relation for departments, and a CP edit page with
  45. field layout designer.
  46. ```
  47. **Control panel & author experience**
  48. ```
  49. I need a modal dialog for my Craft plugin that opens when clicking
  50. "Add Item", shows a form with name and handle fields, POSTs to my
  51. plugin's save action, and closes on success. Make it keyboard accessible.
  52. ```
  53. **Front-end & Twig**
  54. ```
  55. Create an atomic button component that supports links, form submits,
  56. and disabled states. It needs size variants and a loading spinner option.
  57. ```
  58. ```
  59. Build a member area with registration, login, password reset, and
  60. profile editing. Users should be in the "Members" group and only see
  61. content in the gated section.
  62. ```
  63. **Hosting & deployment**
  64. ```
  65. Set this project up to deploy on Servd: Servd asset storage, static
  66. caching with Blitz in reverse-proxy mode, and the dedicated queue
  67. runner. Document the constraints in CLAUDE.md.
  68. ```
  69. ```
  70. This project deploys to fortrabbit. Add a deploy file that keeps our
  71. asset volumes, move the queue into a worker job, and pull the
  72. production database into DDEV.
  73. ```
  74. ```
  75. Configure Redis for cache, sessions, and mutex in our Craft project.
  76. We're running DDEV locally and deploying to a VPS with Redis installed.
  77. ```
  78. See [docs/prompt-guide.md](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.
  79. ## What's Inside
  80. ### Skills
  81. | Skill | Track | Key Coverage |
  82. |-------|-------|--------------|
  83. | `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. |
  84. | `craft-php-guidelines` | Plugin | PHPDocs, section headers, naming, class organization, ECS/PHPStan. 6 reference files. |
  85. | `craft-content-modeling` | Site | Sections, entry types, fields, Matrix, relations, eager loading, entrification. Reuse-first field workflow. 7 reference files. |
  86. | `craft-site` | Site | Atomic design, component patterns, routing, Vite, auth flows, search, feeds, headless, template caching. 20 reference files. |
  87. | `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. |
  88. | `craft-twig-guidelines` | Site | Variable naming, null handling, whitespace, include isolation, Craft helpers, `collect()`. |
  89. | `craft-garnish` | Plugin | Garnish CP JavaScript: class system, UI widgets, drag system, ARIA/focus, Craft.* pattern. 5 reference files. |
  90. | `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. |
  91. | `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. |
  92. | `ddev` | Shared | Commands, services, configuration, Xdebug, site sharing, troubleshooting. |
  93. | `craft-project-setup` | Shared | Project scaffolding, upgrade, and audit. Generates CLAUDE.md, .claude/rules/, .claude/settings.local.json (permissions). Gap analysis for existing configs. |
  94. | `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. |
  95. | `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. |
  96. | `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. |
  97. 14 skills, 124 reference files. Skills load automatically and declare companion skills so related knowledge loads together. See [docs/skills-overview.md](docs/skills-overview.md) for the full breakdown.
  98. ### Agents
  99. | Agent | Model | Purpose |
  100. |-------|-------|---------|
  101. | `craft-planner` | Opus | Decompose features into vertical slices with verification gates. Can research/audit public plugins via `gh` and `git clone`. |
  102. | `craft-feature-builder` | Opus | Build plugin code feature by feature with automated + manual test gates |
  103. | `craft-site-builder` | Opus | Site templates and components feature by feature with build-verify gates |
  104. | `craft-debugger` | Sonnet | Systematic bug investigation |
  105. | `craft-code-reviewer` | Sonnet | Full-stack review against a structured checklist: PHP, Twig, JS, CSS, config |
  106. | `craft-code-reviewer-deep` | Opus | Deep review for high-stakes PRs (release branches, security, migrations, multi-service flows): cross-file data flow, untested paths, race conditions, scale concerns |
  107. 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](docs/agents.md) for details.
  108. ### Plugin Reference Library
  109. 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:
  110. <details>
  111. <summary>View all 24 plugin references</summary>
  112. | Plugin | Author | Key Surface |
  113. |--------|--------|-------------|
  114. | SEOmatic | nystudio107 | Meta cascade, JSON-LD, sitemaps, GraphQL |
  115. | Blitz | putyourlightson | Static caching, Cloudflare, dynamic content, purgers |
  116. | Formie | verbb | Form rendering, Tailwind theming, submissions, hooks |
  117. | ImageOptimize | nystudio107 | Responsive images, transforms, loading strategies |
  118. | CKEditor | craftcms | Rich text, nested entries, HTML Purifier |
  119. | Sprig | putyourlightson | Reactive Twig components (htmx) |
  120. | Element API | craftcms | JSON API endpoints |
  121. | Retour | nystudio107 | Redirects, 404 tracking |
  122. | Navigation | verbb | Menu node querying, active states |
  123. | Hyper | verbb | Link fields, button integration |
  124. | Colour Swatches | craftpulse | Color palettes, Tailwind class mapping |
  125. | Password Policy | craftpulse | Validation rules, HIBP check |
  126. | Typogrify | nystudio107 | Typography filters, widow prevention |
  127. | Cache Igniter | putyourlightson | CDN cache warming |
  128. | Knock Knock | verbb | Staging password protection |
  129. | Elements Panel | putyourlightson | Debug toolbar, N+1 detection |
  130. | Sherlock | putyourlightson | Security scanning |
  131. | Embedded Assets | spicyweb | oEmbed as assets |
  132. | Amazon SES | putyourlightson | SES mail transport |
  133. | Timeloop | craftpulse | Recurring dates |
  134. | Feed Me | craftcms | Data import from XML/JSON/CSV, CLI automation |
  135. | Imager-X | spacecatninja | Advanced image transforms, named presets, effects |
  136. | Vite | nystudio107 | Asset loading (`craft.vite.*`), critical CSS, dev server, manifest |
  137. | Warp | craftpulse | Passwordless auth: magic links, one-time codes, passkeys, sessions |
  138. </details>
  139. ## Documentation
  140. | Guide | What it covers |
  141. |-------|----------------|
  142. | [Getting Started](docs/getting-started.md) | Installation, project setup, how skills auto-trigger, first steps |
  143. | [Skills Overview](docs/skills-overview.md) | All 14 skills with triggers, companion skills, reference counts, boundaries |
  144. | [Prompt Guide](docs/prompt-guide.md) | 40+ real-world prompts organized by task type |
  145. | [Agents](docs/agents.md) | 6 agents with tools, gate patterns, composition examples |
  146. | [Contributing](docs/contributing.md) | Adding plugin references, improving skills, reporting issues |
  147. | [Code of Conduct](CODE_OF_CONDUCT.md) | Contributor Covenant 2.1 — expected behavior and enforcement |
  148. | [Security Policy](SECURITY.md) | Supported versions, private vulnerability reporting, what's in and out of scope |
  149. ## Requirements
  150. - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed and configured
  151. - [DDEV](https://ddev.com) for local Craft CMS development
  152. - Craft CMS 5.x
  153. - Bash (macOS/Linux) for the install script
  154. ## Versioning
  155. This package follows its own [semantic versioning](https://semver.org), driven by the pack's own content — it is **not** pinned to Craft's minor releases:
  156. - **Patch** (e.g. 1.6.0 → 1.6.1) — accuracy fixes, corrections, small content updates
  157. - **Minor** (e.g. 1.5.x → 1.6.0) — new skills, new plugin references, significant content additions
  158. - **Major** (1.x → 2.x) — Craft's next major (5.x → 6.x, where APIs break) or a major reorganization of the pack
  159. The pack targets **Craft CMS 5, latest minor** (currently 5.11). 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.
  160. 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.
  161. ## Roadmap
  162. - [ ] Upgrade guide (Craft 3→4, 4→5, 3→5) with deprecated plugin mapping and migration paths
  163. - [ ] DDEV skill expansion (Xdebug deep-dive, custom services, production parity)
  164. - [ ] Commerce skill (products, variants, orders, carts, payments -- separate skill)
  165. - [ ] CKEditor 4→5 migration guide (config conversion, custom styles, plugin mapping, HTML cleanup)
  166. - [ ] More plugin references (Neo, Scout, Campaign)
  167. ## Contributing
  168. Contributions welcome. See [docs/contributing.md](docs/contributing.md) for how to add plugin references, improve skills, and report issues.
  169. ## For PHP consumers (composer)
  170. 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`](https://github.com/craftpulse/craft-cortex) — a Craft CMS 5 MCP server plugin that surfaces these skills as MCP prompts and resources to AI agents.
  171. ```bash
  172. composer require michtio/craftcms-claude-skills
  173. ```
  174. ```php
  175. use Michtio\CraftCmsClaudeSkills\Skills;
  176. Skills::skillNames();
  177. // ['craft-content-modeling', 'craft-garnish', 'craft-php-guidelines', ...]
  178. Skills::content('craftcms');
  179. // Full SKILL.md content as a string
  180. Skills::references('craftcms');
  181. // ['architecture', 'caching', 'conditions', ...]
  182. Skills::referenceContent('craftcms', 'elements');
  183. // Full reference markdown as a string
  184. Skills::agentNames();
  185. // ['craft-code-reviewer', 'craft-debugger', 'craft-feature-builder', ...]
  186. Skills::agentContent('craft-debugger');
  187. // Full agent markdown (frontmatter + body) as a string
  188. ```
  189. The helper is read-only and does no caching — wrap it in your own registry if you need that. PHP 8.2+.
  190. ## Acknowledgements
  191. Thanks to the people whose contributions and work have improved this pack:
  192. - **[William Bocchinelli](https://github.com/willbocc)** ([@willbocc](https://github.com/willbocc)) — element-index sources guidance for content modeling (PR #7).
  193. - **[André Elvan](https://github.com/aelvan)** ([@aelvan](https://github.com/aelvan)) — the Imager X reference rewrite, checked against the plugin source by its author (PR #14).
  194. - **[Frank Lämmer](https://github.com/frank-laemmer)** ([@frank-laemmer](https://github.com/frank-laemmer)) — the `craft-fortrabbit` hosting skill (PR #18).
  195. - **[John Henry](https://github.com/john-henry)** ([@john-henry](https://github.com/john-henry)) — the [Craft CP UI & Brand style guide](https://john-henry.github.io/craft-cp-ui-guide/) that prompted the v1.9.0 control-panel UI reconciliation pass.
  196. ## License
  197. MIT -- see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.