Claude-for-reservoir-engineering
A nine-exercise training course teaching reservoir and petroleum engineers how to write precise prompts for Claude Code so it reliably handles real engineering tasks like decline curve analysis and PVT calculations.
This repository is a training course that teaches reservoir and petroleum engineers how to use Claude Code, an AI-assisted coding tool, for real engineering work. It is written for engineers who already understand domain concepts like production data, decline curve analysis, and PVT calculations, but who want to use AI to speed up their coding without letting the AI make unchecked assumptions.
The course is organized into nine exercises, each focused on a specific engineering workflow: reviewing production data quality, analyzing water-cut trends, writing decline curve sanity checks, creating persistent project memory files, packaging reusable workflows as skills, adding a reviewer agent that catches unit and correlation mistakes, running shell-based production CSV checks, calling peer-reviewed petroleum engineering functions through an AI-compatible tool server, and running parallel sensitivity studies. Each exercise shows a vague prompt first, then a better one, so the reader can compare what changes and why.
The central idea is that the engineer stays in control. Claude Code produces more dependable technical work when the person directing it names the specific file, explains the units, states the expected physical behavior, and requests tests with known reference values. The course demonstrates this pattern through concrete, repeatable examples rather than abstract guidance.
The technical setup requires Python 3.10 or newer and the Claude Code command-line tool. An optional library called pyResToolbox provides peer-reviewed petroleum engineering calculations, and a companion tool server exposes those calculations to Claude Code during live sessions. This lets engineers ask Claude to run real PVT calculations through a tested library rather than having it produce its own formulas from scratch.
The course was adapted from a similar project built for hydrology, with every exercise rewritten around reservoir engineering problems that practicing engineers will recognize from their daily work.
Where it fits
- Work through nine hands-on exercises to learn how to write Claude Code prompts that produce reliable reservoir engineering calculations instead of guessed formulas.
- Integrate pyResToolbox as a tool server so Claude Code runs peer-reviewed PVT and decline curve functions rather than generating its own equations.
- Set up a reviewer agent inside Claude Code that automatically flags unit and correlation mistakes in petroleum engineering scripts before they reach production.