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 rules/ivangrynenko/cursorrules/behat-ai-guidegit clone --depth 1 https://github.com/ivangrynenko/cursorrulesWhat 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.09740 | $0.09740 |
| Opus 5 | $0.04870 | $0.04870 |
| Sonnet 5 | $0.01948 | $0.01948 |
| Haiku 4.5 | $0.00974 | $0.00974 |
Grade A, and why
behat-ai-guide 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 — 883 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Behat Test Writing Guide for Drupal Projects
🎯 Primary Directive
ALWAYS prioritize using drevops/behat-steps traits and step definitions over writing custom steps. The drevops/behat-steps package provides comprehensive test coverage for most Drupal testing scenarios.
📦 Essential Resources
Before writing ANY Behat test:
- Check available steps in the drevops/behat-steps STEPS.md file or refer to the embedded reference below
- Review trait source code in
vendor/drevops/behat-steps/src/directory - Only create custom steps when absolutely necessary (functionality not covered by existing traits)
🔧 Setting Up FeatureContext
When creating or modifying FeatureContext.php, include the necessary traits from drevops/behat-steps. The traits are located in vendor/drevops/behat-steps/src/:
<?php
namespace DrupalProject\Tests\Behat;
use Drupal\DrupalExtension\Context\DrupalContext;
// Generic traits from vendor/drevops/behat-steps/src/
use DrevOps\BehatSteps\CookieTrait;
use DrevOps\BehatSteps\DateTrait;
use DrevOps\BehatSteps\ElementTrait;
use DrevOps\BehatSteps\FieldTrait;
use DrevOps\BehatSteps\FileDownloadTrait;
use DrevOps\BehatSteps\KeyboardTrait;
use DrevOps\BehatSteps\LinkTrait;
use DrevOps\BehatSteps\PathTrait;
use DrevOps\BehatSteps\ResponseTrait;
use DrevOps\BehatSteps\WaitTrait;
// Drupal-specific traits from vendor/drevops/behat-steps/src/Drupal/
use DrevOps\BehatSteps\Drupal\BigPipeTrait;
use DrevOps\BehatSteps\Drupal\BlockTrait;
use DrevOps\BehatSteps\Drupal\ContentBlockTrait;
use DrevOps\BehatSteps\Drupal\ContentTrait;
use DrevOps\BehatSteps\Drupal\DraggableviewsTrait;
use DrevOps\BehatSteps\Drupal\EckTrait;
use DrevOps\BehatSteps\Drupal\EmailTrait;
use DrevOps\BehatSteps\Drupal\FieldTrait as DrupalFieldTrait;
use DrevOps\BehatSteps\Drupal\FileTrait;
use DrevOps\BehatSteps\Drupal\MediaTrait;
use DrevOps\BehatSteps\Drupal\MenuTrait;
use DrevOps\BehatSteps\Drupal\MetatagTrait;
use DrevOps\BehatSteps\Drupal\OverrideTrait;
use DrevOps\BehatSteps\Drupal\ParagraphsTrait;
use DrevOps\BehatSteps\Drupal\SearchApiTrait;
use DrevOps\BehatSteps\Drupal\TaxonomyTrait;
use DrevOps\BehatSteps\Drupal\TestmodeTrait;
use DrevOps\BehatSteps\Drupal\UserTrait;
use DrevOps\BehatSteps\Drupal\WatchdogTrait;
class FeatureContext extends DrupalContext {
// Include only the traits you need for your tests
// Generic traits
use CookieTrait;
use DateTrait;
use ElementTrait;
use FieldTrait;
use FileDownloadTrait;
use KeyboardTrait;
use LinkTrait;
use PathTrait;
use ResponseTrait;
use WaitTrait;
// Drupal-specific traits
use BlockTrait;
use ContentTrait;
use EmailTrait;
use FileTrait;
use MediaTrait;
use TaxonomyTrait;
use UserTrait;
// Only add custom methods when drevops/behat-steps doesn't provide the functionality
}
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 · 883 lines · 9,740 tokens per session scan A 8c44afa42402
behat-ai-guide is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 10mo ago), licensed MIT. It adds 9,740 tokens to every session, about $0.0487 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 cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.