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.
npx skills add edutrul/drupal-ai --skill drupal-javascriptgit clone --depth 1 https://github.com/edutrul/drupal-aiWrote 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.
[](https://agentmods.dev/skills/edutrul/drupal-ai/drupal-javascript)<a href="https://agentmods.dev/skills/edutrul/drupal-ai/drupal-javascript"><img src="https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-javascript/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/edutrul/drupal-ai/drupal-javascript"><img src="https://agentmods.dev/badge/skills/edutrul/drupal-ai/drupal-javascript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.00668 |
| Opus 5.5 | $0.00013 | $0.00267 |
| Sonnet 5.5 | $0.00007 | $0.00134 |
| Haiku 4.5 | $0.00003 | $0.00067 |
Grade A, and why
drupal-javascript 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal JavaScript
Defining a Library (*.libraries.yml)
# my_module.libraries.yml
my-behavior:
version: 1.0
js:
js/my-behavior.js: {}
css:
component:
css/my-style.css: {}
dependencies:
- core/drupal
- core/jquery
- core/once
Drupal Behavior Pattern
// js/my-behavior.js
(function (Drupal, once) {
'use strict';
Drupal.behaviors.myBehavior = {
attach(context, settings) {
// Use `once` to prevent double-processing
once('my-behavior', '.my-selector', context).forEach(function (element) {
// Process element
element.addEventListener('click', function (e) {
e.preventDefault();
// Handle click
});
});
},
detach(context, settings, trigger) {
// Clean up if needed (e.g., 'unload' trigger)
},
};
}(Drupal, once));
Attaching a Library in Twig
Attach a JavaScript/CSS library from a Twig template:
{{ attach_library('my_module/my-behavior') }}
Accessing drupalSettings in JS
Drupal.behaviors.myBehavior = {
attach(context, settings) {
const myKey = settings.myModule?.key;
if (myKey) {
console.log('Value:', myKey);
}
},
};
AJAX Commands from PHP
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\ReplaceCommand;
use Drupal\Core\Ajax\InvokeCommand;
use Drupal\Core\Ajax\HtmlCommand;
$response = new AjaxResponse();
$response->addCommand(new ReplaceCommand('#wrapper', $build));
$response->addCommand(new HtmlCommand('#message', $this->t('Done!')));
$response->addCommand(new InvokeCommand('.my-class', 'addClass', ['active']));
return $response;
Custom AJAX Command
// Register command
Drupal.AjaxCommands.prototype.myCommand = function (ajax, response, status) {
document.querySelector(response.selector).textContent = response.data;
};
// PHP side
use Drupal\Core\Ajax\CommandInterface;
final class MyCommand implements CommandInterface {
public function __construct(
private readonly string $selector,
private readonly string $data,
) {}
public function render(): array {
return [
'command' => 'myCommand',
'selector' => $this->selector,
'data' => $this->data,
];
}
}
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.
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.
- 3mo ago First seen · 124 lines · 33 tokens per session scan A daef6ee73162
drupal-javascript is a skill published in the GitHub repository edutrul/drupal-ai (75 stars, last pushed 5mo ago), licensed MIT. It adds 33 tokens to every session and 668 once invoked, about $0.0001 per session on Opus 5.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.
drupal-javascript compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| drupal-javascriptedutrul/drupal-ai | Skill | 75 | 5mo ago | MIT | A | 33 | Claude Code |
| redteam-web-detail-packNetw0rkNoob/VulnClaw | Skill | 4.0k | 1mo ago | MIT | A | 38 | Claude Code, Codex |
| android-pentestNetw0rkNoob/VulnClaw | Skill | 4.0k | 1mo ago | MIT | A | 32 | Claude Code, Codex |
| schedule-querychrisblattman/claudeblattman | Skill | 498 | 12d ago | MIT | A | 17 | Claude Code |
| manage-schemasjpicklyk/task-orchestrator | Skill | 215 | today | MIT | A | 207 | Claude Code |
| authentication-patternstravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 28 | Claude Code |
| lighting-report-extractAlpacaLabsLLC/skills-for-architects | Skill | 450 | 5d ago | MIT | A | 37 | Claude Code |