drupal-taxonomy

drupal-taxonomy is a skill for Claude Code, Codex from edutrul/drupal-ai. It costs 34 tokens per session (648 once invoked), scanned A, original, MIT.

Una guía para trabajar con Taxonomy de Drupal, el sistema que organiza contenido mediante vocabularios y términos, parecidos a categorías y etiquetas. Incluye patrones para consultar, crear y relacionar esos términos desde PHP o Twig.

In plain words
What is it for?
Cargar términos por identificador, nombre o vocabulario, crear términos, consultar jerarquías y trabajar con campos que referencian términos.
Why use it?
Evita tener que recordar cómo cargar términos, buscar jerarquías o conectar categorías con campos de contenido. También ayuda a mantener consultas y accesos coherentes.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/edutrul/drupal-ai/drupal-taxonomy
Any agent
npx skills add edutrul/drupal-ai --skill drupal-taxonomy
Clone the repo
git clone --depth 1 https://github.com/edutrul/drupal-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drupal-taxonomy

README.md
[![agentmods](https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-taxonomy.svg)](https://agentmods.dev/skills/edutrul/drupal-ai/drupal-taxonomy)
Your own site
<a href="https://agentmods.dev/skills/edutrul/drupal-ai/drupal-taxonomy"><img src="https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-taxonomy.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 648 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.00648
Opus 5 $0.00017 $0.00324
Sonnet 5 $0.00007 $0.00130
Haiku 4.5 $0.00003 $0.00065

Measured 4d ago against content hash 13f603196d8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

drupal-taxonomy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/drupal-taxonomy/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drupal Taxonomy

Loading Terms

// Load term by ID
$term = $this->entityTypeManager->getStorage('taxonomy_term')->load($tid);

// Load multiple terms
$terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadMultiple($tids);

// Load terms by vocabulary
$terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties([
  'vid' => 'tags',
  'status' => 1,
]);

// Load term by name
$terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties([
  'vid' => 'tags',
  'name' => 'My Tag',
]);
$term = reset($terms);

Entity Query for Terms

$query = $this->entityTypeManager->getStorage('taxonomy_term')->getQuery()
  ->accessCheck(TRUE)
  ->condition('vid', 'tags')
  ->condition('status', 1)
  ->sort('weight', 'ASC')
  ->sort('name', 'ASC');

$tids = $query->execute();
$terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadMultiple($tids);

Creating Terms

$term = $this->entityTypeManager->getStorage('taxonomy_term')->create([
  'vid' => 'tags',
  'name' => 'New Tag',
  'description' => [
    'value' => 'Tag description',
    'format' => 'basic_html',
  ],
  'parent' => [['target_id' => $parent_tid]],
  'weight' => 0,
]);
$term->save();

Term Hierarchy

// Get parent terms
$parents = $this->entityTypeManager->getStorage('taxonomy_term')->loadParents($tid);

// Get children
$children = $this->entityTypeManager->getStorage('taxonomy_term')->loadChildren($tid);

// Get all tree (flat)
$tree = $this->entityTypeManager->getStorage('taxonomy_term')->loadTree('tags');
foreach ($tree as $item) {
  $tid = $item->tid;
  $name = $item->name;
  $depth = $item->depth;
  $parents = $item->parents;
}

Term Field Values

$name = $term->getName();           // getName() shortcut
$vid = $term->bundle();             // Vocabulary ID
$tid = $term->id();
$description = $term->get('description')->value;
$weight = $term->getWeight();

In Twig

{# Render term field #}
{{ content.field_tags }}

{# Access term entity from a reference field #}
{% for item in node.field_tags %}
  {{ item.entity.name.value }}
{% endfor %}

Read the full file on GitHub · 101 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 101 lines · 34 tokens per session scan A 13f603196d8a

Subscribe to this mod's changes

drupal-taxonomy is a skill published in the GitHub repository edutrul/drupal-ai (71 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 648 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.