Skip to content
Skill

Craftcms

Guides an AI agent through building Craft CMS 5 plugins and modules in PHP

Craftcms is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
shell
Platforms
Claude Code
GitHub stars
91
Last commit
License
MIT
Listing updated

Similar skills

About Craftcms

This skill gives a coding agent the conventions for extending Craft CMS 5 with PHP, covering plugins, modules, custom element types, field types and backend integrations. It points the agent to a set of reference files organised by task, such as elements, services, migrations, queue jobs, console commands, events, permissions and GraphQL, and tells it which one to read for a given job.

The skill runs a small shell script to detect the Craft version of the current project so that version-specific advice matches the installed release. It also lists cross-cutting pitfalls, such as project config writes that can delete teammates' YAML, routing risks for plugin templates and validation rules that fire for every entry.

It expects a Craft 5 codebase and Claude Code, and it asks the agent to load companion skills for PHP standards, DDEV, testing and plugin-specific work. Front-end Twig and content modelling are handled by separate skills.

When your agent uses it

Craft CMS 5 plugin and module development in PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, events, Twig extensions, widgets, permissions, GraphQL, testing, and debugging.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 37 files (968 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the craftcms-claude-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add michtio/craftcms-claude-skills
/plugin install craftcms-claude-skills@craftcms-claude-skills

Or copy only this skill to ~/.claude/skills/craftcms:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michtio/craftcms-claude-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/craftcms &&
cp -R "$tmp/skills/craftcms" ~/.claude/skills/craftcms &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/craftcms inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/craftcms to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michtio/craftcms-claude-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/craftcms &&
cp -R "$tmp/skills/craftcms" ~/.agents/skills/craftcms &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/craftcms inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/craftcms to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michtio/craftcms-claude-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/craftcms &&
cp -R "$tmp/skills/craftcms" ~/.cursor/skills/craftcms &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/craftcms inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/michtio/craftcms-claude-skills.git --path skills/craftcms

Or copy the folder to ~/.gemini/skills/craftcms yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/craftcms:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michtio/craftcms-claude-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/craftcms &&
cp -R "$tmp/skills/craftcms" ~/.copilot/skills/craftcms &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/craftcms inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/michtio/craftcms-claude-skills.git

Then copy craftcms-claude-skills/skills/craftcms into your agent's skills folder as craftcms. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Version detection script
A shell script reads the project's Craft version so advice matches the installed release.
Task-indexed reference files
Dozens of reference files map tasks such as elements, migrations and queue jobs to specific sections.
Cross-cutting pitfalls
Lists common traps, including project config overwrites, reserved request parameters and template routing.
Plugin and module guidance
Explains differences between plugins and modules, including template roots and controller registration.
Testing and quality checks
Covers Codeception basics, pointers to Pest, static analysis and a review checklist.
Permissions and authorization
Describes how to register user permissions and check element access.

Good for

  • Build a custom element type with its own index and field layout
  • Add a webhook endpoint to a Craft plugin
  • Write a queue job that syncs elements in the background
  • Create a dashboard widget or utility page in the control panel
  • Add a custom field type with settings and input HTML
  • Debug a slow query or a failing console command in a plugin

Craftcms FAQ

What does the skill need to run?

It expects a Craft CMS 5 project or plugin in PHP. Its version script uses a bash shell, and it asks the agent to load companion skills for PHP standards, DDEV and tests.

Does Craftcms cover front-end Twig templates?

No. The skill says front-end Twig and content modelling belong to separate Craft skills and should not trigger this one.

Does Craftcms check the Craft version of my project?

Yes. A shell script runs when the skill loads and reports the version, and if no version appears it tells the agent to read composer files or ask.

How do I install Craftcms in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/craftcms to use it in all your projects, or to .claude/skills/craftcms in one project. Or install the craftcms-claude-skills plugin, which includes it: /plugin marketplace add michtio/craftcms-claude-skills, then /plugin install craftcms-claude-skills@craftcms-claude-skills.

Does Craftcms run scripts?

Yes. It runs shell scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Craftcms?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Craftcms?

The closest alternatives to Craftcms are Craft php guidelines, Craft plugins, Craft site, Craft twig guidelines and Craft plugin release.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from michtio/craftcms-claude-skills

  1. Gives agents a safe Pest workflow for testing Craft CMS 5 plugins without touching live

    • Open source
    • 91 GitHub stars
    • Developer tools
  2. Guides an agent through Craft Cloud config, deploys, caching, and Cloud-specific limits

    • Open source
    • 91 GitHub stars
    • Databases
  3. Guides Craft CMS 5 content architecture: sections, entry types, fields, Matrix

    • Open source
    • 91 GitHub stars
    • Developer tools
  4. Deploys and runs Craft CMS on fortrabbit managed PHP hosting with safe git workflows

    • Open source
    • 91 GitHub stars
    • Developer tools
  5. Guides agents writing Craft CMS control panel JavaScript with the Garnish UI toolkit

    • Open source
    • 91 GitHub stars
    • Developer tools
  6. Runs one approved Craft CMS slice through outside builders under locked test gates

    • Open source
    • 91 GitHub stars
    • Developer tools