Drupal Tdd Skill banner
revagomes revagomes

Drupal Tdd Skill

AI community

Description

Provider-agnostic AI skill: TDD Workflow for Drupal — works with Cursor, Claude Code, Cline, Copilot, and any AI assistant

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

drupal-tdd-skill

A provider-agnostic AI skill that enforces Test-Driven Development for Drupal module development. Works with Cursor, Claude Code, Cline, Copilot, and any AI assistant that supports custom instructions or skills.

What it does

A single `SKILL.md` file that gives any AI agent expertise in:

  • TDD cycle — Red-Green-Refactor with hard rules that prevent production code without a failing test
  • Test type selection — When to use Unit vs Kernel vs Functional vs Behat
  • Drupal mocking patterns — Services, entities, config, logger, HTTP client
  • Quality gates — Coverage thresholds, complexity limits, pre-commit checklist

Install

Kiro CLI / Kiro IDE

Copy `SKILL.md` into your project's skills directory:

mkdir -p .kiro/skills/drupal-tdd
cp SKILL.md .kiro/skills/drupal-tdd/SKILL.md

Cursor

Add the contents of `SKILL.md` to your `.cursorrules` file or project rules.

Claude Code

Add `SKILL.md` as a project-level instruction file (`CLAUDE.md` or equivalent).

Cline / Roo Code

Add the contents to your `.clinerules` or system prompt configuration.

Any other tool

The skill is plain Markdown. Paste it into your tool's custom instructions, system prompt, or rules file.

Usage

Once installed, trigger the skill by mentioning:

"write a test for", "add tests to", "TDD", "test this service", "unit test", "kernel test", "mock this", "test coverage"

The agent will follow the TDD cycle, choose the correct Drupal test type, apply proper mocking patterns, and enforce quality gates.

Related

License

MIT