/ 디렉터리 / 플레이그라운드 / craftcms-claude-skills
● 커뮤니티 michtio ⚡ 바로 사용

craftcms-claude-skills

제작: michtio · michtio/craftcms-claude-skills

A Claude Code skill bundle that knows Craft CMS 5 inside out — writes modules, Twig templates, migrations, and GraphQL queries the Craft way.

Production-ready skills, agents and project templates that teach Claude Code how Craft CMS 5 actually works. Instead of generic PHP suggestions, you get idiomatic Craft patterns — proper element queries, field handles, module structure, Pixel & Tonic conventions.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

craftcms-claude-skill.replay ▶ 준비됨
0/0

설치

클라이언트 선택

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "craftcms-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/michtio/craftcms-claude-skills",
        "~/.claude/skills/craftcms-claude-skills"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "craftcms-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/michtio/craftcms-claude-skills",
        "~/.claude/skills/craftcms-claude-skills"
      ],
      "_inferred": true
    }
  }
}

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "craftcms-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/michtio/craftcms-claude-skills",
        "~/.claude/skills/craftcms-claude-skills"
      ],
      "_inferred": true
    }
  }
}

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "craftcms-claude-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/michtio/craftcms-claude-skills",
        "~/.claude/skills/craftcms-claude-skills"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "craftcms-claude-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/michtio/craftcms-claude-skills",
        "~/.claude/skills/craftcms-claude-skills"
      ]
    }
  ]
}

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

~/.config/zed/settings.json
{
  "context_servers": {
    "craftcms-claude-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/michtio/craftcms-claude-skills",
          "~/.claude/skills/craftcms-claude-skills"
        ]
      }
    }
  }
}

context_servers에 추가. 저장 시 Zed가 핫 리로드.

claude mcp add craftcms-claude-skill -- git clone https://github.com/michtio/craftcms-claude-skills ~/.claude/skills/craftcms-claude-skills

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: craftcms-claude-skills

Scaffold a custom Craft CMS module without leaving Claude Code

👤 Craft CMS developers building site-specific modules ⏱ ~30 min intermediate

언제 쓸까: You need a new module and don't want to hand-copy another one as a template.

사전 조건
  • Craft CMS 5 project set up locally — composer create-project craftcms/craft my-project
  • Skill cloned — git clone https://github.com/michtio/craftcms-claude-skills ~/.claude/skills/craftcms-claude-skills
흐름
  1. Describe the module's job
    Use craftcms-claude-skills. Create a new module called 'Inventory' that registers a custom element type for warehouse items.✓ 복사됨
    → Claude scaffolds modules/inventory/ with src/Inventory.php, elements/WarehouseItem.php, and a config entry
  2. Wire it up
    Register the module in config/app.php and add the bootstrap entry.✓ 복사됨
    → Config diff shown; module loads without errors on craft setup/check
  3. Add an element query
    Add a WarehouseItemQuery class with a custom 'sku' parameter that filters on the content table.✓ 복사됨
    → Query class with proper WHERE clauses, not raw SQL soup

결과: A working Craft module that follows Pixel & Tonic conventions — ready for your first migration.

함정
  • Claude writes Craft 3/4 style code — Explicitly state Craft CMS 5 in every prompt — the API surface changed
함께 쓰기: filesystem · mysql

Refactor a mess of Twig templates into idiomatic Craft

👤 Front-end devs inheriting a Craft site with sketchy templates ⏱ ~45 min intermediate

언제 쓸까: You took over a Craft project and the templates are full of raw SQL, inline PHP, and cache tags that don't work.

흐름
  1. Point Claude at the worst template
    Using craftcms-claude-skills, review templates/_entries/blog.twig and rewrite it using proper element queries and {% cache %} tags.✓ 복사됨
    → Refactored template with craft.entries, section handle, and correct cache scoping
  2. Extract reusable macros
    Pull the card markup into a macro in _macros/cards.twig and include it properly.✓ 복사됨
    → Macro file created; includes use {% from %} syntax

결과: Templates that load faster and future devs can actually read.

함정
  • Cache tags wrap dynamic user data and show wrong content — Use {% cache %} with globally keyed variations, never around authenticated user data
함께 쓰기: filesystem

Write a safe Craft migration for content model changes

👤 Craft devs shipping schema changes to production ⏱ ~30 min advanced

언제 쓸까: You're adding a new field or restructuring an existing one and need a migration that won't eat data.

흐름
  1. Describe the change
    Use craftcms-claude-skills. Write a Craft migration that adds a 'featuredAt' datetime field to the News section, with a safe backfill from postDate.✓ 복사됨
    → Migration file with safeUp / safeDown; uses Craft's Fields service, not raw schema hacks
  2. Dry-run in dev
    Walk me through testing this with ./craft migrate/up --interactive=0 on a staging copy first.✓ 복사됨
    → Step-by-step checklist including DB backup

결과: A migration you can ship on a Friday without panic.

함정
  • Forgetting to register the field type in project config — Always run craft project-config/write after the migration and commit the YAML
함께 쓰기: mysql · git

조합

다른 MCP와 조합해 10배 효율

craftcms-claude-skill + filesystem

Skill provides Craft patterns; filesystem lets Claude actually apply them in your project

Apply the craftcms-claude-skills module scaffold to my current project directory.✓ 복사됨
craftcms-claude-skill + mysql

Inspect Craft's content tables while writing migrations

Show me the current schema of the elements_sites table before I write this migration.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
module_scaffold module name, element types Starting a new module 0
field_generator field name, type, handle Adding a custom field type 0
twig_refactor template path Cleaning up legacy templates 0

비용 및 제한

운영 비용

API 쿼터
None
호출당 토큰
Moderate — reference files load on demand
금액
Free
Reference the skill by name only when working on Craft code; it adds context overhead to unrelated tasks.

보안

권한, 시크릿, 파급범위

자격 증명 저장: No credentials
데이터 외부 송신: None — local prompts and files only

문제 해결

자주 발생하는 오류와 해결

Claude generates Craft 3-era code (craft()->elements)

Mention 'Craft CMS 5' explicitly; the API namespace is craft\elements in 5.x

확인: grep -r 'craft()->' src/ should return nothing in Craft 5 code
Migration runs but field doesn't appear in CP

Run ./craft project-config/write and ./craft project-config/apply — project config drift is the usual cause

확인: ./craft project-config/diff
Skill not triggered on Craft prompts

Invoke by name: 'use craftcms-claude-skills'. Check SKILL.md is present.

확인: ls ~/.claude/skills/craftcms-claude-skills/SKILL.md

대안

craftcms-claude-skills 다른 것과 비교

대안언제 쓰나단점/장점
Raw Claude CodeSimple Twig-only tweaks that don't need Craft-specific idiomsGeneric PHP suggestions, often wrong for Craft
symfony-hexagonal-skillYou're on Symfony, not CraftDifferent framework conventions

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기