drupal-queries

Execute parameterized Drupal database queries with CRUD operations and transactions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drupal developers often struggle with building safe, efficient database queries across custom tables and core structures without risking SQL injection.

Core Features & Use Cases

  • Parameterized queries: use Drupal's database API to bind values safely and prevent injection.
  • Full CRUD with transactions: perform Select, Insert, Update, Delete operations, including transactional consistency.
  • Flexible data access: join custom tables and use the abstraction layer for portable queries across environments.

Quick Start

Use the skill to fetch article titles from node data by type using a parameterized query.

Frequently Asked Questions about drupal-queries

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

FAQPage Schema
How do I write safe parameterized database queries in Drupal?

To write safe parameterized database queries in Drupal, you use the Drupal database API to bind values securely, preventing SQL injection while executing SELECT, INSERT, UPDATE, and DELETE operations across custom tables and content entities.

Can I use Drupal database transactions for custom table operations?

Yes, you can use Drupal database transactions to ensure consistency when performing multiple Insert, Update, or Delete operations on custom tables and content entities within a single workflow.

What is the best way to join custom tables in a Drupal database query?

The best way to join custom tables in a Drupal database query is by using the Drupal database abstraction layer, which allows flexible data access and portable query construction across different environments.

Do I need the database service dependency to execute SQL queries in Drupal?

Yes, you need the database service dependency to execute SQL queries in Drupal, as the skill requires it to enforce parameter binding and safely interact with the underlying database layer.

How do I prevent SQL injection when fetching node data by type in Drupal?

You prevent SQL injection when fetching node data by type in Drupal by applying parameterized queries through the Drupal database API, ensuring that all values are safely bound before execution.