deno-gemini-grounding-mcp-server: Command for Claude Code

.gemini/commands/write-tests.md

write-tests is a command for Claude Code, Gemini CLI from rinerebox1/deno-gemini-grounding-mcp-server. It costs 0 tokens per session (1,080 once invoked), scanned A, original, MIT.

A command for writing tests with test-driven development (TDD), a method where you write a failing test, add the smallest implementation that passes it, and then improve the code. It follows testing rules in GEMINI.md and includes unit, integration, and property-based testing examples.

In plain words
What is it for?
Use it to plan test cases, create pytest test files, check individual functions, test components working together, generate varied cases with Hypothesis, and add benchmarks when performance matters.
Why use it?
It gives a structured way to check normal cases, errors, and edge cases instead of relying only on manual checks. Breaking work into small tests can make missing behavior easier to find.

Command for Claude CodeGemini CLI

Written for Gemini CLI and Claude Code: installed under .gemini/, but also a Claude Code command (commands/*.md). Also seen: mentions Gemini CLI.

This is rinerebox1/deno-gemini-grounding-mcp-server's own configuration. It tells Claude Code and Gemini CLI how to work on deno-gemini-grounding-mcp-server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything deno-gemini-grounding-mcp-server configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/rinerebox1/deno-gemini-grounding-mcp-server/main/.gemini/commands/write-tests.md
Clone the repo
git clone --depth 1 https://github.com/rinerebox1/deno-gemini-grounding-mcp-server

Made for: Claude Code, Gemini CLI.

Wrote 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.

agentmods badge for write-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests/github.svg)](https://agentmods.dev/commands/rinerebox1/deno-gemini-grounding-mcp-server/write-tests)
Your own site
<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.

agentmods 80×15 button for write-tests

Your own site · 80×15
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash 440cec2074fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

.gemini/commands/write-tests.md · 107 lines

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の基本サイクル

  1. 🔴 Red: 失敗するテストを書く
  2. 🟢 Green: テストを通す最小限の実装
  3. 🔵 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. テストは1つずつ追加 - 一度に複数のテストを書かない
  2. 小さく頻繁にコミット - Red→Green、Refactor完了でコミット
  3. テストの粒度 - 1つのテストで1つの振る舞いをテスト
  4. リファクタリングの判断 - 重複コード、可読性、設計原則
  5. テストファーストの徹底 - 必ず失敗するテストから書く

実行コマンド

# テストの実行
make test              # 全テスト実行
make test-unit         # 単体テストのみ
make test-property     # プロパティベーステストのみ
make test-cov          # カバレッジ付きテスト

# 特定のテストを実行
uv run pytest tests/unit/test_example.py::TestExampleClass::test_正常系_初期化時は空のリスト -v

このコマンドを使用することで、堅牢で保守性の高いテストスイートを構築できます。

Read the full file on GitHub · 107 lines

Changes

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.

  1. 8d ago First seen · 107 lines · 0 tokens per session scan A 440cec2074fa

Subscribe to this mod's changes

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.