Create reusable custom blocks and plugins with disciplined naming and configuration. Provides guidance on block type creation, field planning, view mode reuse, and caching expectations for Drupal blocks.

GitHub stars
35

Install

/plugin install drupal-blocks@drupal-best-practices

Run it inside Claude Code after adding the marketplace with /plugin marketplace add theodorosploumis/drupal-best-practices.

Contents

Discovered from source

Skills 1

Description

Guide Claude to design custom block types and plugins that are portable, reusable, and consistently named across environments.

Usage

  • Request machine name and admin label suggestions that omit regions and block_ prefixes.
  • Ask for field plans that mirror node/paragraph standards when blocks need structured data.
  • Have Claude propose view mode reuse and caching expectations for each block display.

Guardrails

  • Prefer block types or plugins committed to code; avoid UUID-specific content blocks.
  • Keep machine names short, region-agnostic, and human-readable.
  • Treat block fields and view modes like node bundles for documentation and reuse.

Validation

./ai/scripts/validate-blocks.sh

Run from a bootstrapped site to flag naming and descriptive gaps.

References

  • Drupal Best Practices README.
  • Separate content from placement; regions and layouts are runtime concerns.

Sponsors

Details

Marketplace
theodorosploumis/drupal-best-practices
Source
ai/skills/blocks
Category
Community

More from theodorosploumis/drupal-best-practices

All 10