new-section

Scaffold deco.cx sections with typed props and optional islands.

13|2|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/decocms/storefront-skills --skill new-section-decocms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-section
Source: https://github.com/decocms/storefront-skills/tree/main/.claude-deco/skills/new-section
Command: npx skills add https://github.com/decocms/storefront-skills --skill new-section-decocms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffold speed and consistency for adding new deco.cx Sections by providing a ready-to-use boilerplate that enforces server-side rendering with Preact and Tailwind, typed props, and optional loaders. This helps teams avoid boilerplate drift and ensures new sections follow the same structure and conventions.

Core Features & Use Cases

  • Generate a compliant section file (sections/MySection.tsx) with proper Tailwind usage, server-side rendering, and TypeScript props.
  • Support optional islands for client-side behavior and optional loaders for data fetching.
  • Use in scenarios where a new storefront section needs to be quickly added to a Deco storefront, tested, and deployed with consistent structure and conventions.

Quick Start

Use this scaffold to create a new deco.cx Section by providing the desired section name and file path; the system will generate the TSX section and required scaffolding following the conventions.

Frequently Asked Questions about new-section

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new deco.cx section with typed props?

To scaffold a new deco.cx section, provide the desired section name and file path to generate a TSX file with TypeScript props, Preact server-side rendering, and Tailwind conventions. This ensures consistent boilerplate across your storefront.

What is the best way to add client-side behavior to a deco.cx section?

The best way to add client-side behavior to a deco.cx section is by using islands within your server-rendered Preact components. The scaffolding process supports optional islands to handle interactive features without breaking the SSR structure.

How do I add loaders for data fetching in a deco.cx section?

You can add loaders for data fetching by including optional loaders during the scaffolding process. This generates the required boilerplate to fetch data server-side and pass it to your Preact section components.

Does deco.cx scaffolding enforce server-side rendering with Preact and Tailwind?

Yes, deco.cx scaffolding enforces server-side rendering with Preact and Tailwind. It generates a compliant section file that uses proper Tailwind utility classes and follows strict SSR conventions to prevent boilerplate drift.

Can I use this section scaffolding to maintain consistent boilerplate across my team?

Yes, you can use this scaffolding to maintain consistent boilerplate across your team. It ensures all new storefront sections follow the exact same structure, typed props, and conventions, preventing structural drift during rapid development.

What limitations exist when scaffolding deco.cx sections with typed props?

A limitation is that the scaffolding requires a valid root SKILL.md with a name and description to proceed. It also strictly enforces Preact and Tailwind, meaning it is not suitable for teams using alternative frontend frameworks.