Expert guidance for Drupal 10 module development with PHP 8+, SOLID principles, and Drupal coding standards
Install
npx skills add https://github.com/mindrally/skills --skill drupal-developmentSKILL.md
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
Related skills
entra-app-registrationmicrosoft606KGuides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.azure-messagingmicrosoft595KTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, servicentra-agent-idmicrosoft328KProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registsupabasesupabase298KUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); deb