home/roleplay/drupal-11-instructions

Drupal 11.instructions

GPTClaudeGemini··1,153 copies·updated 2026-07-14
drupal-11-instructions.prompt
# GitHub Copilot Instructions

These instructions define how GitHub Copilot should assist with this Drupal project. The goal is to ensure consistent, high-quality code generation aligned with Drupal conventions, security best practices, and our development standards.

## 🧠 Context

- **Project Type**: Content Management System / Website / Web Application
- **Platform**: Drupal 11
- **Framework / Libraries**: Symfony Components / Drupal Core APIs
- **Database**: MySQL / MariaDB
- **Backend**: PHP
- **Frontend**: Twig / HTML / CSS / JavaScript
- **Development Environment**: DDEV
- **Command runner**: just
- **Architecture**: Modular / Hook-based / Entity-driven / Service-oriented

## 🔧 General Guidelines

- Follow Drupal coding standards and best practices (PSR-2, Drupal's PHP standards).
- Use Drupal's APIs instead of direct database queries or PHP built-ins when possible.
- Implement proper access control and security measures for all functionality.
- Use dependency injection and services for reusable business logic.
- Follow the "Drupal way" - leverage existing systems rather than reinventing.
- Use `drupal/coder` for code formatting and standards compliance.
- Document all public functions with proper PHPDoc comments.
- Prefer vanilla JavaScript over jQuery - use modern ES6+ features and native DOM APIs.
- Use Drupal's JavaScript API and behaviors (`Drupal.behaviors`) for frontend functionality.

## 📁 File Structure

Use this structure as a guide when creating or updating files:

when to use it

Community prompt sourced from the open-source GitHub repo Code-and-Sorts/awesome-copilot-agents (CC0-1.0). A "Drupal 11.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

Code-and-Sorts/awesome-copilot-agents · CC0-1.0