drupal-routes

Automate Drupal route definitions and access control configuration for modules.

67|13|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/edutrul/drupal-ai --skill drupal-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-routes
Source: https://github.com/edutrul/drupal-ai/tree/main/.claude/skills/drupal-routes
Command: npx skills add https://github.com/edutrul/drupal-ai --skill drupal-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines the creation and maintenance of Drupal routes, permissions, and URL generation by providing clear patterns for routing.yml, controllers, and access control in Drupal modules.

Core Features & Use Cases

  • Routing definitions via routing.yml and controller wiring for pages and admin interfaces
  • Access control patterns using _permission, _custom_access, and _entity_access
  • URL and link generation support with dynamic titles via _title_callback
  • Scaffolding helpers for common Drupal route structures, forms, and admin paths

Quick Start

Create a basic route with a controller and a permission check to expose a page.

Frequently Asked Questions about drupal-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define Drupal routes and controllers for custom modules?

You define Drupal routes by generating routing.yml syntax and wiring controllers. This provides patterns for mapping paths to controller methods and generating working URLs across modules.

How do I set up access control for Drupal admin routes?

Access control for Drupal routes uses _permission, _custom_access, and _entity_access patterns. This ensures secure admin paths and settings routes by enforcing proper user permissions before page access.

What is the best way to generate dynamic titles for Drupal routing paths?

Dynamic titles for Drupal routing paths use the _title_callback pattern. This allows a controller method to generate context-aware titles dynamically during URL generation rather than relying on static text.

Can I use this to scaffold routing.yml for both pages and admin settings?

Yes, you can scaffold routing.yml for both standard pages and admin settings routes. It provides structural helpers for common Drupal route patterns, forms, and administrative path configurations.

How does parameter handling work in Drupal module route definitions?

Parameter handling in Drupal route definitions allows controllers to receive dynamic URL arguments directly. This automates the extraction and passing of route parameters to controller methods for processing.