drupal-development
Mindrally/skills/drupal-development/SKILL.md
Expert guidance for Drupal 10 module development with PHP 8+, SOLID principles, and Drupal coding standards
Skill258 starsChanged 8 months ago
What's in it
- Drupal Development
- Core Principles
- PHP Standards
- Drupal Best Practices
- Code Architecture
- Services
- Routing
- Schema and Updates
- Events
- Forms
- Security
--- name: drupal-development description: Expert guidance for Drupal 10 module development with PHP 8+, SOLID principles, and Drupal coding standards --- # Drupal Development You are an expert Drupal 10 developer with deep knowledge of PHP 8+, object-oriented programming, and SOLID principles. ## Core Principles - Write concise, technically accurate PHP code with proper Drupal API examples - Follow SOLID principles for object-oriented programming - Follow the DRY principle - Adhere to Drupal coding standards - Leverage the service container and plugin system ## PHP Standards - Use PHP 8.1+ features (typed properties, match expressions, named arguments) - Follow PSR-12 coding standards - Declare strict typing: `declare(strict_types=1);` - Implement proper error handling using Drupal's logging system - Use type hints for all parameters and return types ## Drupal Best Practices - Use Drupal's database API instead of raw SQL queries - Implement Repository pattern for data access logic - Utilize the service container for dependency injection - Leverage Drupal's caching API for performance optimization - Use Queue API for background processing - Implement comprehensive PHPUnit testing - Follow the configuration management system - Use Drupal's entity system and Field API appropriately - Implement hooks properly following Drupal conventions - Use Form API for all form handling ## Code Architecture ### Services - Follow single responsibility principle - Register services properly in `services.yml` - Use dependency injection - Tag services appropriately for discovery ### Routing - Define routes in `module.routing.yml` - Implement proper access checks - Use route parameters appropriately ### Schema and Updates - Use `hook_schema()` for database table definitions - Implement update hooks for schema changes - Follow proper versioning for updates ### Events - Use Drupal's event system for decoupled code - Create custom events when appropriate - Subscribe to core events properly ### Forms - Implement form handlers using Form API - Use proper validation and submission handlers - Implement AJAX forms when needed ### Security - Sanitize all user input - Implement CSRF protection - Use proper access controls - Escape output appropriately
More agent context in Mindrally/skills
264 other files this repository gives its agents, the first 60 shown.
Skill
- accessibility-a11yaccessibility-a11y/SKILL.md
- alpine-jsalpine-js/SKILL.md
- analytics-data-analysisanalytics-data-analysis/SKILL.md
- android-developmentandroid-development/SKILL.md
- angular-developmentangular-development/SKILL.md
- angularangular/SKILL.md
- anime-jsanime-js/SKILL.md
- anthropic-claude-developmentanthropic-claude-development/SKILL.md
- api-developmentapi-development/SKILL.md
- apollo-graphqlapollo-graphql/SKILL.md
- aspnet-coreaspnet-core/SKILL.md
- astroastro/SKILL.md
- auth0-authenticationauth0-authentication/SKILL.md
- autogen-developmentautogen-development/SKILL.md
- automl-hyperparameter-optimizationautoml-hyperparameter-optimization/SKILL.md
- aws-developmentaws-development/SKILL.md
- azureazure/SKILL.md
- backend-developmentbackend-development/SKILL.md
- bash-scriptingbash-scripting/SKILL.md
- beautifulsoup-parsingbeautifulsoup-parsing/SKILL.md
- bitbucket-workflowbitbucket-workflow/SKILL.md
- blazorblazor/SKILL.md
- blender-python-addonblender-python-addon/SKILL.md
- blockchainblockchain/SKILL.md
- bootstrapbootstrap/SKILL.md
- business-central-developmentbusiness-central-development/SKILL.md
- cheerio-parsingcheerio-parsing/SKILL.md
- chrome-extension-developmentchrome-extension-development/SKILL.md
- ci-cd-best-practicesci-cd-best-practices/SKILL.md
- clean-architectureclean-architecture/SKILL.md
- clean-codeclean-code/SKILL.md
- clerk-authenticationclerk-authentication/SKILL.md
- cloudflare-developmentcloudflare-development/SKILL.md
- computer-vision-opencvcomputer-vision-opencv/SKILL.md
- convexconvex/SKILL.md
- cppcpp/SKILL.md
- c-sharpc-sharp/SKILL.md
- csscss/SKILL.md
- cypresscypress/SKILL.md
- data-analysis-jupyterdata-analysis-jupyter/SKILL.md
- data-analystdata-analyst/SKILL.md
- data-jupyter-pythondata-jupyter-python/SKILL.md
- deep-learning-pythondeep-learning-python/SKILL.md
- deep-learning-pytorchdeep-learning-pytorch/SKILL.md
- deep-learningdeep-learning/SKILL.md
- deno-typescriptdeno-typescript/SKILL.md
- design-systemsdesign-systems/SKILL.md
- devopsdevops/SKILL.md
- django-pythondjango-python/SKILL.md
- django-rest-api-developmentdjango-rest-api-development/SKILL.md
- dockerdocker/SKILL.md
- dotnetdotnet/SKILL.md
- drizzle-ormdrizzle-orm/SKILL.md
- elasticsearch-best-practiceselasticsearch-best-practices/SKILL.md
- electron-developmentelectron-development/SKILL.md
- elixirelixir/SKILL.md
- embedded-stm32embedded-stm32/SKILL.md
- esbuild-bundleresbuild-bundler/SKILL.md
- ethereumethereum/SKILL.md
- expo-react-native-javascript-best-practicesexpo-react-native-javascript-best-practices/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

