Borrowing it
Nothing to install: this file belongs to rinerebox1/deno-gemini-grounding-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/rinerebox1/deno-gemini-grounding-mcp-server/main/.gemini/commands/write-tests.mdgit clone --depth 1 https://github.com/rinerebox1/deno-gemini-grounding-mcp-serverWrote 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/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests)<a href="https://agentmods.dev/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests"><img src="https://agentmods.dev/badge/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests/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/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests"><img src="https://agentmods.dev/badge/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests.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.01080 |
| Opus 5 | $0.00000 | $0.00540 |
| Sonnet 5 | $0.00000 | $0.00216 |
| Haiku 4.5 | $0.00000 | $0.00108 |
Grade A, and why
write-tests 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 8d 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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
t-wada流TDDによるテスト作成
GEMINI.mdの「テスト戦略」セクションで定義されているt-wada流のテスト駆動開発(TDD)に従って、高品質なテストを作成します。
TDDの基本サイクル
- 🔴 Red: 失敗するテストを書く
- 🟢 Green: テストを通す最小限の実装
- 🔵 Refactor: リファクタリング
実行手順
1. TODOリストの作成
実装したい機能をリストアップし、最小単位に分解します:
[ ] 基本的な機能の動作確認
[ ] エッジケースの処理
[ ] エラーハンドリング
[ ] パフォーマンスが重要な場合はベンチマーク
2. テストファイルの配置
tests/
├── unit/ # 単体テスト
├── property/ # プロパティベーステスト(Hypothesis使用)
├── integration/ # 統合テスト
└── conftest.py # pytestフィクスチャ
3. テストの命名規則
日本語で意図を明確に表現します:
def test_正常系_有効なデータで処理成功():
"""chunk_listが正しくチャンク化できることを確認。"""
def test_異常系_不正なサイズでValueError():
"""チャンクサイズが0以下の場合、ValueErrorが発生することを確認。"""
def test_エッジケース_空リストで空結果():
"""空のリストをチャンク化すると空の結果が返されることを確認。"""
4. templateディレクトリの参考例
単体テスト (@template/tests/unit/test_example.py)
- 関数・クラスの基本動作
- 正常系・異常系・エッジケース
- パラメトライズテストの活用
プロパティベーステスト (@template/tests/property/test_helpers_property.py)
- Hypothesisによる自動テストケース生成
- 不変条件の検証
- エッジケースの自動発見
統合テスト (@template/tests/integration/test_example.py)
- コンポーネント間の連携
- ファイルI/Oやデータ処理パイプライン
- エラーのカスケード処理
三角測量の実践例
# Step 1: 最初のテスト(仮実装で通す)
def test_add_正の数():
assert add(2, 3) == 5
def add(a, b):
return 5 # 仮実装
# Step 2: 2つ目のテスト(一般化を促す)
def test_add_別の正の数():
assert add(1, 4) == 5
assert add(10, 20) == 30 # これで仮実装では通らない
def add(a, b):
return a + b # 一般化
# Step 3: エッジケースを追加
def test_add_負の数():
assert add(-1, -2) == -3
assert add(-5, 3) == -2
TDD実践時の注意点
- テストは1つずつ追加 - 一度に複数のテストを書かない
- 小さく頻繁にコミット - Red→Green、Refactor完了でコミット
- テストの粒度 - 1つのテストで1つの振る舞いをテスト
- リファクタリングの判断 - 重複コード、可読性、設計原則
- テストファーストの徹底 - 必ず失敗するテストから書く
実行コマンド
# テストの実行
make test # 全テスト実行
make test-unit # 単体テストのみ
make test-property # プロパティベーステストのみ
make test-cov # カバレッジ付きテスト
# 特定のテストを実行
uv run pytest tests/unit/test_example.py::TestExampleClass::test_正常系_初期化時は空のリスト -v
このコマンドを使用することで、堅牢で保守性の高いテストスイートを構築できます。
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.
- 8d ago First seen · 107 lines · 0 tokens per session scan A 440cec2074fa
write-tests is a command published in the GitHub repository rinerebox1/deno-gemini-grounding-mcp-server (0 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,080 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-09-01.
Other commands, from other repositories
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.
usage-add
PitWay: Accumulate measured planning or qa token usage onto a milestone.
dashboard
Generar dashboard HTML local con métricas de eficiencia del proyecto SDD.
hub-tdd
TDD workflow for MCP Hub implementation. Types → Tests (red) → Implementation (green) with git gates.
eval
Evaluate and improve one healthcare agent's system prompt. Run up to 5 iterations of: prepare fixed questions -> answer -> judge -> improve -> re-score -> commit if better.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.