Tutorial

Give Claude Code access to Europe's electricity data

Install the python-entsoe CLI and drop a skill file so Claude Code can query prices, load, generation, and transmission data across 30+ European countries.

Give Claude Code access to Europe's electricity data

If you work with European electricity market data, you’ve probably written scripts to pull prices, generation, or cross-border flows from the ENTSO-E Transparency Platform. What if your AI coding assistant could do that directly from the terminal?

python-entsoe ships with a CLI and a Claude Code skill file — a markdown document that teaches Claude how to use the CLI. Drop it into your project, and Claude can query day-ahead prices, compare generation mixes across countries, analyze transmission flows, and run pandas expressions — all without you writing a single line of code.

What’s a Claude Code skill?

A skill is a markdown file that Claude Code reads automatically when it’s relevant to your question. It contains instructions, command references, and conventions — everything Claude needs to use a tool correctly.

If you want to learn more about skills, check out our python-esios skill tutorial which covers the concept in depth. Here we’ll focus on what’s specific to ENTSO-E.

The python-entsoe skill teaches Claude:

  • The full CLI command reference across 5 namespaces (prices, load, generation, transmission, balancing)
  • Country codes for 30+ European countries and bidding zones
  • PSR type reference for generation queries (solar, wind, nuclear, gas, etc.)
  • Output formats (table, CSV, JSON) and the exec command for ad-hoc pandas expressions

Setup

1. Install the library

pip install --upgrade python-entsoe

This installs the Python library and the entsoe CLI command.

2. Set your API key

Request a free API key from the ENTSO-E Transparency Platform, then:

Option A — persistent config (recommended):

entsoe config set api-key your-key-here

This stores the key in ~/.config/entsoe/config.toml so you don’t need to export it every session.

Option B — environment variable:

export ENTSOE_API_KEY=your-key-here

3. Add the skill to your project

Copy the skill file into your project’s .claude/skills/ directory:

mkdir -p .claude/skills/entsoe
curl -o .claude/skills/entsoe/SKILL.md \
  https://raw.githubusercontent.com/datons/python-entsoe/main/src/entsoe/.agents/skills/entsoe/SKILL.md

That’s it. Next time you open Claude Code in this project, it will automatically discover the skill.

What Claude can do now

Query day-ahead prices

You: “What were electricity prices in France last week?”

Claude runs:

entsoe prices day-ahead -s 2024-06-01 -e 2024-06-08 --country FR
Out9 lines
┌─────────────────────────┬──────────┬──────────┬────────────┐
│ timestamp               │ value    │ currency │ price_unit │
├─────────────────────────┼──────────┼──────────┼────────────┤
│ 2024-06-01 00:00:00     │  28.54   │ EUR      │ MWH        │
│ 2024-06-01 01:00:00     │  24.12   │ EUR      │ MWH        │
│ 2024-06-01 02:00:00     │  21.30   │ EUR      │ MWH        │
│ ...                     │  ...     │ ...      │ ...        │
└─────────────────────────┴──────────┴──────────┴────────────┘
Showing 50 of 168 rows

Compare countries

You: “Compare day-ahead prices between France and Spain for the first week of June”

entsoe prices day-ahead -s 2024-06-01 -e 2024-06-08 --country FR --country ES

Multi-country queries add a country column, so Claude can group, pivot, or compare the data downstream.

Analyze generation mix

You: “What’s the solar and wind generation in Germany this week?”

entsoe generation actual -s 2024-06-01 -e 2024-06-08 --country DE_LU --psr solar --psr wind_onshore

The --psr flag accepts human-readable names (solar, wind_onshore, gas, nuclear) or ENTSO-E codes (B16, B19).

Check cross-border flows

You: “Show me the physical flows from France to Spain”

entsoe transmission flows -s 2024-06-01 -e 2024-06-08 --from FR --to ES

Transmission commands use --from and --to instead of --country.

Run pandas expressions

This is the power move. The exec command fetches data and evaluates any pandas expression — no script needed:

You: “What were the average daily prices in France last week?”

entsoe exec prices day-ahead -s 2024-06-01 -e 2024-06-08 -c FR \
  -x "df.groupby(df['timestamp'].dt.date)['value'].mean().round(2)"

You: “Show me descriptive statistics”

entsoe exec prices day-ahead -s 2024-06-01 -e 2024-06-08 -c FR -x "df.describe()"

You: “Export it to CSV”

entsoe prices day-ahead -s 2024-06-01 -e 2024-06-08 --country FR \
  --format csv --output prices.csv

Real workflow: comparing France and Spain prices

Here’s what a real conversation looks like. You ask one question, Claude handles the rest:

You: “Compare the average daily electricity prices between France and Spain for June 2024. Which country was more expensive on average?”

Claude:

  1. Fetches the data:
entsoe exec prices day-ahead -s 2024-06-01 -e 2024-06-30 -c FR -c ES \
  -x "df.groupby(['country', df['timestamp'].dt.date])['value'].mean().round(2).unstack(0)" \
  --format csv --output /tmp/fr_es_prices.csv
  1. Analyzes:
entsoe exec prices day-ahead -s 2024-06-01 -e 2024-06-30 -c FR -c ES \
  -x "df.groupby('country')['value'].describe().round(2)"
  1. Summarizes: “France averaged 32.15 EUR/MWh while Spain averaged 28.90 EUR/MWh in June 2024. France was more expensive on 22 out of 30 days, with the largest gap on June 15 (45.20 vs 18.30 EUR/MWh) during a low-wind period.”

No script. No notebook. Just a question and an answer backed by real data.

The 5 namespaces at a glance

NamespaceCommandsWhat it covers
pricesday-aheadDay-ahead market prices
loadactual, forecastTotal system load and forecasts
generationactual, forecast, capacity, per-plantGeneration output, forecasts, installed capacity
transmissionflows, exchanges, capacityCross-border physical flows, scheduled exchanges, NTC
balancingprices, volumesImbalance prices and volumes

Every command supports --format table|csv|json and --output file.csv.

Tips for writing good prompts

  • Be specific about dates: “June 2024” is better than “last month” — Claude knows the exact --start and --end flags
  • Use country codes: “FR” is unambiguous; “France” works too but codes are faster
  • Name the PSR type: “solar generation” triggers the right --psr solar flag
  • Ask for exports: Claude will use --format csv --output automatically
  • Chain analysis: “fetch generation data, compute daily totals by type, find the peak solar day” — Claude chains exec calls

Conclusions

With the python-entsoe skill, Claude Code becomes a European electricity market analyst:

  • entsoe prices day-ahead — day-ahead prices for any country
  • entsoe load actual|forecast — system load data
  • entsoe generation actual|forecast|capacity|per-plant — full generation breakdown with PSR type filtering
  • entsoe transmission flows|exchanges|capacity — cross-border data
  • entsoe balancing prices|volumes — imbalance data
  • entsoe exec — run pandas expressions on any query without writing scripts

The skill file is the bridge: it gives Claude the knowledge to use these commands correctly, with the right flags, country codes, and conventions.

Resources

Keep reading

Related articles you might enjoy

Table of Contents
Search sections

Subscribe to our newsletter

Get weekly insights on data, automation, and AI.

© 2026 Datons. All rights reserved.