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/koizumikento/reinfolib-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/koizumikento/reinfolib-mcp/client-library)<a href="https://agentmods.dev/rules/koizumikento/reinfolib-mcp/client-library"><img src="https://agentmods.dev/badge/rules/koizumikento/reinfolib-mcp/client-library/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/koizumikento/reinfolib-mcp/client-library"><img src="https://agentmods.dev/badge/rules/koizumikento/reinfolib-mcp/client-library.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.02610 |
| Opus 5 | $0.00000 | $0.01305 |
| Sonnet 5 | $0.00000 | $0.00522 |
| Haiku 4.5 | $0.00000 | $0.00261 |
Grade A, and why
client-library 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 — 376 lines — stays where its author put it; the contents beside it link to each section on GitHub.
不動産情報ライブラリAPIクライアント設計ガイド
APIキー管理パターン
1. 基本的なクライアント設計
import os
from typing import Optional, Dict, Any, Union
import httpx
from pydantic import BaseModel
class ReinfiolibClient:
"""不動産情報ライブラリAPIクライアント"""
def __init__(
self,
api_key: Optional[str] = None,
base_url: str = "https://www.reinfolib.mlit.go.jp/ex-api/external",
timeout: int = 30
):
"""
クライアントを初期化します。
Args:
api_key: APIキー(Noneの場合は環境変数REINFOLIB_API_KEYを使用)
base_url: APIベースURL
timeout: リクエストタイムアウト(秒)
"""
self.api_key = api_key or os.getenv("REINFOLIB_API_KEY")
if not self.api_key:
raise ValueError("APIキーが設定されていません。引数で指定するか、環境変数REINFOLIB_API_KEYを設定してください。")
self.base_url = base_url
self.timeout = timeout
self._client = httpx.AsyncClient(
headers={"Ocp-Apim-Subscription-Key": self.api_key},
timeout=timeout
)
2. 環境変数による設定
# .env ファイル例
REINFOLIB_API_KEY=your_api_key_here
# 使用例
from dotenv import load_dotenv
load_dotenv()
# 環境変数から自動取得
client = ReinfiolibClient()
# 直接指定
client = ReinfiolibClient(api_key="your_api_key")
レスポンスモデル定義
基本レスポンスモデル
from pydantic import BaseModel, Field
from typing import List, Optional, Any
from datetime import datetime
class RealEstateTransaction(BaseModel):
"""不動産取引情報モデル"""
prefecture: str = Field(description="都道府県名")
city: str = Field(description="市区町村名")
district: Optional[str] = Field(None, description="地区名")
price: Optional[int] = Field(None, description="取引価格(円)")
area: Optional[float] = Field(None, description="面積(㎡)")
unit_price: Optional[int] = Field(None, description="㎡単価(円)")
transaction_period: Optional[str] = Field(None, description="取引時期")
building_year: Optional[str] = Field(None, description="建築年")
structure: Optional[str] = Field(None, description="構造")
usage: Optional[str] = Field(None, description="用途")
class RealEstateSearchResult(BaseModel):
"""不動産検索結果モデル"""
data: List[RealEstateTransaction]
total_count: int
page: int
per_page: int
class LandPricePoint(BaseModel):
"""地価公示・調査ポイントモデル"""
point_name: str = Field(description="地点名")
address: str = Field(description="住所")
price_per_sqm: int = Field(description="㎡単価(円)")
year: int = Field(description="調査年")
longitude: float = Field(description="経度")
latitude: float = Field(description="緯度")
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 · 376 lines · 2,610 tokens per session scan A 0f3ddde8f6e4
client-library is a cursor rule published in the GitHub repository koizumikento/reinfolib-mcp (2 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,610 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 cursor rules, from other repositories
python
You are an expert in Python, FastAPI, and scalable API development.
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
py-fast-api
Cursor rules for Python FastAPI backend development and best practices.
python
Python best practices and patterns for modern software development with Flask and SQLite.
python--typescript-guide-cursorrules-prompt-file
Cursor rules for Python development with TypeScript guide integration.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).