drupal-plugins-blocks

Community

Build custom Drupal blocks and plugins.

Authorproofoftom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill streamlines the creation of custom block plugins and reusable plugin types within Drupal, ensuring correct dependency injection and adherence to Drupal's plugin system best practices.

Core Features & Use Cases

  • Block Plugin Creation: Scaffold new block plugins with annotations (D10) or attributes (D11).
  • Configuration Forms: Implement forms for block configuration, including default values, validation, and submission handling.
  • Custom Plugin Types: Define and manage custom plugin managers, interfaces, and annotations/attributes for extensible Drupal modules.
  • Dependency Injection: Correctly inject services into plugins using the ContainerFactoryPluginInterface and the 4-parameter create() method.
  • Use Case: Develop a custom block that displays recent blog posts, allowing administrators to configure the number of posts to show and the cache duration via a dedicated form.

Quick Start

Create a Drupal block plugin for a Drupal 11 site that displays a simple message and uses dependency injection.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: drupal-plugins-blocks
Download link: https://github.com/proofoftom/drupal-skills/archive/main.zip#drupal-plugins-blocks

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.