scaffold
SKILL.md
CMS Scaffold Generator
You generate production-ready code for CMS projects. You detect the CMS platform first, then generate platform-specific files.
Usage
/plugin-cms-toolkit:scaffold <type> <name>
Types: component, content-type, controller, page
Examples:
/plugin-cms-toolkit:scaffold component HeroBanner
/plugin-cms-toolkit:scaffold content-type ArticlePage
/plugin-cms-toolkit:scaffold controller Search
/plugin-cms-toolkit:scaffold page LandingPage
Step 1: Detect CMS
Before generating, determine the CMS platform:
- Look for
sitecore.jsonorSitecore.*NuGet refs → Sitecore - Look for
Umbraco.Cms.*NuGet refs or Umbraco config → Umbraco - Look for
Optimizely.*orEPiServer.*NuGet refs → Optimizely - If unclear, ask the user which CMS to target
Also determine the architecture:
- Headless:
next.config.*, JS SDK refs, Content SDK → generate frontend component + CMS definition - Traditional .NET: MVC controllers, Razor views → generate C# code + views
Step 2: Scan Project Conventions
Before generating files, scan the existing codebase to match conventions:
- Find existing components/controllers to match file organization and coding style
- Check namespace patterns in existing
.csfiles - Check import patterns in existing
.tsx/.tsfiles - Match existing indentation (tabs vs spaces, width)
- Follow existing folder structure
Step 3: Generate
component — UI Component with CMS Integration
Sitecore (Headless / Content SDK):
src/components/<Name>.tsx— React component with Content SDK field helpers- Props interface with typed Sitecore fields
- Uses
Text,RichText,Image,Linkfrom@sitecore-jss/sitecore-jss-nextjsor@sitecore/content-sdk - Includes
ComponentRenderingprop typing
Sitecore (Traditional MVC):
Feature/<Feature>/code/Controllers/<Name>Controller.cs— Controller renderingFeature/<Feature>/code/Models/<Name>Model.cs— Glass Mapper modelFeature/<Feature>/code/Views/<Name>/<Name>.cshtml— Razor view
Umbraco (Razor):
Views/Partials/<Name>.cshtml— Partial view using ModelsBuilder types- For blocks:
Views/Partials/blocklist/Components/<Name>.cshtml - Strong-typed with
@inherits UmbracoViewPage<BlockListItem>
Umbraco (Headless):
- Frontend component file (React/Next.js) consuming Content Delivery API
- Type definitions matching the Umbraco content structure
Optimizely (CMS 12):
Models/Blocks/<Name>Block.cs— Block content type with[ContentType]attributeViews/Shared/Blocks/<Name>Block.cshtml— Razor partial view- Or
Components/<Name>BlockViewComponent.csfor ViewComponent pattern
Optimizely (SaaS / Headless):
- React component using JS SDK
- Content type JSON definition for REST API registration
content-type — Content Model Definition
Sitecore:
- Serialization item (
.yml) for the template under/sitecore/templates/ - Template sections with fields
- Standard Values item
__Standard valuesserialization entry- Adds include rule to the appropriate
*.module.json
Umbraco:
Models/<Name>.cs— ModelsBuilder-compatible class (if SourceCodeManual)- Document type registration via composition pattern
- Suggests property editors for common fields
- Includes property validation attributes
Optimizely (CMS 12):
Models/Pages/<Name>Page.csorModels/Blocks/<Name>Block.cs[ContentType]attribute with GUID, DisplayName, Description, GroupName- Properties with
[Display]attributes organized by tabs - Appropriate field types (
XhtmlString,ContentArea,ContentReference, etc.)
Optimizely (SaaS):
- JSON content type definition for REST API
- Properties with types, display names, localization settings
controller — Backend Controller
Sitecore (Traditional):
Controllers/<Name>Controller.cs— inheritsSitecoreController- Index action with datasource item access
- ViewModel class
Umbraco:
Controllers/<Name>Controller.cs—RenderControllerorSurfaceController- For forms:
SurfaceControllerwith[HttpPost],[ValidateAntiForgeryToken] - For API:
UmbracoApiControllerwith route attribute - ViewModel if needed
Optimizely (CMS 12):
Controllers/<Name>PageController.cs— inheritsPageController<T>- ViewModel with
CurrentPageproperty mapping - For API: standard
ApiControllerwith content service injection
page — Full Page Type with Template
Sitecore:
- Template serialization YAML with all sections (Content, Hero, SEO, Metadata)
- Standard Values with default layout and presentation details
- Content SDK page component (
src/components/<Name>Page.tsx) or MVC view - Route entry if needed
Umbraco:
- Document type class with common page compositions (SEO, OpenGraph, Navigation)
- Matching Razor template (
Views/<Name>.cshtml) with layout - Master template integration
Optimizely (CMS 12):
- Page type class (
Models/Pages/<Name>Page.cs) with standard page properties - Controller (
Controllers/<Name>PageController.cs) - View (
Views/<Name>Page/Index.cshtml) with layout - ViewModel class
Optimizely (SaaS):
- JSON content type definition (baseType: "page")
- React page component via JS SDK
Step 4: Post-Generation
After generating files:
- List all created files with brief descriptions
- Note any manual steps needed (e.g., "Register this template in Sitecore", "Run
dotnet sitecore ser push") - Suggest related scaffolds (e.g., after creating a content-type, suggest creating a matching component)
Naming Rules
Always follow CMS-specific naming conventions:
- Sitecore: PascalCase for templates and fields, component file matches rendering name
- Umbraco: camelCase for aliases, PascalCase for class names, readable labels
- Optimizely: PascalCase for class names and properties, suffix types with
Page/Block/File
Weekly Installs
1
Repository
twofoldtech-dak…-toolkitGitHub Stars
1
First Seen
11 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1