production-forecaster

Forecast oil & gas well production using decline curve analysis. Use when estimating EUR, generating type curves, fitting Arps models (exponential, hyperbolic, harmonic), or running reserve calculations. Supports conventional and unconventional wells, P10/P50/P90 probabilistic outputs, and multi-field type curve comparison.

5 stars

Best use case

production-forecaster is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Forecast oil & gas well production using decline curve analysis. Use when estimating EUR, generating type curves, fitting Arps models (exponential, hyperbolic, harmonic), or running reserve calculations. Supports conventional and unconventional wells, P10/P50/P90 probabilistic outputs, and multi-field type curve comparison.

Teams using production-forecaster should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/production-forecaster/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.claude/skills/data/energy/production-forecaster/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/production-forecaster/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How production-forecaster Compares

Feature / Agentproduction-forecasterStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Forecast oil & gas well production using decline curve analysis. Use when estimating EUR, generating type curves, fitting Arps models (exponential, hyperbolic, harmonic), or running reserve calculations. Supports conventional and unconventional wells, P10/P50/P90 probabilistic outputs, and multi-field type curve comparison.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Production Forecaster

Forecast oil and gas production using industry-standard decline curve analysis.
Supports Arps decline models, type curve generation, and EUR calculations for
reserve estimation.

## When to Use

- Forecasting future production for oil and gas wells
- Estimating EUR (Estimated Ultimate Recovery)
- Generating type curves for field development planning
- Fitting decline parameters to historical production data
- Comparing well performance across different fields
- Supporting reserve booking and economic evaluation

## Core Pattern

```
Historical Production → Decline Curve Fit → Parameter Estimation → Forecast → EUR
```

## Decline Curve Models

### Arps Equations

| Model | Equation | b value | Typical Use |
|-------|----------|---------|-------------|
| Exponential | `q(t) = qi * exp(-Di * t)` | 0 | Mature conventional |
| Hyperbolic | `q(t) = qi / (1 + b*Di*t)^(1/b)` | 0–1 | Most common |
| Harmonic | `q(t) = qi / (1 + Di*t)` | 1 | Fracture-dominated |
| Modified Hyperbolic | Hyperbolic until D(t) ≤ D_min, then exponential | — | Long-term forecast |

Parameters: `qi` = initial rate, `Di` = initial decline rate, `b` = exponent, `t` = time.

### Unconventional Models

**Duong** (transient linear flow): `q(t) = q1 * t^(-m) * exp(-a/(1-m) * (t^(1-m) - 1))`

**Stretched Exponential**: `q(t) = qi * exp(-(t/τ)^n)`

See `references/examples.md` for full class implementations and fitting code.

## Key Classes

| Class | Purpose |
|-------|---------|
| `DeclineCurveAnalyzer` | Fit decline models to production data; calculate EUR and validation metrics |
| `ProductionForecaster` | Generate rate/cumulative forecasts from fitted parameters |
| `TypeCurveGenerator` | Normalize wells, bin by attribute, generate P10/P50/P90 type curves |
| `ProductionReportGenerator` | Render interactive HTML reports via Plotly |

### Quick Start — Single Well

```python
from production_forecaster import DeclineCurveAnalyzer, ProductionForecaster
import pandas as pd

historical = pd.read_csv('data/production/well_a1.csv')  # columns: date, rate

analyzer = DeclineCurveAnalyzer(historical)
params, model_type = analyzer.fit_best_model()           # picks best RMSE fit

forecaster = ProductionForecaster(params, cumulative_to_date=historical['cumulative'].iloc[-1])
forecast = forecaster.forecast(years=30, economic_limit=25)

print(f"Model: {model_type} | EUR: {forecast.eur_oil/1e6:.2f} MMbbl")
```

### Quick Start — Type Curves

```python
from production_forecaster import TypeCurveGenerator, NormalizationMethod, TypeCurveBinType
import pandas as pd, glob

wells = [pd.read_csv(f) for f in glob.glob('data/production/field_x/*.csv')]
generator = TypeCurveGenerator(wells, metadata=well_metadata)
generator.normalize_wells(method=NormalizationMethod.IP_30)
generator.create_bins(TypeCurveBinType.WATER_DEPTH)

bin_results = generator.generate_bin_type_curves(TypeCurveBinType.WATER_DEPTH)
eur_dist = generator.calculate_eur_distribution(economic_limit=25)
```

## Type Curve Normalization Methods

| Method | Key | Best For |
|--------|-----|----------|
| Peak rate | `peak` | Clear IP wells |
| First month avg | `first_month` | Consistent start-up |
| 30-day IP | `30_day_ip` | Standard industry definition |
| 90-day IP | `90_day_ip` | More stable baseline |
| Moving average | `moving_average` | Noisy data |

Bins: `formation`, `completion`, `water_depth`, `lateral_length`, `proppant`, `vintage`.
Percentiles: P10 = optimistic (90th), P50 = median, P90 = conservative (10th).

## CLI Summary

```bash
# Fit and forecast
uv run --no-project python -m production_forecaster fit --data well.csv --model hyperbolic
uv run --no-project python -m production_forecaster forecast --config config/forecast.yaml

# Type curves
uv run --no-project python -m production_forecaster type-curve \
    --wells data/production/*.csv --normalize 30_day_ip --bin-by water_depth

# EUR
uv run --no-project python -m production_forecaster eur --qi 5000 --di 0.35 --b 0.8 --limit 25
```

Full CLI options, YAML config templates, and complete class implementations:
→ `references/examples.md`

## Best Practices

**Data quality**: Clean outliers; use ≥6–12 months of decline data; account for
workovers and shut-ins.

**Model selection**: Exponential for mature conventional; hyperbolic for most
unconventional; high b (>1) for extended linear flow. Use modified hyperbolic
for long-term forecasts to cap optimism with a terminal decline rate (5–8%/year).

**Uncertainty**: Always generate P10/P50/P90. Update forecasts quarterly.
Document all assumptions for reserve booking.

## Data Models (summary)

```
DeclineParameters(qi, di, b, decline_type, min_rate, d_min, a, m, tau, n)
ProductionRecord(date, oil_rate, gas_rate, water_rate, days_on)
ForecastResult(dates, oil_rates, gas_rates, cumulative_oil, eur_oil, remaining_oil, ...)
TypeCurveResult(months, p10/p50/p90_rates, mean_rates, well_counts, eur_p10/p50/p90, ...)
```

Full dataclass definitions in `references/examples.md §Data Models`.

## Related Skills

- `../npv-analyzer/SKILL.md` — Economic evaluation with Monte Carlo simulation
- `../bsee-data-extractor/SKILL.md` — Extract BSEE production, WAR, and APD data
- `../field-analyzer/SKILL.md` — Field-level production analysis
- `../well-production-dashboard/SKILL.md` — Production visualization

---
*v2.0.0 (2025-12-30): Initial release. v2.1.0 (2026-03-08): Trimmed to thin guide; bulk content → references/examples.md.*

Related Skills

well-production-dashboard

5
from vamseeachanta/workspace-hub

Create interactive well production dashboards with real-time monitoring, verification integration, economic metrics, and multi-format exports. Use for well performance analysis, field aggregation, production forecasting, and API-driven dashboards.

gtm-site-readiness-audit-local-vs-production

5
from vamseeachanta/workspace-hub

Audit GTM feature work by separating local artifact readiness from production deployment state, then fix common blockers in aceengineer-website and GTM collateral.

testing-production

5
from vamseeachanta/workspace-hub

Production validation specialist ensuring applications are fully implemented and deployment-ready. Use to verify no mock/stub/fake implementations remain, validate against real databases and APIs, perform end-to-end testing with actual systems, and confirm production readiness.

testing-production-real-data-usage

5
from vamseeachanta/workspace-hub

Sub-skill of testing-production: Real Data Usage (+3).

testing-production-production-validation-vs-unit-testing

5
from vamseeachanta/workspace-hub

Sub-skill of testing-production: Production Validation vs Unit Testing (+1).

testing-production-example-4-security-validation

5
from vamseeachanta/workspace-hub

Sub-skill of testing-production: Example 4: Security Validation.

testing-production-example-1-complete-validation-suite

5
from vamseeachanta/workspace-hub

Sub-skill of testing-production: Example 1: Complete Validation Suite (+2).

testing-production-1-implementation-completeness-check

5
from vamseeachanta/workspace-hub

Sub-skill of testing-production: 1. Implementation Completeness Check (+2).

engineering-report-generator-ex1-production-report

5
from vamseeachanta/workspace-hub

Sub-skill of engineering-report-generator: Example 1: Production Analysis Report (+2).

dash-gunicorn-production-server

5
from vamseeachanta/workspace-hub

Sub-skill of dash: Gunicorn Production Server (+2).

test-oversized-skill

5
from vamseeachanta/workspace-hub

A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.

interactive-report-generator

5
from vamseeachanta/workspace-hub

Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.