agentleFS
MindrallyMindrally/skills/drupal-development/SKILL.md

drupal-development

Skill266 starsChanged 10 months agoApache-2.0View on GitHub

Expert guidance for Drupal 10 module development with PHP 8+, SOLID principles, and Drupal coding standards

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 18 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, technically accurate PHP code with proper Drupal API examples

    line 12
  2. Distinctive:

    Follow SOLID principles for object-oriented programming

    line 13
  3. Distinctive:

    Follow the DRY principle

    line 14
  4. Distinctive:

    Use PHP 8.1+ features (typed properties, match expressions, named arguments)

    line 20
  5. Distinctive:

    Follow PSR-12 coding standards

    line 21
  6. Distinctive:

    Use type hints for all parameters and return types

    line 24
  7. Distinctive:

    Use Drupal's database API instead of raw SQL queries

    line 28
  8. Distinctive:

    Use Queue API for background processing

    line 32
  9. Distinctive:

    Follow the configuration management system

    line 34
  10. Distinctive:

    Use Drupal's entity system and Field API appropriately

    line 35
  11. Distinctive:

    Use Form API for all form handling

    line 37
  12. Distinctive:

    Follow single responsibility principle

    line 42
  13. Distinctive:

    Use route parameters appropriately

    line 50
  14. Very specific:

    Use hook_schema() for database table definitions

    line 53
  15. Distinctive:

    Follow proper versioning for updates

    line 55
  16. Distinctive:

    Use Drupal's event system for decoupled code

    line 58
  17. Distinctive:

    Create custom events when appropriate

    line 59
  18. Distinctive:

    Use proper validation and submission handlers

    line 64
  19. Distinctive:

    Use proper access controls

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.