weather-forecast-mcp CLAUDE.md

weather-forecast-mcp CLAUDE.md is an instructions file for Claude Code from hlucent/weather-forecast-mcp. It costs 1,948 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for building and operating a weather-forecast service. Claude Code is an AI coding tool, and the instructions cover implementation rules, weather API handling, API-key safety, error parsing, missing data, and mapping operations to tools.

In plain words
What is it for?
Use it when developing or maintaining this weather service, especially its four weather operations, API responses, environment configuration, local tests, and deployment handoff.
Why use it?
It gives the coding agent project-specific rules, including how to handle uncertain requirements, protect API keys, distinguish missing readings from zero values, and avoid unsafe deployment commands.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

Install

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.

agentmods
npx agentmods add instructions/hlucent/weather-forecast-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/hlucent/weather-forecast-mcp

Made for: Claude Code.

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 weather-forecast-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hlucent/weather-forecast-mcp/claude-md.svg)](https://agentmods.dev/instructions/hlucent/weather-forecast-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/hlucent/weather-forecast-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/hlucent/weather-forecast-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,948 This file is loaded in full into every session.
When invoked 1,948 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01948 $0.01948
Opus 5 $0.00974 $0.00974
Sonnet 5 $0.00390 $0.00390
Haiku 4.5 $0.00195 $0.00195

Measured 5d ago against content hash 7f6449bd4cef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

weather-forecast-mcp CLAUDE.md 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 5d 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.

CLAUDE.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — weather-forecast-mcp (Claude Code 작업 지침)

절대 규칙

  • DEVPLAN.md만 먼저 읽고 시작한다. 다른 문서 재탐색 금지. 웹서치 금지.
  • 불확실하면 기본값 1개로 구현 후 DEVLOG.md에 "확인 필요"로 기록한다.
  • 동일 오류 최대 3회 재시도, 3회 실패 시 기록 후 사용자에게 보고한다.
  • fly launch/fly secrets set/flyctl deploy/fly logs 등 fly.io 명령을 절대 직접 실행하지 않는다.
  • 구현 + 로컬 테스트 + git commit/push까지 끝나면 아래 "작업 순서" 10번에서 정지하고 배포 안내문구를 출력한다.

기술 필수 사항

  • .env: BOM 없는 UTF-8로 저장
  • server.pymcp.run()에는 항상 stateless_http=True를 지정한다(누락 시 fly.io 멀티머신 환경에서 세션 404 발생)
  • 응답 파싱: dataType=JSON 요청이 기본이나, 에러 응답이 XML로 올 수 있으므로 response.json() 실패 시 XML <resultCode>/<resultMsg> 정규식 폴백을 반드시 구현한다
  • 숫자 필드는 안전 변환 함수를 통해서만 다룬다. 결측치(+900 이상, -900 이하, 문자열 "-")는 0이 아니라 None으로 반환한다(기온·강수량 등은 결측과 실측 0을 구분해야 하는 데이터).
  • IP 추출: Fly-Client-IP 헤더 최우선, 없을 때만 X-Forwarded-For 폴백
  • CORS preflight(OPTIONS)는 rate limit 카운터에서 제외한다

API 키 취급

  • 항상 os.environ으로 읽는다. 하드코딩 금지.
  • 환경변수명은 DEVPLAN.md의 ENV_KEY: WEATHER_FORECAST_SERVICE_KEY를 그대로 사용한다.
  • .env 갱신 여부를 사용자가 주장하면, 재테스트 전 파일 크기/내용이 실제로 바뀌었는지 먼저 확인한다.
  • 키를 표준출력에 찍지 않는다. 필요하면 앞 4자리 + "..." + 길이만 출력한다.

오퍼레이션 4종 → 툴 매핑 (DEVPLAN.md 2절 참고, 1:1 최소 매핑 원칙)

  • get_ultra_srt_ncst (getUltraSrtNcst, 초단기실황조회)
  • get_ultra_srt_fcst (getUltraSrtFcst, 초단기예보조회)
  • get_vilage_fcst (getVilageFcst, 단기예보조회)
  • get_fcst_version (getFcstVersion, 예보버전조회)

각 툴의 docstring에는 반드시:

  • 필수/선택 파라미터, base_time이 정시/30분 단위 등 발표시각 제약이 있다는 점
  • 응답 category 코드값(단위 포함, 예: TMP=℃, REH=%, WSD=m/s)
  • 코드값 필드(SKY/PTY 등)는 숫자가 아니라 사람이 읽을 수 있는 한글 설명을 함께 반환

area_name → nx/ny 자동 매핑

  • area_codes.json(엑셀 3,838행 변환, 프로젝트 루트에 내장)을 로드해 사용
  • 자외선지수 MCP의 기존 get_uv_forecast 처리 방식과 동일하게: area_name 입력 시 3단계(읍면동) → 2단계(시군구) → 1단계(시도) 순으로 매칭 시도, 여러 후보 있으면 첫 번째 사용하고 그 사실을 응답에 명시
  • nx/ny 직접 입력도 지원(둘 중 하나는 필수)
  • 변환 스크립트는 1회성이므로 scripts/convert_area_codes.py 등으로 별도 보관 가능(최종 산출물인 area_codes.json만 배포에 포함)

코드값 매핑 (DEVPLAN.md 4절 참고, code_tables.py에 상수로 정리)

  • SKY: 1=맑음, 3=구름많음, 4=흐림
  • PTY(초단기): 0=없음, 1=비, 2=비/눈, 3=눈, 4=소나기, 5=빗방울, 6=빗방울눈날림, 7=눈날림
  • PTY(단기): 0=없음, 1=비, 2=비/눈, 3=눈, 4=소나기
  • PCP/SNO 범주 문자열 변환 규칙 적용(원본값 + 문자열 설명 함께 반환)
  • 연장기간(+4~5일) PCP/SNO/WSD 정성정보 코드(1/2/3)는 위 코드값과 별개 체계이므로 혼동하지 않도록 별도 필드로 구분
  • VEC(풍향) → 16방위 변환 공식 적용: int((풍향값 + 22.5*0.5) / 22.5) % 16 → 방위 매핑표

Read the full file on GitHub · 104 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. 5d ago First seen · 104 lines · 1,948 tokens per session scan A 7f6449bd4cef

Subscribe to this mod's changes

weather-forecast-mcp CLAUDE.md is an instructions file published in the GitHub repository hlucent/weather-forecast-mcp (0 stars, last pushed 13d ago), licensed MIT. It adds 1,948 tokens to every session, about $0.0097 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-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens