# Craftcms

> Craftcms is an open-source agent skill for developer tools. Guides an AI agent through building Craft CMS 5 plugins and modules in PHP. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/michtio/craftcms-claude-skills/tree/main/skills/craftcms
- **Repository:** https://github.com/michtio/craftcms-claude-skills
- **GitHub stars:** 91
- **License:** MIT
- **Skill name:** craftcms
- **Collection:** https://github.com/michtio/craftcms-claude-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell scripts](https://github.com/michtio/craftcms-claude-skills/tree/HEAD/skills/craftcms)
- [Asks for: Bash(sh ${CLAUDE_SKILL_DIR}/scripts/craft-version.sh)](https://github.com/michtio/craftcms-claude-skills/blob/HEAD/skills/craftcms/SKILL.md)
- [No network calls found in its scripts](https://github.com/michtio/craftcms-claude-skills/tree/HEAD/skills/craftcms)
- [License: MIT](https://github.com/michtio/craftcms-claude-skills/tree/HEAD/skills/craftcms)

## Features

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

## Install

### Claude Code

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):

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

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

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

### Codex

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

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

### Cursor

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

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

### Gemini CLI

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

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

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

### VS Code

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

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

### Other agents

Get the folder:

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

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

## Alternatives

- [Craft php guidelines](https://ai-powered.com/skills/craft-php-guidelines): Craft php guidelines is an open-source agent skill for developer tools.
- [Craft plugins](https://ai-powered.com/skills/craft-plugins): Craft plugins is an open-source agent skill for developer tools.
- [Craft site](https://ai-powered.com/skills/craft-site): Craft site is an open-source agent skill for design and media.
- [Craft twig guidelines](https://ai-powered.com/skills/craft-twig-guidelines): Craft twig guidelines is an open-source agent skill for developer tools.
- [Craft plugin release](https://ai-powered.com/skills/craft-plugin-release): Craft plugin release is an open-source agent skill for developer tools.
- [Craft content modeling](https://ai-powered.com/skills/craft-content-modeling): Craft content modeling is an open-source agent skill for developer tools.
- [Craft project setup](https://ai-powered.com/skills/craft-project-setup): Craft project setup is an open-source agent skill for developer tools.
- [Craft cloud](https://ai-powered.com/skills/craft-cloud): Craft cloud is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/craftcms
