Petropy logo

Petropy

Community
SteadfastAsArt
petropy

Configure PetroPy fluid-property and multimineral formation evaluation from normalized LAS well logs. Use for calibrated porosity, water saturation, mineral and pore-volume estimation, missing-sample handling, and explicitly defined pay intervals. Requires documented log units, fluid parameters and mineral endpoints; standalone permeability correlations need separate methods.

Overview

PublisherSteadfastAsArt
Repositorygeoscience-skills
Skill namepetropy
Stars
75
Forks
9
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by SteadfastAsArt on GitHub. Read the source before you install it.

Installation

Install the Petropy AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/SteadfastAsArt/geoscience-skills/tree/main/petropy
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SteadfastAsArt/geoscience-skills.git /tmp/geoscience-skills
mkdir -p .claude/skills
cp -r /tmp/geoscience-skills/petropy .claude/skills/petropy
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Petropy in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Petropy on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Petropy is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Configured PetroPy formation evaluation

PetroPy 0.1.6 uses Log.fluid_properties() followed by Log.multimineral_model(). It does not provide the previously shown shale_volume, formation_porosity, water_saturation, permeability or to_las methods. Export a Log with write(...).

Environment and input contract

Use an isolated Python 3.11 environment with the metadata dependencies. The verified combination is PetroPy 0.1.6, lasio 0.30 and NumPy 1.26.4; lasio 0.32 removed add_curve, which PetroPy still calls. Old lasio 0.23/0.29 also fail with modern NumPy during header parsing. The cchardet prerelease has Python 3.11 wheels; dependency declarations in this skill do not install packages.

Before creating Log, prepare and inspect measured GR_N, NPHI_N, RHOB_N and RESDEEP_N. Their units are API, fraction v/v, g/cm³ and ohm·m. Input depth must be strictly increasing nonnegative feet of TVD below the well surface, with an identified datum, for these temperature/pressure correlations. The synthetic fixture is a vertical well where MD equals TVD. Deviated-well MD cannot be passed directly; establish a TVD/PVT treatment separately without silently resampling the logs. Convert percent neutron porosity explicitly. Do not rely on PetroPy's legacy density-porosity fallback: require a validated measured density curve before preconditioning. Keep missing measurements as NaN and retain their masks.

Run a configured model

The following function expects input satisfying that contract and a reviewed configuration. Declare depth_basis="tvd_below_surface" and depth_datum; the helper rejects an MD basis. example_config.json is a synthetic clean quartz/calcite calibration, not a default calibration for a field well. Adjust its interval, fluid parameters, mineral endpoints and weights using actual well/laboratory information before field use.

python
import json
import petropy as pp

def run_configured(las_path, config_path):
    with open(config_path, encoding='utf-8') as stream:
        config = json.load(stream)
    top, bottom = config['interval_ft']
    log = pp.Log(str(las_path))
    log.fluid_properties(top=top, bottom=bottom, **config['fluid'])
    log.multimineral_model(top=top, bottom=bottom, **config['multimineral'])
    return log

PetroPy 0.1.6 requires top and bottom to equal existing sampled depths, yet calculates on [top, bottom): the bottom sample remains unevaluated. Do not pass an arbitrary interval endpoint or describe all samples as evaluated. The library skips rows with missing required measurements; do not turn those rows into zero porosity, zero saturation or non-pay.

Validated helper and result checks

The formation evaluation helper validates normalized curve names/units, increasing feet depth, exact interval endpoints, explicit fluid/mineral calibration and positive density/resistivity. It runs the actual library, checks bulk and pore-volume closure, and writes LAS plus a JSON record of resolved parameters, interval, sample counts and source checksum. It rejects previously calculated model curves to prevent stale values surviving at missing or excluded samples.

bash
python scripts/formation_evaluation.py normalized.las \
  --config reviewed_config.json --output evaluated.las

Resolve the script relative to the installed skill directory. Confirm for evaluated rows that matrix-mineral bulk volumes + BVCLAY + BVOM + BVPYR + PHIE sum to one, BVW + BVH equals PHIE, and SW/PHIE remain physical fractions. These are necessary consistency checks, not proof of a correct formation model.

Read calculations and pay intervals for the difference between bulk and matrix fractions and a stated thickness convention. Read fluid-property units before changing PVT inputs or interpreting fluid outputs. Standalone permeability, clustering, plotting and gas/shaly/organic-rich calibrations need separate validation.

Verification scope

Executed real LAS read/write, configured fluid calculation and two-mineral NNLS evaluation with project-generated observations. The analytic synthetic mixture is 65% quartz, 15% calcite and 20% water-filled pores. Tests check recovered fractions, conservation, feet-based temperature/pressure, NaN masks, interval edges and CLI failures. This is an API and physical-consistency baseline, not field calibration or a blanket validation of legacy PetroPy.

Official PetroPy implementation, checked against 0.1.6 on 2026-09-14.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Petropy AI skill do?

Configure PetroPy fluid-property and multimineral formation evaluation from normalized LAS well logs. Use for calibrated porosity, water saturation, mineral and pore-volume estimation, missing-sample handling, and explicitly defined pay intervals. Requires documented log units, fluid parameters and mineral endpoints; standalone permeability correlations need separate methods.

Why use Petropy on TypingMind?

Because you install it once and use it with any model. Petropy is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Petropy in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/SteadfastAsArt/geoscience-skills/tree/main/petropy. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Petropy?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Petropy?

As many as you like. As long as a model supports skills, you can use Petropy with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Petropy AI skill free?

Yes. It is published on GitHub by SteadfastAsArt under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇