xiaohongshu
xiaohongshu
component-scaffolding
Generate Drupal/Twig component skeletons with web components and Miyagi validation. Use when user requests to create, scaffold, or add a new component at a specific path (e.g., "add component skeleton at patterns/share-button"), or when creating component files including Twig templates, CSS, Java...
Full skill instructions
Generate component skeletons for a Drupal theme using Twig, web components, and Miyagi for validation.
This skill assumes it lives within a component library project, e.g.:
apps/component-library/
├── .claude/
│ └── skills/
│ └── component-scaffolding/ ← this skill
├── src/
│ ├── components/
│ └── css/
└── <theme-name>.libraries.yml
The component library root is three levels up from this skill (i.e., ../../.. relative to this SKILL.md).
The <theme-name> placeholder must be replaced with the actual Drupal theme name. To determine it:
*.libraries.yml file — the filename prefix is the theme namecircle_dot.libraries.yml → theme name is circle_dotIf the theme name cannot be determined from existing files, ask the user.
<component-name>.twig{{ attach_library("<theme-name>/pattern-<component-name>") }}
<div class="<ComponentName>">
{# Component implementation #}
</div>
pattern-<component-name> (kebab-case)<ComponentName> (PascalCase)<component-name>.css/** @define <ComponentName>; */
.<ComponentName > {
/* Component styles */
}
@define comment<component-name>.jsOnly create if explicitly needed. Skip if user says "no JavaScript", "CSS only", etc.
// @ts-check
class <ComponentName> extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.#addEventListeners();
}
/**
* Add event listeners
*/
#addEventListeners() {
// Add event listeners here
}
}
customElements.define("<component-name>", <ComponentName>);
#addEventListeners() method in skeleton#elements field or #getElements() methodschema.yaml$schema: http://json-schema.org/draft-07/schema#
$id: /<tier>/<component-name>
type: object
required:
- property1
additionalProperties: false
properties:
$id matches component tier pathrequired array with placeholder namesproperties: empty in skeletonFor detailed schema patterns, see references/schema-and-mocks.md.
mocks.yaml
For mock data patterns, see references/schema-and-mocks.md.
src/css/<component-name>.css@import url("../components/<tier>/<component-name>/<component-name>.css")
layer(components);
Note: If the component is an element, you can use the
elements.cssentry point instead.
<theme-name>.libraries.ymlAdd entry alphabetically within the appropriate tier section:
pattern-<component-name>:
header: true
css:
component:
build/assets/css/<component-name>.css: {}
js:
build/assets/components/<tier>/<component-name>/<component-name>.js:
attributes:
type: module
js: block entirely if no JavaScript file is createdcss: block entirely if the component is an element| Item | Format | Example |
|---|---|---|
| Directory/files | kebab-case | share-button |
| CSS class | PascalCase | ShareButton |
| JS class | PascalCase | class ShareButton |
| Custom element | kebab-case, NO prefix | share-button |
| Library name | <prefix>-<kebab> | pattern-share-button |
| Schema $id | /<tier>/<kebab> | /patterns/share-button |
| Tier | Location | Library Prefix |
|---|---|---|
| Elements | src/components/elements/ | element- |
| Patterns | src/components/patterns/ | pattern- |
| Template Components | src/components/template-components/ | template-component- |
| Templates | src/components/templates/ | template- |
src/components/<tier>/<component-name>/src/css/<component-name>.css<theme-name>.libraries.yml (alphabetically in tier section)Pay attention to user requests indicating which files to skip:
| User says | Action |
|---|---|
| "no JavaScript" / "CSS only" | Skip .js file, omit js: from library |
| "no CSS" / "JavaScript only" | Skip .css files, omit css: from library |
| "schema only" / "just the schema" | Create only schema.yaml |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience