skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
edutrul/drupal-ai61 installs

drupal-fields

Drupal fields — field types, widgets, formatters, drush field:create, field storage/config, and accessing single-value and multi-value field values in PHP code.

How do I install this agent skill?

npx skills add https://github.com/edutrul/drupal-ai --skill drupal-fields
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides standard documentation and command-line examples for managing Drupal fields using Drush. No security issues were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Drupal Fields

Creating Fields (Drush — CLI First)

Always use drush field:create instead of manually creating field config files.

# Interactive (recommended first time)
drush field:create

# Non-interactive
drush field:create node article \
  --field-name=field_subtitle \
  --field-label="Subtitle" \
  --field-type=string \
  --field-widget=string_textfield \
  --is-required=0 \
  --cardinality=1

# Reference field
drush field:create node article \
  --field-name=field_tags \
  --field-label="Tags" \
  --field-type=entity_reference \
  --field-widget=entity_reference_autocomplete \
  --cardinality=-1 \
  --target-type=taxonomy_term

# Image field
drush field:create node article \
  --field-name=field_image \
  --field-label="Image" \
  --field-type=image \
  --field-widget=image_image \
  --is-required=0 \
  --cardinality=1

Managing Fields

# List all fields on a content type
drush field:info node article

# Delete a field
drush field:delete node.article.field_subtitle

# Discover available types/widgets/formatters
drush field:types
drush field:widgets
drush field:formatters

Export After Creating Fields

# Always export config after CLI changes
drush config:export -y

Custom Field Type (Plugin)

drush generate plugin:field:type
drush generate plugin:field:formatter
drush generate plugin:field:widget

Accessing Field Values in Code

// Single value
$value = $entity->get('field_name')->value;

// Entity reference
$referenced = $entity->get('field_ref')->entity;

// Multi-value
foreach ($entity->get('field_multi') as $item) {
  $value = $item->value;
}

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/edutrul/drupal-ai/drupal-fields">View drupal-fields on skillZs</a>