explaingit

lorenliu13/claude-code-for-hydrology

44Python

TLDR

Claude Code for Hydrology is a teaching repository aimed at water scientists and researchers who want to use Claude Code more effectively.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

In plain English

Claude Code for Hydrology is a teaching repository aimed at water scientists and researchers who want to use Claude Code more effectively. Claude Code is a command line tool from Anthropic that lets the user pair with the Claude model on real code. The exercises in this repo use real hydrology topics such as streamflow analysis, drought indices, model performance metrics, and USGS gauge data, so the reader practices prompting on examples close to their day job. Each exercise shows a before and after prompt pattern. The reader first runs a vague prompt and sees what Claude produces, then clears the chat context, runs a more specific prompt, and compares the two outputs. The difference between the two is treated as the lesson. The repo lists nine numbered exercises grouped into foundations and workflows. Foundations are explore then plan then code with plan mode, naming specific files and symptoms in prompts, giving Claude tests so it can check its own work, and using /init to generate a CLAUDE.md file that gives Claude persistent project context. The hydrology tasks tied to these include adding a function to compute Q90 and Q95 exceedance flows, fixing a swapped mean and std in the Standardized Precipitation Index, and implementing the Nash Sutcliffe and Kling Gupta efficiency metrics. The workflow exercises cover making custom skills like /hydro-context and /flow-report for reusable domain knowledge, orchestrating a coder subagent and a reviewer subagent in sequence, using the AWS CLI from inside Claude to fetch public hydrology datasets, calling the USGS NWIS API through an MCP fetch server, and spawning parallel subagents to compute SPI drought indices at multiple time scales and aggregate them with a reporter subagent. Prerequisites are Claude Code installed through npm, Python 3.10 or newer, and a terminal. Each exercise folder has a test file you can run with pytest. The repo is MIT licensed.

Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.