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

Setting Up Claude Code for Craft CMS Projects

Configure Claude Code with project context via CLAUDE.md so it stops guessing about your Craft version, namespace conventions, and local environment.

Before we use Claude Code to build any­thing, we need to set it up prop­er­ly. That means giv­ing it con­text about our project — what we’re build­ing, what tools we’re using, and how we like to do things.

This isn’t option­al set­up. It’s the dif­fer­ence between Claude Code being a gener­ic code gen­er­a­tor and Claude Code being a col­lab­o­ra­tor that under­stands your project.

To get start­ed, you’ll need:

  • A Craft CMS project (Craft 5 preferred)
  • Claude Code installed (npm install -g @anthropic-ai/claude-code or via Homebrew)
  • Basic ter­mi­nal comfort

Claude Code can see your files, but see­ing files isn’t the same as under­stand­ing your project. It doesn’t auto­mat­i­cal­ly know:

  • What ver­sion of Craft you’re running
  • That you use DDEV for local development
  • Where your mod­ules live and what name­space con­ven­tion you follow
  • That you pre­fer a cer­tain cod­ing style

With­out this con­text, Claude Code makes guess­es. Some­times good guess­es, some­times not. The CLAUDE.md file elim­i­nates the guessing.

Craft Version
Craft 5
Topic
Instructor
Level
Intermediate
Date Published
January 26, 2026