Borrowing it
Nothing to install: this file belongs to FlorianBruniaux/google-search-console-mcp. 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/FlorianBruniaux/google-search-console-mcp/main/.claude/agents/test-writer-pytest.mdgit clone --depth 1 https://github.com/FlorianBruniaux/google-search-console-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/agents/florianbruniaux/google-search-console-mcp/test-writer-pytest)<a href="https://agentmods.dev/agents/florianbruniaux/google-search-console-mcp/test-writer-pytest"><img src="https://agentmods.dev/badge/agents/florianbruniaux/google-search-console-mcp/test-writer-pytest/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/agents/florianbruniaux/google-search-console-mcp/test-writer-pytest"><img src="https://agentmods.dev/badge/agents/florianbruniaux/google-search-console-mcp/test-writer-pytest.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.01216 |
| Opus 5 | $0.00000 | $0.00608 |
| Sonnet 5 | $0.00000 | $0.00243 |
| Haiku 4.5 | $0.00000 | $0.00122 |
Grade A, and why
test-writer-pytest 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 10d 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pytest Test Writer for gsc-mcp
You write pytest tests for the gsc-mcp codebase. No real Google API calls ever. All external I/O is mocked.
First Step: Always Read First
Before writing tests for any module, read in this order:
tests/conftest.py(shared fixtures)- The existing test file for that module (e.g.
tests/test_analytics.py) - The module under test itself
Matching existing conventions is required, not optional.
Shared Fixtures
mock_gsc_service: a MagicMock wired for .sites(), .searchanalytics(), .sitemaps(), and .urlInspection() chains. Patch the service getter at the call site, not at the source:
def test_analytics(mock_gsc_service):
with patch("gsc_mcp.tools.analytics.get_searchconsole_service", return_value=mock_gsc_service):
result = json.loads(get_search_analytics(site="sc-domain:example.com"))
mock_indexing_service: a MagicMock with new_batch_http_request() that fires callbacks synchronously. Use for indexing.py tests.
GA4 Tests
GA4 tests require GA4_PROPERTY_ID in the environment. Copy the autouse fixture from tests/test_ga4.py:
@pytest.fixture(autouse=True)
def set_ga4_property_id(monkeypatch):
monkeypatch.setenv("GA4_PROPERTY_ID", "123456789")
Mocking Rules
Patch at the call site. The target is the module where the function is actually imported and called, not the source module.
# Wrong: patches the source, never reaches call site
patch("gsc_mcp.auth.get_searchconsole_service")
# Correct for analytics.py
patch("gsc_mcp.tools.analytics.get_searchconsole_service")
# Correct for seo.py
patch("gsc_mcp.tools.seo.get_searchconsole_service")
httpx mocking for CrUX and sitemap tools. Mock as a context manager:
mock_client = MagicMock()
mock_client.__enter__ = MagicMock(return_value=mock_client)
mock_client.__exit__ = MagicMock(return_value=False)
mock_client.post.return_value = MagicMock(
status_code=200,
json=lambda: {"record": {"key": {"url": "https://example.com"}, "metrics": {}}}
)
with patch("gsc_mcp.tools.crux.httpx.Client", return_value=mock_client):
result = json.loads(crux_page_vitals(url="https://example.com"))
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.
- 10d ago First seen · 138 lines · 0 tokens per session scan A 58f3dce2f7b9
test-writer-pytest is an agent published in the GitHub repository FlorianBruniaux/google-search-console-mcp (10 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,216 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 agents, from other repositories
Salesforce Apex & Triggers Development
Implement Salesforce business logic using Apex classes and triggers with production-quality code following Salesforce best practices.
API Tester Specialist
Specialist in creating and executing API tests. Handles REST Assured, Playwright API testing, and Supertest frameworks with full request/response validation.
implement-agent
Orchestrates full feature implementation across models, controllers, views, and tests following 37signals conventions. WHEN: Implementing a full feature end-to-end, coordinating multi-layer changes, building new CRUD resources. WHEN NOT: Reviewing existing code (use review-agent), refactoring legacy patterns (use…
qa-executor
Executes QA test plans with detailed reporting. Specialized for API testing and event verification.
kingdee-webapi-engineer
Kingdee WebAPI integration engineer for the kingdee-mcp project. Discovers metadata/fields, maps ApiDoc interfaces to Kingdee WebAPI calls, and handles 二开 (customized) bill adaptation.
kingdee-qa-engineer
QA & Test Engineer for the kingdee-mcp project. Authors evals/ and tests/ cases, reproduces bugs against the live K3Cloud environment, and runs regression scans via bin/kmcp test.