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/rm2thaddeus/Pixel_DetectiveWrote 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/rm2thaddeus/pixel_detective/sprint10-testing-patterns)<a href="https://agentmods.dev/rules/rm2thaddeus/pixel_detective/sprint10-testing-patterns"><img src="https://agentmods.dev/badge/rules/rm2thaddeus/pixel_detective/sprint10-testing-patterns/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/rm2thaddeus/pixel_detective/sprint10-testing-patterns"><img src="https://agentmods.dev/badge/rules/rm2thaddeus/pixel_detective/sprint10-testing-patterns.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.00000 | $0.02352 |
| Opus 5.5 | $0.00000 | $0.00941 |
| Sonnet 5.5 | $0.00000 | $0.00470 |
| Haiku 4.5 | $0.00000 | $0.00235 |
Grade A, and why
sprint10-testing-patterns scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -f http://localhost:3025/health > /dev/null 2>&1 How it starts
The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sprint 10 Testing Patterns - Prevention Through Testing
🎯 GOAL: Catch Sprint 10 Issues Before They Become Problems
These testing patterns specifically target the 5 critical failure modes identified in Sprint 10.
🔥 HYDRATION ERROR TESTING
Pre-Commit Hydration Testing
# MANDATORY before any theme/client-side commits
#!/bin/bash
echo "🧪 Testing for hydration issues..."
# 1. Production build test (catches 90% of hydration issues)
npm run build
if [ $? -ne 0 ]; then
echo "❌ Build failed - fix before committing"
exit 1
fi
# 2. Start production server and test both themes
npm start &
SERVER_PID=$!
sleep 5
# 3. Check for hydration errors in browser console
# Use Browser Tools MCP if available
mcp_browser-tools_takeScreenshot || echo "⚠️ MCP not available, manual test required"
kill $SERVER_PID
echo "✅ Hydration test complete"
Component-Level Hydration Testing
// Test file: __tests__/hydration.test.tsx
import { renderToString } from 'react-dom/server';
import { render } from '@testing-library/react';
describe('Hydration Safety', () => {
test('Theme Provider renders consistently', () => {
const ThemeWrapper = ({ children }) => (
<ChakraProvider theme={theme}>{children}</ChakraProvider>
);
// Server render
const serverHTML = renderToString(<ThemeWrapper><App /></ThemeWrapper>);
// Client render
const { container } = render(<ThemeWrapper><App /></ThemeWrapper>);
// Should match (simplified check)
expect(container.innerHTML).toContain('expected-theme-class');
});
test('No browser APIs in initial render', () => {
// Mock browser APIs to undefined
Object.defineProperty(window, 'localStorage', { value: undefined });
Object.defineProperty(window, 'innerWidth', { value: undefined });
// Should not throw during render
expect(() => {
render(<App />);
}).not.toThrow();
});
});
🔥 CIRCULAR IMPORT TESTING
Backend Import Validation
# backend/tests/test_imports.py
import ast
import os
from pathlib import Path
def test_no_main_imports_in_routers():
"""Ensure routers never import from main.py"""
router_dir = Path("backend/routers")
violations = []
for py_file in router_dir.glob("*.py"):
with open(py_file, 'r') as f:
content = f.read()
# Parse AST to find imports
tree = ast.parse(content)
for node in ast.walk(tree):
if isinstance(node, ast.ImportFrom):
if node.module and "main" in node.module:
violations.append(f"{py_file}: {ast.unparse(node)}")
assert not violations, f"Found main.py imports in routers: {violations}"
def test_dependency_injection_usage():
"""Ensure routers use Depends() pattern"""
router_dir = Path("backend/routers")
for py_file in router_dir.glob("*.py"):
if py_file.name == "__init__.py":
continue
with open(py_file, 'r') as f:
content = f.read()
# Should use Depends() for shared resources
assert "Depends(" in content, f"{py_file} should use dependency injection"
assert "from ..dependencies import" in content, f"{py_file} should import from dependencies"
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.
- 1mo ago First seen · 322 lines · 0 tokens per session scan A 21ae359837b3
sprint10-testing-patterns is a cursor rule published in the GitHub repository rm2thaddeus/Pixel_Detective (21 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,352 tokens. A static security scan graded it A with 1 finding (makes network calls). 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
20-testing-generated-and-structure
Testing expectations, generated-file boundaries, and CLI structure contract.
fuzzing
Fuzzing setup and guidelines for skia-rs.
testing-and-quality
The testcomprehensive.py provides systematic testing of all 31 MCP tools.
smoke-monkey-tester
Smoke tests for core functionality and monkey/chaos tests aiming to break the system with randomized inputs. / TR: Sistemin temel fonksiyonlarını kontrol eden smoke testler ve rastgele girdilerle sistemi çökertmeyi hedefleyen monkey/chaos testleri.
STAGE_S5_TEST_POINTS
A staged workflow for turning approved requirements into a complete list of test points. It checks required earlier documents and records any requirement that has no matching test point.
testing
Testing conventions for Ion Design System using Jest and Angular Testing Library.