2026 Community Survey results are here! See how the Craft CMS community works. results are live!

How Do I Use AI Tools Like Claude Code for Craft CMS Development?

You use Claude Code for Craft CMS development across a spectrum of three approaches: auditing existing projects, learning new skills through AI-assisted problem solving, and building entire projects from scratch. The setup requires Claude Code in your terminal, a CLAUDE.md file that teaches it your project conventions, and the Craft MCP plugin for live schema access. With 92% of Craft developers now using AI tools (CraftQuest Community Survey 2026), the question is no longer whether to adopt these tools but how to use them effectively.

Why should Craft CMS developers pay attention to AI tools right now?

AI coding tools are not experimental anymore. 84% of developers now use them, up from 44% in 2023 (Stack Overflow 2025 Survey / AllAboutAI 2026). 51% use AI tools daily (Index.dev 2026). 41% of all new code is AI-generated (NetCorp 2026).

And the pace of improvement is what makes this moment different. As Ryan Irelan, founder of CraftQuest, puts it:

“These tools are getting better daily, monthly. Every time they release a new model, especially Anthropic’s Claude Code, it gets better and better. And there’s a surge in people adopting it in the last few months. But the ability and capability of these tools, especially Claude Code, in the last year since it was released – less than a year since it was released in beta – is astounding.”

What Claude Code could do six months ago and what it can do today are not the same thing. If you tried an AI coding tool last year and dismissed it, the landscape has changed.

Here is the honest reality for Craft developers: Craft CMS is not a leading AI platform. The ecosystem is smaller than Laravel or Next.js, which means AI tools have less Craft-specific training data to draw from (Rollin.ca). That does not mean AI tools are useless for Craft work. It means the setup and context layer – the way you teach the AI about your project – is more important, not less.

A generic AI tool writing generic PHP will not help you much. An AI tool that understands your Craft project’s content model, field handles, and Twig conventions will save you real time.

What are the three ways to use AI tools as a Craft CMS developer?

Ryan Irelan teaches these three approaches in his AI-Assisted Craft CMS Development course. They range from the extreme side to the lighter-touch side, and the sweet spot for most developers is somewhere in the middle.

1. Audit and understand an existing project (lighter-touch)

This is where Ryan starts in the course, and it is the most immediately useful way to bring AI into your Craft workflow. You point Claude Code at an existing project and let it help you understand what you are working with.

As Ryan Irelan, founder of CraftQuest, describes it: “The main thing that I talk about is using them to help audit and understand an existing project. To help you understand what the project has. You can do it to give yourself a content audit. You can use it to help you understand why code was done a certain way. Why maybe this custom module is there.”

This is the lighter-touch side of the spectrum. You are not asking AI to write code for you. You are using it as a research partner to get up to speed faster on a project – especially one you inherited or have not touched in months. Claude Code reads your project files, understands the structure, and answers questions about what is there and why.

2. Learn and extend your skill set (middle ground)

This is where AI tools get genuinely interesting for developers who want to grow. You use Claude Code to tackle problems that are just outside your current ability – and you learn from what it produces.

Ryan’s Feed Me plugin example makes this concrete: “Let’s say you’re using the Feed Me plugin, and you need to customize it to customize some data that you’re importing. Maybe it’s not in the correct format, or you need to strip something out of the content. And you can build using Claude Code a custom module that injects itself at a certain point in the Feed Me routine via Craft events, does the work, and then returns the manipulated data back to Feed Me for the rest of the processing.”

That is a real-world Craft development task. You need to understand Craft events, the Feed Me plugin lifecycle, and custom module architecture. If you do not know all of that yet, Claude Code can scaffold the solution while you learn the patterns. The key difference from just copying code off a forum: Claude Code builds it in the context of your actual project, and you can ask it to explain every decision it makes.

As Ryan notes, “That’s all very possible, and it’s something I show in my AI-Assisted Craft CMS Development course.” This middle-ground use case – where AI helps you solve problems you don’t know how to solve yet, but you want to learn – is where most developers will get the most value.

3. Build an entire project from scratch (extreme side)

On the other end of the spectrum, Ryan Irelan is direct about what is possible: “You could build an entire Craft CMS project with Claude Code without typing a single line of code. That’s on the extreme side.”

This is possible. Whether it is advisable depends on your experience level. If you already understand Craft deeply, having Claude Code generate boilerplate, scaffold modules, write Twig templates, and configure plugins can dramatically accelerate a build. If you do not understand Craft yet, you will end up with a project you cannot maintain, debug, or extend on your own.

What does the technical setup look like?

There are three layers to an effective Claude Code + Craft setup. Each one builds on the previous, and skipping any layer reduces the quality of AI output significantly.

Layer 1: Claude Code in your terminal

Claude Code is a terminal-based AI coding agent. It reads your project files, proposes changes, and executes commands directly in your development environment. It is not an IDE plugin or a chat window – it runs alongside your editor and operates on your actual codebase.

The feature you need to learn first is plan mode. That is the first thing I demonstrate when teaching someone Claude Code for Craft. Plan mode lets you review exactly what Claude Code intends to do before it does anything — but more importantly, it teaches you to learn from the tool rather than just have it code for you. Understanding over execution. For Craft CMS work, this matters. A wrong migration, a destructive database operation, or an unintended change to your project config can break a site. Plan mode gives you both the review step that keeps AI assistance safe and the understanding of what the AI is actually doing.

Beyond plan mode, Claude Code supports custom skills and commands – repeatable workflows you define once and reuse. Think of them as aliases for complex Craft tasks: scaffolding a new module, generating a migration file, or running a sequence of Craft CLI commands. DataCamp’s tutorial on Claude Code plugins covers the extensibility model in detail.

Layer 2: Write a CLAUDE.md file for your Craft project

A CLAUDE.md file is a plain Markdown file in your project root that teaches Claude Code your project’s conventions. This is the single biggest gap in existing content about AI tools and Craft: nobody has explained how to write a good one for a Craft project. We cover this in our AI-Assisted Craft CMS Development course, and it makes a measurable difference in output quality.

A good CLAUDE.md for a Craft project includes:

  • Craft and PHP version – so Claude Code targets the correct APIs and syntax
  • Directory structure – where your templates, modules, and config files live
  • Key plugins and their purposes – so it understands what is available without guessing
  • Twig conventions – your preferred patterns for entry queries, eager loading, and variable naming
  • Database and migration workflow – how you handle schema changes and deployments

Without this file, Claude Code falls back on its general training data and your project files alone. With it, the output matches your project from the start.

Here is a real example from a Craft CMS 5 project I build in Real-World Craft CMS:

# CLAUDE.md

## Project Overview
TrailQuest is a Craft CMS 5 project for managing outdoor adventure
content. It uses DDEV for local development with PHP 8.2, MariaDB 10.4,
and Nginx.

## Conventions
### Modules
- use `ddev craft make module` to scaffold new modules using Craft Generator
- Module namespaces should follow the pattern: `modules\{modulename}`
- Register modules in `config/app.php`

### Craft-Specific
- Prefer events over direct class modification
- Always check element types before operating on them in event handlers

## Common Commands
ddev start              # Start development environment
ddev craft clear-caches/all
ddev craft project-config/apply
ddev craft migrate/all

## Architecture
### Content Structure
- Sections: Homepage (single), Adventures, Articles, Locations,
  Testimonials, Menu, Vendors
- Content Builder: Uses Neo blocks for flexible page building
- Project Config: All configuration versioned in config/project/

### Template Organization
templates/
├── _layouts/_wrapper.twig    # HTML wrapper
├── _shared/_layout.twig      # Base layout with Craft hooks
├── _shared/_contentBuilder.twig  # Neo block renderer
├── _partials/entry/          # Block-specific partials
└── adventures/               # Adventure section templates

## Avoid
- Don't create new plugins when a module will suffice

Notice what is included: the content structure, template organization, key conventions, and common commands. This tells Claude Code how your project is organized so it generates code that fits your actual architecture. A CLAUDE.md is very project-specific — yours will look different — but these are the categories that matter most for Craft work.

Layer 3: Connect the Craft MCP plugin

The Craft CMS MCP plugin, built by Stimmt Digital, gives Claude Code direct access to your Craft installation’s schema, entries, fields, sections, and configuration. It provides 50 specialized tools, 9 analysis prompts, and 12 data resources (Stimmt Digital GitHub). This is what turns Claude Code from a generic coding assistant into a Craft-aware one.

With MCP connected, Claude Code can query your actual content model, understand your field layouts, and generate Twig templates that use your real field handles and section names – not placeholder guesses. When you ask it to write a template for your blog listing page, it knows what your blog section is called, what fields are on it, and how they relate to each other.

Worth noting: the Sidekick plugin from Double Secret Agency takes a different approach, integrating AI directly into the Craft control panel itself. It is currently OpenAI-only with Claude support planned. Both tools are worth watching as the Craft AI ecosystem matures.

We have a standalone lesson on setting up the Craft MCP plugin at CraftQuest.

What Craft CMS tasks can Claude Code handle?

Here are four areas where the value is most immediate.

Twig template generation. Claude Code can write Craft-specific Twig: entry queries, eager loading, Matrix field rendering, pagination. With MCP connected, it writes templates against your actual field handles instead of placeholders. This is one of the most immediate time-savers for Craft developers. Plugin and module scaffolding. This ties directly to Ryan’s Feed Me example. Claude Code can generate the boilerplate for custom Craft modules, console commands, and plugin extensions. The scaffolding is repetitive enough that AI handles it well, but specific enough that you want to verify the output using plan mode.

Debugging and performance diagnosis. Ask Claude Code to analyze a slow template, check for N+1 query patterns, or review a migration file against Craft best practices. If your CLAUDE.md encodes your performance conventions, it can flag issues against your own standards.

Configuration and deployment. Generate environment-specific config files, review general.php settings, or draft Docker configurations for Craft projects. These are tasks where getting the structure right matters more than creative problem-solving – exactly where AI tools excel.

Where do AI tools fall short for Craft CMS?

Security is your responsibility. According to the Qodo 2025 report, 48% of AI-generated code contains security vulnerabilities. AI tools do not understand your specific deployment context, permission model, or data sensitivity. You must review every change before it goes to production.

AI does not replace Craft knowledge. This is the thread running through everything Ryan teaches. If you do not understand eager loading, you will not catch when Claude Code skips it. If you do not understand Matrix field architecture, you will not notice when it over-nests or misuses entry types. AI accelerates developers who already know the fundamentals. It does not replace the fundamentals.

Guardrails matter. Claude Code can run destructive commands – database drops, file deletions, config overwrites. Plan mode and CLAUDE.md guardrails exist for exactly this reason. Use them.

The most common mistake I see is outdated syntax. You frequently have to remind Claude Code to use Craft 5 syntax, not Craft 4. There is significantly more Craft 4 content in the model’s training data than Craft 5, so it defaults to older patterns — deprecated template tags, old Matrix field syntax, removed configuration options. This will come up again when Craft 6 is released. Every major version shift means the AI’s training data lags behind the current API. This is exactly why the CLAUDE.md file matters: specifying your Craft version upfront catches the most common source of AI-generated errors before they happen.

How does CraftQuest teach AI-assisted Craft development?

Our AI-Assisted Craft CMS Development course covers the full workflow: Claude Code setup, plan mode, custom skills, CLAUDE.md configuration, and MCP integration. The course walks through all three use cases Ryan describes – from auditing existing projects to building custom modules to full project generation.

Ryan sums up the spectrum this way: “There’s so many ways these tools are moving so quickly and getting so much better. You could build an entire Craft CMS project with Claude Code without typing a single line of code. That’s on the extreme side. You could also use it as a way to help you plan a project or to audit a project that you inherited. That’s on the more lighter-touch side. Or there’s somewhere in the middle where you can have it help you solve problems that you don’t know how to solve yet, but you want to learn. And that’s in the middle.”

We built the course with a deliberate philosophy: AI workflows are taught alongside Craft fundamentals, not instead of them. The course assumes and reinforces core Craft knowledge because that is what makes AI tools actually useful.

If you are new to Craft CMS entirely, start with The Craft Mindset course and the free Craft CMS Quick-Start Guide before layering AI tools on top. AI makes you faster at what you already know how to do. It does not teach you what to do in the first place.

How do I get started using AI tools with Craft CMS?

The most practical starting point is to try Claude Code on a non-production Craft project. Install it, write a basic CLAUDE.md file with your project details, and ask it to audit what is in the project. You do not need to start by generating code. Start by understanding a project better. That is the lighter-touch entry point, and it will show you within 30 minutes whether the workflow clicks for you.

For a structured walkthrough of all three approaches, our AI-Assisted Craft CMS Development course covers every step from installation through production use. If you want to start with just the MCP integration, the standalone Craft CMS + MCP lesson gets you connected in a single sitting.

If you are still getting comfortable with Craft itself, start with the Getting Started Quest – the AI tools will still be here when you are ready.

Frequently Asked Questions

What is Claude Code and how is it different from GitHub Copilot for Craft CMS?

Claude Code is a terminal-based AI agent that reads your full project context, runs commands, and proposes multi-file changes. Unlike Copilot’s line-by-line autocomplete, Claude Code operates at the project level – it can scaffold a complete Craft module, generate Twig templates against your actual content model via the Craft MCP plugin, and review entire template directories for performance issues. For Craft CMS work, the project-level awareness makes a significant difference in output quality.

Do I need the Craft MCP plugin to use AI tools with Craft CMS?

No, but it significantly improves results. Without MCP, Claude Code can still write Craft code based on its training data and your project files. With MCP connected, it has live access to your sections, fields, entry types, and configuration – so it generates code that matches your actual content model instead of generic examples. The Craft MCP plugin provides 50 specialized tools for this purpose.

Is AI-generated code safe to use in production Craft CMS sites?

AI-generated code requires the same review as any code before going to production. 48% of AI-generated code contains security vulnerabilities (Qodo 2025), so you should review every change, test thoroughly, and use Claude Code’s plan mode to inspect proposed changes before they execute. AI accelerates development but does not replace developer oversight.

Can Claude Code write Twig templates for Craft CMS?

Yes, and this is one of its strongest use cases for Craft developers. With project context from a CLAUDE.md file and live schema access from the Craft MCP plugin, Claude Code can generate Craft-specific Twig including entry queries, eager loading, Matrix field rendering, and pagination – using your actual field handles and section names.

How do I create a CLAUDE.md file for my Craft CMS project?

A CLAUDE.md file is a plain Markdown file in your project root that teaches Claude Code your project’s conventions. For a Craft project, include your Craft version, PHP version, directory structure, key plugins, Twig conventions, and deployment workflow. We cover this topic in depth in our AI-Assisted Craft CMS Development course at CraftQuest.