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/kinopeee/cursorrules/test-strategygit clone --depth 1 https://github.com/kinopeee/cursorrulesWhat 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.01653 | $0.01653 |
| Opus 5 | $0.00826 | $0.00826 |
| Sonnet 5 | $0.00331 | $0.00331 |
| Haiku 4.5 | $0.00165 | $0.00165 |
Grade A, and why
test-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 yesterday.
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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
テスト戦略ルール
これらのルールは、テストコードを実装または変更する際に必ず従うべきテストプロセスを定義する。以下のすべてのステップを満たさない限り、テストタスクは完了したとはみなされない。
1. テスト観点表(等価分割・境界値)
- いかなるテスト作業を開始する前にも、まず Markdown 形式の「テスト観点表(test perspectives table)」を提示しなければならない。
- 表には少なくとも次の列を含めること:
Case ID,Input / Precondition,Perspective (Equivalence / Boundary),Expected Result,Notes。 - 行は正常系・異常系・境界値のケースを網羅すること。境界値については、最低でも
0 / 最小値 / 最大値 / ±1 / 空 / NULLを含める。 境界値候補(0 / 最小値 / 最大値 / ±1 / 空 / NULL)のうち仕様上意味を持たないものは、Notesに対象外とする理由を記載したうえで省略してよい。 - 後から観点漏れに気づいた場合は、セルフレビュー後に表を更新し、必要なケースを追加すること。
- なお、既存テストの軽微な修正(メッセージ調整や期待値の微修正など)であり、新しい分岐や制約が追加されない場合は、テスト観点表の新規作成・更新は任意とする。
テンプレート例
| Case ID | Input / Precondition | Perspective (Equivalence / Boundary) | Expected Result | Notes |
|---|---|---|---|---|
| TC-N-01 | Valid input A | Equivalence – normal | Processing succeeds and returns expected value | - |
| TC-A-01 | NULL | Boundary – NULL | Validation error (required field) | - |
| ... | ... | ... | ... | ... |
2. テストコード実装ポリシー
- 上記の表に記載したケースを すべて 自動化テストとして実装する。
- 正常系と同数以上の失敗系(バリデーションエラー、例外、外部依存失敗など)を必ず含める。
- 以下の観点をテストで網羅する:
- 正常系(主要シナリオ)
- 異常系(バリデーションエラー、例外パス)
- 境界値(0, 最小, 最大, ±1, 空, NULL)
- 不正な型・形式の入力
- 外部依存の失敗(API / DB / メッセージング等が該当する場合)
- 例外種別およびエラーメッセージ
- さらに、分岐網羅率 100% を目標にし、必要に応じて追加ケースを自ら設計する。
分岐網羅 100% は目標値とし、達成が合理的でない場合は、少なくともビジネスインパクトの高い分岐および主要なエラー経路を網羅すること。
未カバーとなる分岐がある場合は、その理由と影響を
Notesや PR 本文に明示する。
3. Given / When / Then コメント
各テストケースには必ず以下のコメントフォーマットを付与する。
// Given: 前提条件
// When: 実行する操作
// Then: 期待する結果/検証
コメントはテストコード直上またはステップ内に記述し、読み手がシナリオを追えるように保つこと。
4. 例外・エラー検証
- 例外が発生するケースでは、例外の型とメッセージを明示的に検証する。
- バリデーション系の異常系では、エラーコードやフィールド情報があれば併せて確認する。
- 外部依存の失敗を模す場合は、スタブ/モックを利用して期待する例外・リトライ・フォールバックが呼ばれるかを確認する。
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.
- yesterday First seen · 92 lines · 1,653 tokens per session scan A 278dff8f25a2
test-strategy is a cursor rule published in the GitHub repository kinopeee/cursorrules (1,116 stars, last pushed 8mo ago), licensed MIT. It adds 1,653 tokens to every session, about $0.0083 per session on Opus 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-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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.