petropy

petropy is a skill for Claude Code, Codex from SteadfastAsArt/geoscience-skills. It costs 69 tokens per session (1,300 once invoked), scanned A, original, MIT.

A Python toolkit for interpreting measurements from underground rock formations using well logs. Well logs are recorded measurements taken along the depth of a borehole.

In plain words
What is it for?
Use it to estimate shale content, porosity, water saturation, permeability, lithology, and electrofacies from LAS well-log data.
Why use it?
It turns common log measurements into estimates of rock and fluid properties, helping users evaluate what formations contain and how they may behave.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to estimate shale content, porosity, water saturation, permeability, lithology, and electrofacies from LAS well-log data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/steadfastasart/geoscience-skills/petropy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SteadfastAsArt/geoscience-skills --skill petropy
Clone the repo
git clone --depth 1 https://github.com/SteadfastAsArt/geoscience-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin petropy — /plugin install petropy after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for petropy

README.md
[![agentmods](https://agentmods.dev/badge/skills/steadfastasart/geoscience-skills/petropy/github.svg)](https://agentmods.dev/skills/steadfastasart/geoscience-skills/petropy)
Your own site
<a href="https://agentmods.dev/skills/steadfastasart/geoscience-skills/petropy"><img src="https://agentmods.dev/badge/skills/steadfastasart/geoscience-skills/petropy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for petropy

Your own site · 80×15
<a href="https://agentmods.dev/skills/steadfastasart/geoscience-skills/petropy"><img src="https://agentmods.dev/badge/skills/steadfastasart/geoscience-skills/petropy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01300
Opus 5.5 $0.00028 $0.00520
Sonnet 5.5 $0.00014 $0.00260
Haiku 4.5 $0.00007 $0.00130

Measured 1mo ago against content hash d6d460cb64d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

petropy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/formation_evaluation.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

petropy/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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

Read the full file on GitHub · 112 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -62 lines · -48 tokens per session d6d460cb64d6
  2. 1mo ago Changed · +2 lines · +1 tokens per session a125bf706d5b
  3. 2mo ago First seen · 172 lines · 116 tokens per session scan A 543b6cc3afd7

Subscribe to this mod's changes

petropy is a skill published in the GitHub repository SteadfastAsArt/geoscience-skills (73 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,300 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.