Claude-skill-registry Craft CMS Skills
Complete skill suite for managing Craft CMS content including sections, entry types, fields, entries, drafts, field layouts, and sites.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/craft-cms-skills" ~/.claude/skills/majiayu000-claude-skill-registry-craft-cms-skills && rm -rf "$T"
manifest:
skills/data/craft-cms-skills/SKILL.mdsource content
Important: Use this plugin, Not YAML Files
CRITICAL: Always use this HTTP API to manage Craft CMS content. Never directly modify YAML configuration files in the
config/project/ directory. The API ensures proper validation, maintains data integrity, and handles all necessary relationships automatically. Direct YAML edits can corrupt your Craft installation.
CRITICAL: The
skills plugin must be installed to Craft. You can verify installation by running php craft plugin/list and install it with php craft plugin/install skills
Base URL Configuration
All API routes require a base URL and API prefix. The standard Craft CMS configuration uses the
PRIMARY_SITE_URL environment variable and a configurable API prefix:
- Environment Variable: Check for
in ENV orPRIMARY_SITE_URL
file.env - If Not Set: Ask the user for the base URL to use
- API Prefix: Configurable prefix that defaults to
/api- Check Order:
- First check
forconfig/skills.php
in the PHP arrayapiPrefix - If not found, try the default
/api - If requests fail, ask the user for the configured API prefix
- First check
- Check Order:
- Route Format:
{PRIMARY_SITE_URL}/{apiPrefix}/{endpoint} - Default Example:
https://craft-site.com/api/sections - Custom Prefix Example:
https://craft-site.com/custom-api/sections
Request/Response Format
All API endpoints:
- Return JSON: All responses are in JSON format with structured data
- Accept Header: Include
header in requests to ensure errors are also formatted as JSON for better error handling and debuggingAccept: application/json - Content-Type: Use
for POST/PUT requests with JSON body dataContent-Type: application/json
Content
- create_entry -
- Create entries with section/entry type IDs and field dataPOST /api/entries - get_entry -
- Retrieve entry by ID with all fields and metadataGET /api/entries/<id> - update_entry -
- Update entry (prefers draft workflow)PUT /api/entries/<id> - delete_entry -
- Delete entry (soft/permanent)DELETE /api/entries/<id> - search_content -
- Search/filter entries by section/status/queryGET /api/entries/search
Drafts
- create_draft -
- Create draft from scratch or existing entryPOST /api/drafts - update_draft -
- Update draft content/metadata (PATCH semantics)PUT /api/drafts/<id> - apply_draft -
- Publish draft to canonical entryPOST /api/drafts/<id>/apply
Sections
- create_section -
- Create section with types/versioning/sitesPOST /api/sections - get_sections -
- List all or filter by IDsGET /api/sections - update_section -
- Update properties/settingsPUT /api/sections/<id> - delete_section -
- Permanently delete (removes all entries)DELETE /api/sections/<id>
Entry Types
- create_entry_type -
- Create with handle/name/layoutPOST /api/entry-types - get_entry_types -
- List with fields/usage/URLsGET /api/entry-types - update_entry_type -
- Update properties/layoutPUT /api/entry-types/<id> - delete_entry_type -
- Delete if not in useDELETE /api/entry-types/<id>
Fields
- create_field -
- Create with type and settingsPOST /api/fields - get_fields -
- List global or layout-specificGET /api/fields - get_field_types -
- List available typesGET /api/fields/types - update_field -
- Update properties/settingsPUT /api/fields/<id> - delete_field -
- Permanently delete (removes data)DELETE /api/fields/<id>
Field Layouts
- create_field_layout -
- Create empty field layout for entry typesPOST /api/field-layouts - get_field_layout -
- Get field layout structure by entry type/layout/element IDGET /api/field-layouts - add_tab_to_field_layout -
- Add tab to field layout with flexible positioning (prepend/append/before/after)POST /api/field-layouts/<id>/tabs - add_field_to_field_layout -
- Add custom field to tab with positioning, width, required, and display optionsPOST /api/field-layouts/<id>/fields - add_ui_element_to_field_layout -
- Add UI elements (heading, tip, horizontal rule, markdown, template) to layoutsPOST /api/field-layouts/<id>/ui-elements - move_element_in_field_layout -
- Move fields/UI elements within or between tabs with precise positioningPUT /api/field-layouts/<id>/elements - remove_element_from_field_layout -
- Remove fields or UI elements from field layoutDELETE /api/field-layouts/<id>/elements
Sites
- get_sites -
- List all sites with IDs/handles/URLsGET /api/sites
Assets
- create_asset -
- Upload file from local/remote URL to volumePOST /api/assets - update_asset -
- Update metadata or replace filePUT /api/assets/<id> - delete_asset -
- Delete asset and fileDELETE /api/assets/<id> - get_volumes -
- List asset volumes with IDs/URLsGET /api/volumes
System
- health -
- Health check endpoint to verify plugin installation and API availabilityGET /api/health