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/tecton-ai/tecton-mcpWrote 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/tecton-ai/tecton-mcp/tecton-unit-testing)<a href="https://agentmods.dev/rules/tecton-ai/tecton-mcp/tecton-unit-testing"><img src="https://agentmods.dev/badge/rules/tecton-ai/tecton-mcp/tecton-unit-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/tecton-ai/tecton-mcp/tecton-unit-testing"><img src="https://agentmods.dev/badge/rules/tecton-ai/tecton-mcp/tecton-unit-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.00013 | $0.05426 |
| Opus 5.5 | $0.00005 | $0.02170 |
| Sonnet 5.5 | $0.00003 | $0.01085 |
| Haiku 4.5 | $0.00001 | $0.00543 |
Grade A, and why
tecton-unit-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 2mo 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 — 559 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rules to follow when you create Tecton FeatureView unit tests
CRITICAL: Before adding a new unit test, make sure that tecton plan works. This ensures the Feature View definitions are at least valid.
Feature retrieval methods such as get_features_in_range and
run_transformation use validated Tecton Objects during retrieval by
default. Validation requires access to the Tecton API and a Compute Cluster
which are often unavailable in Unit Testing environments.
To use these methods using mock inputs **without validation** in Unit Tests, set the validation mode to `skip` using:
```
conf.set("TECTON_SKIP_OBJECT_VALIDATION", "True")
```
In your unit test for a given FeatureView, always fetch a reference to the FeatureView using the TestRepo test fixture. Never try to import it directly from the module. Sample code that shows how to use repo_fixture.get_feature_view to retrieve the unit under test:
### tests/transaction_amount_is_high.py ###
from tecton import TestRepo
import pandas
# Testing the 'transaction_amount_is_high' feature which depends on request data ('amount') as input
def test_transaction_amount_is_high(repo_fixture: TestRepo):
transaction_amount_is_high = repo_fixture.get_feature_view("transaction_amount_is_high")
transaction_request = pandas.DataFrame({"amount": [124, 10001, 34235436234]})
# Use a MockContext to mock any secrets or resources
mock_context = MockContext(secrets={"my_secret": "my_secret_value"})
actual = transaction_amount_is_high.run_transformation(
input_data={
"transaction_request": transaction_request,
"context": mock_context,
},
).to_pandas()
expected = pandas.DataFrame({"transaction_amount_is_high": [0, 1, 1]})
pandas.testing.assert_frame_equal(actual, expected)
Overview
Tecton supports unit testing for feature definitions to ensure the correctness
of feature definitions. Unit tests can be defined in feature repositories in
file paths matching the pattern **/tests/*.py.
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.
- 2mo ago First seen · 559 lines · 13 tokens per session scan A 548a2bbf8c78
tecton-unit-testing is a cursor rule published in the GitHub repository tecton-ai/tecton-mcp (3 stars, last pushed 1y ago), licensed MIT. It adds 13 tokens to every session and 5,426 once invoked, about $0.0001 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.
Other cursor rules, from other repositories
use-contract-ir-factories
Use factory functions for creating ContractIR objects instead of manual object creation.
gonavi-go
A Go coding rule set for the GoNavi repository, based on common Go style guides and the project's own conventions. It covers file structure, errors, context, concurrency, logging, and tests.
python-general-coding-standards
A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.
mockito
This guide provides definitive best practices for writing robust, maintainable, and readable unit tests using Mockito with JUnit 5, focusing on modern patterns and common pitfalls.
spec-for-ut
Unit testing is essential to ensure the reliability and stability of code, especially for React components and functions. Adhering to best practices and ensuring high test coverage is critical to maintaining a robust codebase.
unit-testing-standards
Cursor rule "unit-testing-standards" from adobecom/da-express-milo, covering unit testing standards, testing philosophy, testing framework stack, test structure patterns and 1. standard test file organization.