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/trebormc/drupal-ai-agents/drupal-functionaljs-testnpx skills add trebormc/drupal-ai-agents --skill drupal-functionaljs-testgit clone --depth 1 https://github.com/trebormc/drupal-ai-agentsWrote 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/trebormc/drupal-ai-agents/drupal-functionaljs-test)<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-functionaljs-test"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-functionaljs-test.svg" alt="Measured on agentmods" 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 | $0.00161 | $0.02140 |
| Opus 5 | $0.00081 | $0.01070 |
| Sonnet 5 | $0.00032 | $0.00428 |
| Haiku 4.5 | $0.00016 | $0.00214 |
Grade A, and why
drupal-functionaljs-test 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 3d 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 — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drupal FunctionalJavascript Test
What It Is
Extends BrowserTestBase but uses a real Chrome browser via WebDriver. JavaScript executes completely. AJAX works. CSS animations are disabled.
Speed: 10-170 seconds per class. Use ONLY when there is no alternative.
Critical Difference from BrowserTestBase
statusCodeEquals() does NOT work in WebDriverTestBase. The Selenium2 driver does
not have access to HTTP status codes. Verify access with pageTextContains() or
elementExists().
Base Template
<?php
declare(strict_types=1);
namespace Drupal\Tests\MODULE\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\user\UserInterface;
/**
* Tests DESCRIPTION.
*
* @group MODULE
*/
class NameTest extends WebDriverTestBase {
protected $defaultTheme = 'stark';
protected static $modules = ['node', 'MODULE'];
protected UserInterface $adminUser;
protected function setUp(): void {
parent::setUp();
$this->adminUser = $this->drupalCreateUser(['access content', 'administer MODULE']);
}
public function testAjaxInteraction(): void {
$this->drupalLogin($this->adminUser);
$this->drupalGet('route');
$page = $this->getSession()->getPage();
$assert = $this->assertSession();
$page->selectFieldOption('field', 'value');
$assert->assertWaitOnAjaxRequest();
$element = $assert->waitForElementVisible('css', '.result');
$this->assertNotEmpty($element);
}
}
GOLDEN RULE: Never sleep(), Always Waits
The #1 cause of flaky tests. NEVER sleep(). ALWAYS use waits:
$assert = $this->assertSession();
// Wait for AJAX (most used)
$assert->assertWaitOnAjaxRequest();
// Wait for element in DOM
$element = $assert->waitForElement('css', '.my-element');
$this->assertNotEmpty($element);
// Wait for VISIBLE element
$element = $assert->waitForElementVisible('css', '.dropdown');
// Wait for element to disappear
$assert->waitForElementRemoved('css', '.spinner');
// Specific waits
$assert->waitForButton('Submit');
$assert->waitForLink('Next');
$assert->waitForField('field_name');
$assert->waitForId('my-id');
$assert->waitForText('Done');
// Autocomplete
$assert->waitOnAutocomplete();
// Custom JS condition
$this->getSession()->wait(5000, 'jQuery("#el").is(":visible")');
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.
- 3d ago First seen · 261 lines · 161 tokens per session scan A 24ca75fde1f4
drupal-functionaljs-test is a skill published in the GitHub repository trebormc/drupal-ai-agents (10 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 161 tokens to every session and 2,140 once invoked, about $0.0008 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-31.
Other skills, from other repositories
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
e2e-deployment-skill
Use this deployment skill to verify shared skills load during Playwright startup.
playwright-screen-recording
Record browser test videos with Playwright for PR review and bug fix verification.
actionbook-web-test
Run browser-based web tests against websites using Actionbook CLI. Activate when the user wants to test a website workflow, run smoke tests, verify a user flow, check if a web application works, run regression tests, or validate browser-based interactions. Supports test definition, execution, assertion, reporting, and…
web-preview
Flutter Web版をビルド → サーバー起動 → Playwright でアクセス確認 → URLをユーザーに案内する。.
qa/e2e-playwright
Playwright E2E 测试完整方法论,涵盖项目初始化、Page Object Model、认证复用、API Mock、视觉回归、多浏览器测试、CI 集成和调试技巧.