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/ekakit/lightfast-mcp/testing-strategygit clone --depth 1 https://github.com/ekakit/lightfast-mcpWhat 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.00722 |
| Opus 5 | $0.00000 | $0.00361 |
| Sonnet 5 | $0.00000 | $0.00144 |
| Haiku 4.5 | $0.00000 | $0.00072 |
Grade A, and why
testing-strategy 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Workflow
When editing test files, execute this workflow immediately:
Immediate Actions After Test File Changes
- Run the Specific Test:
uv run pytest {current_test_file} -v - Run Related Fast Tests:
nox -s test_fast - Check Test Coverage: Ensure new code paths are covered
Test File Validation Checklist
- Test function names start with
test_ - Async tests use
@pytest.mark.asyncio - Integration tests use
@pytest.mark.integration - Tests have descriptive docstrings
- Both success and failure scenarios are tested
- External dependencies are properly mocked
Automatic Commands by Test Type
Unit Tests (tests/unit/)
# Run just the current test file
uv run pytest {current_file} -v
# Run all unit tests for the module being tested
uv run pytest tests/unit/test_{module_name}* -v
Integration Tests (tests/integration/)
# Run the current integration test
uv run pytest {current_file} -v
# Ensure test servers are available
uv run lightfast-mock-server &
sleep 2
uv run pytest {current_file} -v
pkill -f lightfast-mock-server
E2E Tests (tests/e2e/)
# Run the current E2E test in isolation
uv run pytest {current_file} -v -s
# Run full E2E suite if major changes
nox -s test_e2e
Test Development Workflow
When writing new tests:
- Write Failing Test: Start with a test that fails
- Run Test:
uv run pytest {test_file}::{test_function} -v - Implement Feature: Make the test pass
- Run Full Test Suite:
nox -s test_fast - Check Coverage: Ensure adequate test coverage
Required Test Patterns
Unit Test Template
import pytest
from lightfast_mcp.servers.{module} import {Class}
@pytest.mark.asyncio
async def test_{function_name}_success():
"""Test {function} succeeds with valid input."""
# Arrange
instance = {Class}()
# Act
result = await instance.{function}("valid_input")
# Assert
assert result == "expected_output"
@pytest.mark.asyncio
async def test_{function_name}_failure():
"""Test {function} handles invalid input gracefully."""
# Arrange
instance = {Class}()
# Act & Assert
with pytest.raises(ValueError, match="expected error message"):
await instance.{function}("invalid_input")
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 · 114 lines · 0 tokens per session scan A 860dc48eb4f5
testing-strategy is a cursor rule published in the GitHub repository ekakit/lightfast-mcp (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 722 tokens. 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 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.