craftcms-claude-skills
michtio · michtio/craftcms-claude-skills
Skill, agent và mẫu dự án cho Claude Code dùng với Craft CMS 5, bao gồm phát triển plugin, mô hình hóa nội dung, template Twig và quy trình DDEV.
Production-ready Claude Code skills, agents, and project templates for Craft CMS 5 development
Xem trước
Bạn có thể làm gì với nó
- Tạo CLAUDE.md và rules phù hợp cho một dự án Craft CMS
- Xây blog có chủ đề, tác giả và trình tạo nội dung linh hoạt
- Phát triển plugin hoặc module Craft theo đúng quy ước của Craft
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ 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
| 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. 19 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 |