drupal-views-dev

Expose custom Drupal data to Views and create custom Views plugins.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/proofoftom/drupal-skills --skill drupal-views-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-views-dev
Source: https://github.com/proofoftom/drupal-skills/tree/main/skills/drupal-views-dev
Command: npx skills add https://github.com/proofoftom/drupal-skills --skill drupal-views-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you make your Drupal data easily discoverable and filterable within the Views UI, and allows for custom logic when built-in Views functionality isn't enough.

Core Features & Use Cases

  • Expose Custom Tables: Use hook_views_data() to make your module's database tables available in Views.
  • Entity Views Integration: Automatically expose entity base fields to Views using entity annotations/attributes.
  • Custom Plugins: Create custom Views field, filter, sort, and argument plugins for advanced data manipulation and display.
  • Alter Existing Views: Modify Views data definitions from other modules using hook_views_data_alter().
  • Use Case: You've created a custom content entity for "Events" and want site builders to be able to create Views listings of these events, filter them by date, and sort them by title. This Skill enables that integration.

Quick Start

Use the drupal-views-dev skill to expose a custom table named 'players' with 'id' and 'name' columns to Views.

Frequently Asked Questions about drupal-views-dev

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

FAQPage Schema
How do I expose custom database tables to Drupal Views?

To expose custom database tables to Drupal Views, implement `hook_views_data()` in your module to define table schemas, relationships, and fields. This makes your non-entity data discoverable and filterable within the Views UI.

How does entity integration work with Drupal Views?

Entity integration with Drupal Views works automatically by using entity annotations or attributes to expose base fields. This allows site builders to create Views listings, filter data, and sort content entities without manual data definitions.

How do I create custom Views plugins for fields, filters, and sorts?

You create custom Views plugins for fields, filters, and sorts by developing specific plugin classes that extend Views base functionality. This allows for advanced data manipulation and custom display logic when built-in Views features are insufficient.

Can I alter existing Views data definitions from other modules?

Yes, you can alter existing Views data definitions from other modules by implementing `hook_views_data_alter()`. This allows you to modify, override, or extend how external modules expose their database tables and fields to the Views UI.

When do I need custom Views plugins instead of built-in Views fields?

You need custom Views plugins when built-in Views functionality cannot handle your advanced data manipulation or display requirements. Custom field, filter, sort, and argument plugins provide the necessary logic for complex custom entity integration.

What is the best way to integrate a custom content entity with Views?

The best way to integrate a custom content entity with Views is by using entity annotations or attributes to automatically expose base fields. This enables site builders to filter by date and sort by title directly within the Views UI.