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.
git clone --depth 1 https://github.com/brendadeeznuts1111/betting-brain-v3Wrote 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/rules/brendadeeznuts1111/betting-brain-v3/ai-friendly-testing)<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/ai-friendly-testing"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/ai-friendly-testing/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/rules/brendadeeznuts1111/betting-brain-v3/ai-friendly-testing"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/ai-friendly-testing.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.02076 | $0.02076 |
| Opus 5.5 | $0.00830 | $0.00830 |
| Sonnet 5.5 | $0.00415 | $0.00415 |
| Haiku 4.5 | $0.00208 | $0.00208 |
Grade A, and why
ai-friendly-testing 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 — 352 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI-Friendly Testing Patterns
Bun Test with AI Integration
Always use AI-friendly test output when working with AI assistants:
# Dedicated AI command (preferred)
bun run test:ai
# Environment variable approach
CLAUDECODE=1 bun test
CLAUDECODE=1 bun test tests/unit
CLAUDECODE=1 bun test --coverage
Auto-Detection
CI scripts automatically detect AI environments:
CLAUDECODE=1- Claude CodeREPL_ID=1- Replit AIAGENT=1- Generic AI agent
Commands that auto-enable quiet mode:
bun run ci:local # ✅ Auto-detects AI environment
bun run ci:bun # ✅ Auto-detects AI environment
Benefits
- ✅ Shows only test failures (not passing tests)
- ✅ Reduces output verbosity for AI context windows
- ✅ Preserves failure details and summaries
- ✅ Improves readability in AI sessions
Test Mock Patterns
For D1 database mocks, handle both regular and cost cap queries:
mockEnv = {
ANALYTICS: {
prepare: (query: string) => {
// Handle cost cap queries (dbstat)
if (query.includes('dbstat') || query.includes('SUM(pgsize)')) {
return {
first: async () => ({ size: 1000000, rows: 1000 }),
bind: () => ({ first: async () => ({ size: 1000000, rows: 1000 }) }),
run: async () => ({ success: true }),
all: async () => []
};
}
// Handle regular queries
return {
bind: (...params: any[]) => ({
first: async () => ({ /* your data */ })
}),
first: async () => null,
run: async () => ({ success: true }),
all: async () => []
};
}
}
};
Environment Variables
Set any of these to enable quiet mode:
| Variable | Use Case |
|---|---|
CLAUDECODE=1 |
Claude Code sessions |
REPL_ID=1 |
Replit AI environments |
AGENT=1 |
Generic AI agent flag |
Package Scripts
Available in package.json:
{
"scripts": {
"test:ai": "CLAUDECODE=1 bun test",
"test": "bun test",
"test:unit": "bun test tests/unit",
"test:integration": "bun test tests/integration"
}
}
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 · 352 lines · 2,076 tokens per session scan A c8f1244f2121
ai-friendly-testing is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 20d ago), licensed MIT. It adds 2,076 tokens to every session, about $0.0083 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-31.
ai-friendly-testing compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-friendly-testingbrendadeeznuts1111/betting-brain-v3 | Cursor rule | 8 | 20d ago | MIT | A | 2,076 | Cursor |
| typescript-importsfirtoz/cf-multiworker-starter-kit | Cursor rule | 12 | 1mo ago | none | A | 687 | Cursor |
| test-database-limitationsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| sql-orm-client-whole-shape-assertionsprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| use-ast-factoriesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| docssupermemoryai/supermemory | Cursor rule | 32k | yesterday | MIT | A | 314 | Cursor |
| jestsanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 7d ago | CC0-1.0 | A | 2,543 | Cursor |