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/rm2thaddeus/pixel_detective/sprint10-testing-patternsgit clone --depth 1 https://github.com/rm2thaddeus/Pixel_DetectiveWhat 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.00000 | $0.02352 |
| Opus 5 | $0.00000 | $0.01176 |
| Sonnet 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 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.
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.
- 2d 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 7mo 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.