petropy
Skill67 starsChanged 10 months agoMITView on GitHub
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.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bouleSkill
- brugesSkill
- devitoSkill
- disbaSkill
- discretizeSkill
- dlisioSkill
- ensaioSkill
- flopySkill
- gemgisSkill
- gempySkill
- geolimeSkill
- geostatspySkill
- gnnwrSkill
- gprpySkill
- harmonicaSkill
- landlabSkill
- lasioSkill
- loopstructuralSkill
- mplstereonetSkill
- mtpySkill
- obspySkill
- pastasSkill
- poochSkill
- pygimliSkill
- pygmtSkill
- pyleoclimSkill
- pylopsSkill
- pyroliteSkill
- pyvistaSkill
- rockhoundSkill
- scikit-gstatSkill
- segyioSkill
- segysakSkill
- simpegSkill
- striplogSkill
- using-geoscience-skillsSkill
- verdeSkill
- wellySkill
- xarraySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Use an isolated Python 3.11 environment with the metadata dependencies.
- Very specific: line 35
Before creating Log, prepare and inspect measured GR_N, NPHI_N, RHOB_N and RESDEEP_N.
- Distinctive: line 44
Keep missing measurements as NaN and retain their masks.
- Distinctive: line 95
Read calculations and pay intervals for the difference between bulk and matrix fractions and a stated thickness convention.
- Very specific: line 97
Read fluid-property units before changing PVT inputs or interpreting fluid outputs.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 logPetroPy 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.
python scripts/formation_evaluation.py normalized.las \
--config reviewed_config.json --output evaluated.lasResolve 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

