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 agentmods add skills/edutrul/drupal-ai/drupal-javascriptnpx skills add edutrul/drupal-ai --skill drupal-javascriptgit clone --depth 1 https://github.com/edutrul/drupal-aiWhat 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 | $0.00033 | $0.00668 |
| Opus 5 | $0.00016 | $0.00334 |
| Sonnet 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 2d 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.
- 2d 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 (71 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 668 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.
Other skills, from other repositories
x402
Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…
browser-use
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.
opencli-autofix
Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you through collecting a trace artifact, patching the adapter, retrying, and filing an upstream GitHub issue after a verified fix. Works with any AI agent.
opencli-usage
Use at the start of any OpenCLI session — this is the top-level map of what opencli can do, how to discover adapters, what flags and output formats are universal, and which specialized skill to load next. Point here when an agent asks "what can opencli do?" or "how do I find the right command?".
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
smart-search
基于 opencli 命令的智能搜索路由器。当用户想要使用 OpenCLI、CLI 或 API 搜索、查询、查找或研究信息时,尤其是涉及指定网站、社交媒体、技术资料、新闻、购物、旅游、求职、金融或中文内容时,务必使用此 skill.