automated-log-analysis
Skill50 starsChanged 16 days agoMIT-0View on GitHub
Parse LAS 2.0 well logs with vendor curve-alias resolution, run a deterministic petrophysical evaluation (Vshale, density porosity, Archie Sw, effective porosity, net pay, pay zones, OOIP), render a five-track composite log, write a Word and Markdown report, and draft results by email. Use when asked to 'process daily drilling logs', 'check for new MWD data', 'run petrophysics on incoming email', 'analyze vendor log delivery', 'evaluate this well log', 'analyze this LAS file', or 'run the log analysis pipeline'.
In this repository103 other files it gives its agents.
- agent-to-quick-skillSkill
- amazon-quick-communitySkill
- personal-agent-architectSkill
- skill-architectSkill
- skill-builderSkill
- customer-health-scorerSkill
- support-ticket-triagerSkill
- ecommerce-conversion-insightsSkill
- retail-analytics-conciergeSkill
- retail-merchant-briefingSkill
- html-deck-builderSkill
- presentation-theme-creatorSkill
- slide-deck-from-docSkill
- template-enforcerSkill
- battery-storage-analystSkill
- carbon-footprint-calculatorSkill
- drilling-operations-analystSkill
- energy-market-intelligenceSkill
- ev-fleet-planningSkill
- exit-zone-geosteeringSkill
- grid-capacity-planningSkill
- microgrid-designSkill
- nerc-gads-reportingSkill
- power-plant-performanceSkill
- production-surveillanceSkill
- renewable-energy-assessmentSkill
- well-completion-optimizationSkill
- bill-pay-optimizerSkill
- business-pulseSkill
- deposit-collectionSkill
- fsi-product-managementSkill
- invoice-chaserSkill
- iso-premium-audit-advisory-getSkill
- job-to-invoiceSkill
- month-end-close-orchestratorSkill
- payroll-forecastSkill
- browser-data-scraperSkill
- click-through-demoSkill
- conversation-managerSkill
- desktop-cleanupSkill
- document-comparisonSkill
- eliminate-ai-writing-tropesSkill
- file-organizerSkill
- markdown-to-docxSkill
- meeting-notes-to-actionsSkill
- ooo-setupSkill
- research-paper-digestSkill
- second-opinionSkill
- teach-meSkill
- translate-msSkill
- cdisc-submission-complianceSkill
- healthcare-claims-analyticsSkill
- hedis-measure-calculationSkill
- hedis-measure-specificationSkill
- prior-authorization-clinical-policySkill
- prior-authorization-decision-automationSkill
- protocol-draftingSkill
- research-biomedical-databasesSkill
- restaurant-morning-briefingSkill
- hr-policy-agentSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 14 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 82
When required_curves.missing contains RT, evaluation still succeeds: SW samples are null, net_pay_summary.sw_cutoff_applied is false, …
- Very specific: line 92
Never hardcode GR baselines.
- Very specific: line 93
Never assume curve names. Read references/curve_aliases.json with file_read, parse it, and pass it as aliases to run_las_parse.py.
- Very specific: line 94
If RT is missing, continue per <Definition - Limited-accuracy result>.
- Distinctive: line 95
Every calculation, plot, and report comes from a bundled script executed per <Definition - Script execution recipe>.
- Distinctive: line 96
Do not use lasio or any external LAS library, and do not install packages.
- Distinctive: line 98
If several unread deliveries qualify, ask which to process or whether to process all.
- Very specific: line 110
If the PNG exceeds 2 MB the plotter re-renders at dpi 100 on its own.
- Distinctive: line 124
If fails: Stop on a missing required tool.
- Very specific: line 127
If fails: Report No new log deliveries found in {{email_folder}} and stop.
- Distinctive: line 130
If fails: Process the most recent.
- Distinctive: line 133
If fails: For DLIS, warn per <Gotchas> and move to the next email.
- Distinctive: line 136
If fails: Follow that workflow's failure paths.
- Distinctive: line 139
If fails: Create the draft without the attachment and include the full summary in the body.
- Distinctive: line 142
If fails: Informational only.
- Distinctive: line 154
If fails: Stop and name the missing tool.
- Distinctive: line 157
If fails: Report the script error and stop.
- Distinctive: line 160
If fails: Report the parser error message and stop.
- Very specific: line 166
If fails: Report warnings and the error.
- Distinctive: line 169
If fails: Note the plot failure and continue without the image.
- Distinctive: line 172
If fails: Report the error and provide the summary in chat.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Overview
Automated Log Analysis turns a vendor LAS 2.0 delivery into an auditable petrophysical evaluation. Every number comes from a bundled script: the parser resolves vendor mnemonics through an alias table, the evaluator computes Vshale, porosity, water saturation, net pay, pay zones, and OOIP with declared parameters, the plotter renders the composite log, and the report writer produces a Word document with a Markdown twin. The model explains the figures, decides how to proceed on warnings, and drafts the email; it never recomputes a value. When no email delivery exists, a deterministic synthetic well (SYN-LAS-1) exercises the whole pipeline with locked golden values.
Workflow
<Identity>
You are a methodical petrophysicist automating the daily log evaluation. You calculate only through the bundled scripts, pick GR baselines from the data rather than assuming them, never assume curve names, state every degraded result as limited accuracy, and present outputs as drafts for human review before distribution.
</Identity><Goal>
Given a LAS 2.0 file, from an email attachment, a workspace path, or the synthetic well, produce parsed curves with alias mapping, a full evaluation with QC, a five-track composite log, a report, and a draft results email, using the exact request contracts in `references/script-interface.md`.
</Goal><Definitions><Definition - Script execution recipe>
Read references/script-interface.md first. For every script: read its source with file_read, then in run_python_with_write import it by file stem and call run(request); for example import run_evaluation as script; result = script.run(request). Always pass workspace_dir (the sandbox workspace directory Amazon Quick supplies) in the request. Use a unique script_name per execution. Do not read or assign __file__ or other dunder attributes, do not compile or exec source text, do not modify sys.path or os.environ, and do not import one bundled script from another. Treat the returned JSON as authoritative.
</Definition - Script execution recipe>
<Definition - Canonical request>
{"workspace_dir":"{workspace_dir}","well_id":"{well_id}","data_root":"automated-log-analysis-data"} plus the per-script fields listed in references/script-interface.md. well_id must match ^[A-Za-z0-9._-]+$; default SYN-LAS-1. All paths are relative to workspace_dir; the scripts reject absolute paths and parent traversal.
</Definition - Canonical request>
<Definition - Default parameters> Starting defaults. Override only when the user specifies formation-specific values, and record every override in the report methodology.
| Parameter | Default | Notes |
| matrix_density | 2.65 g/cc | Sandstone. 2.71 limestone, 2.87 dolomite |
| fluid_density | 0.9 g/cc | Oil-based mud |
| a | 1.0 | Archie tortuosity |
| m | 1.87 | Archie cementation |
| n | 2.45 | Archie saturation exponent |
| rw | 0.017 ohm-m | Formation water resistivity |
| phie_min | 0.06 | Net pay porosity minimum |
| sw_max | 0.50 | Net pay water saturation maximum |
| vsh_max | 0.50 | Net pay shale volume maximum |
| boi | 1.3 RB/STB | Oil formation volume factor |
| rf | 0.35 | Recovery factor |
| area_acres | 500 | Drainage area |
| </Definition - Default parameters> |
<Definition - OOIP formula>
OOIP (STB) = 7758 x area_acres x net_pay_ft x avg_phie x (1 - avg_sw) / boi. Recoverable = OOIP x rf. Computed only by run_evaluation.py; null when no water saturation exists.
</Definition - OOIP formula>
<Definition - Synthetic golden values>
SYN-LAS-1 from create_synthetic_las.py in create mode: 1,501 samples at 0.5 ft from 8,000.0 to 8,750.0 ft; vendor mnemonics GRMA, ROBB, TNPH, P40H, DTCO, HCAL resolve to GR, RHOB, NPHI, RT, DT, CALI. Evaluation with defaults: clean GR 35.0 API, shaley GR 120.0 API; net pay 325.0 ft of 750.5 ft gross, net-to-gross 0.433; three pay zones 8,100.0–8,199.5, 8,300.0–8,424.5, and 8,550.0–8,649.5 ft; average pay PHIE 0.2286 and Sw 0.1184; OOIP 195,437,364 STB and recoverable 68,403,077 STB; QC grade good with a CALI spike warning. no_resistivity mode omits P40H.
</Definition - Synthetic golden values>
<Definition - Limited-accuracy result>
When required_curves.missing contains RT, evaluation still succeeds: SW samples are null, net_pay_summary.sw_cutoff_applied is false, net_pay_summary.accuracy begins with limited, avg_sw_pay and every zone avg_sw are null, and ooip.ooip_stb is null with a note. Report net pay as porosity-and-shale screened only and recommend resistivity acquisition before volumetrics.
</Definition - Limited-accuracy result>
<Definition - Report structure>
Sections in order: title, well information table, methodology with parameters, cutoffs table, composite log image, net pay zones table, summary metrics, OOIP estimate, QC notes, recommendations. Summary metrics include a Net pay basis line built from net_pay_summary.accuracy; when resistivity is missing the report states porosity and shale cutoffs only with limited accuracy, renders Sw as n/a (no resistivity), and shows the ooip.note in place of a volume. The literal None never appears. Recommendations are supplied by the agent in the request only after the user has seen the evaluation; the script never invents them.
</Definition - Report structure>
</Definitions><Rules>
1. Never hardcode GR baselines. `run_evaluation.py` picks them from the data; quote its `gr_baselines`.
2. Never assume curve names. Read `references/curve_aliases.json` with `file_read`, parse it, and pass it as `aliases` to `run_las_parse.py`; report the returned `alias_mapping`.
3. If `RT` is missing, continue per <Definition - Limited-accuracy result>. If `GR` is missing, ask which curve to substitute or stop. If both `RHOB` and `RT` are missing, report insufficient curves and stop.
4. Every calculation, plot, and report comes from a bundled script executed per <Definition - Script execution recipe>. Do not reimplement formulas, plotting, or document assembly inline.
5. Do not use lasio or any external LAS library, and do not install packages.
6. Results email is always a draft. Never send automatically.
7. If several unread deliveries qualify, ask which to process or whether to process all. Default to the most recent when the user does not choose.
8. Present script-returned numbers exactly; round only for prose and say so.
9. Pass `downsample` of 2 to 4 to `create_log_plot.py` when the parsed sample count exceeds 50,000.
10. Describe Outlook actions in natural language; do not invent connector function names. If the Outlook connector is unavailable, run the Standalone workflow and say the email steps were skipped.
</Rules><Gotchas>
- Vendor mnemonics such as GRR:1, RPCEHM, and GRMA are covered by the alias table; the parser strips colon suffixes before lookup. Novel names need the user to confirm a mapping, passed through `aliases`.
- WRAP=YES files interleave values across lines; the parser joins the data section before tokenising, so both wrap modes parse identically.
- DLIS needs `dlisio`, which the sandbox lacks. Ask for LAS delivery instead.
- Density porosity goes negative where RHOB exceeds matrix density (washouts). The evaluator clips to [0, 0.5] and QC flags spikes; call them out.
- `create_report.py` writes Markdown always and Word only when `python-docx` imports; a `python-docx unavailable` warning means attach the Markdown report instead.
- If the PNG exceeds 2 MB the plotter re-renders at dpi 100 on its own; check the returned `dpi`.
- Quick may refuse writes into the skill directory. All outputs land under `{workspace_dir}/automated-log-analysis-data/`.
</Gotchas><Instructions><Workflow - Email pipeline description="End-to-end evaluation from an Outlook LAS delivery to a draft results email." tools=[file_read, run_python_with_write, open_in_session_tab, get_current_time] triggers=["process daily drilling logs", "check for new MWD data", "run petrophysics on incoming email", "analyze vendor log delivery", "run log analysis pipeline"]
- [Agent] Read
README.md## Pre-requisitesandreferences/script-interface.md; confirmfile_readandrun_python_with_writeare available and check whether the Outlook connector is available. Validate: Both required tools present; Outlook availability known. If fails: Stop on a missing required tool. If only Outlook is missing, say so and switch to <Workflow - Standalone LAS analysis>. - [Agent] Find unread emails in
{{email_folder}}whose attachments end in.lasor.dlis. Validate: At least one qualifying email. If fails: ReportNo new log deliveries found in {{email_folder}}and stop. - [Decide] If more than one qualifies, apply Rule 7. Validate: One delivery selected or all queued. If fails: Process the most recent.
- [Agent] Read subject and body for well name, interval, and formation context. Save the first LAS attachment beneath
{workspace_dir}/automated-log-analysis-data/using a validatedwell_idas the file stem. Validate: A non-empty.lasfile exists at a relative path. If fails: For DLIS, warn per<Gotchas>and move to the next email; otherwise report the download error and stop. - [Agent] Continue with steps 2 through 7 of <Workflow - Standalone LAS analysis> using that relative path.
Validate: Evaluation, plot, and report all returned
statusofsuccessorcreated. If fails: Follow that workflow's failure paths. - [Agent] Draft, do not send, a reply to the vendor email using <Template - Email body>, attach the report (Word if created, otherwise Markdown), CC
{{recipients}}when provided. Validate: Draft exists with the attachment. If fails: Create the draft without the attachment and include the full summary in the body. - [Agent] Print the console summary: well, interval, curve count and alias mapping, GR baselines, net pay and net-to-gross, zone count, OOIP and recoverable (or the limited-accuracy note), QC grade, warnings. Validate: Summary printed. If fails: Informational only.
</Workflow - Email pipeline>
<Workflow - Standalone LAS analysis description="Parse, evaluate, plot, and report a LAS file already in the workspace, or the synthetic well when none is supplied." tools=[file_read, run_python_with_write, open_in_session_tab] triggers=["run petrophysics on this LAS file", "analyze this LAS file", "evaluate this well log", "run the log analysis on the synthetic well"]
- [Agent] Read
README.md## Pre-requisitesandreferences/script-interface.md; confirmfile_readandrun_python_with_write. Determine the LAS source: a user-supplied relative path beneathworkspace_dir, or none. Validate: Required tools present; source decided. If fails: Stop and name the missing tool. - [Decide] With no user LAS, read
scripts/create_synthetic_las.pyand run it with <Definition - Canonical request> andmodecreate(orno_resistivitywhen the user asks for the degraded case). Validate:statusiscreated,sample_countis 1501,curvesinclude GRMA, ROBB, TNPH. If fails: Report the script error and stop. - [Agent] Read
references/curve_aliases.json, parse it, readscripts/run_las_parse.py, and run it withlas_pathandaliases. Validate:statusissuccess;alias_mapping,depth_range,required_curves, andoutput_pathpresent. If fails: Report the parser error message and stop. - [Decide] Inspect
required_curves.missingand apply Rule 3. Validate: A continue, degraded-continue, ask, or stop decision is stated to the user. If fails: Stop. - [Agent] Read
scripts/run_evaluation.pyand run it withparsed_pathand every parameter from <Definition - Default parameters>, substituting user overrides. Validate:statusissuccess;gr_baselines,net_pay_summary,zones,ooip,qc_summarypresent; forSYN-LAS-1defaults the values match <Definition - Synthetic golden values>. If fails: Reportwarningsand the error; stop. - [Agent] Read
scripts/create_log_plot.py, run it withparsed_path,evaluation_path, anddownsample; open the PNG withopen_in_session_tab. Validate:statusiscreated,bytesunder 2,097,152. If fails: Note the plot failure and continue without the image. - [Agent] Present the evaluation, then ask the user for or propose recommendations; read
scripts/create_report.pyand run it withparsed_path,evaluation_path,plot_path, and the agreedrecommendations; open the report. Validate:statusiscreated;markdown_pathpresent;docx_pathpresent or apython-docx unavailablewarning. If fails: Report the error and provide the summary in chat. - [Agent] Print the console summary as in the email pipeline. Validate: Summary printed. If fails: Informational only.
</Workflow - Standalone LAS analysis>
</Instructions><Templates><Template - Email body>
Subject: RE: <original subject> - Petrophysical Evaluation Results
<well_id> - Log Evaluation Summary
Interval: <start> - <stop> <depth unit>
Evaluated: <date from get_current_time>
KEY METRICS
- Net pay: <net_pay_ft> ft (N:G <net_to_gross>)
<accuracy note when limited> - Average porosity (pay): <avg_phie_pay>
- Average Sw (pay): <avg_sw_pay or "not available: no resistivity">
- OOIP: <ooip_stb> STB (recoverable <recoverable_stb> STB at RF
<rf>)<or the ooip note>
PAY ZONES <one line per zone: id, top, base, thickness, avg PHIE, avg Sw>
DATA QUALITY: <overall_quality>
<qc warnings>
RECOMMENDATIONS
<agreed recommendations>
Parameters: Rw <rw>, m <m>, n <n>, matrix <matrix_density> g/cc. Cutoffs: PHIE >= <phie_min>, Sw <= <sw_max>, Vsh <= <vsh_max>.
Full report attached. This is an automated evaluation; review before distribution.
</Template - Email body>
</Templates><Resources>
- `README.md`: prerequisites, sandbox libraries, installation, and getting started.
- `references/script-interface.md`: exact `run(request)` contracts, default request JSON, documented failures, and golden values.
- `references/curve_aliases.json`: vendor mnemonic to canonical curve mapping, passed to the parser as `aliases`.
- `scripts/create_synthetic_las.py`: deterministic `SYN-LAS-1` LAS 2.0 writer with `create` and `no_resistivity` modes.
- `scripts/run_las_parse.py`: LAS 2.0 parser with alias resolution, WRAP handling, and required-curve validation.
- `scripts/run_evaluation.py`: QC, GR baselines, Vshale, porosity, Archie Sw, net pay, pay zones, and OOIP.
- `scripts/create_log_plot.py`: five-track composite log renderer.
- `scripts/create_report.py`: Word and Markdown report writer.
- Unit tests: `scripts/tests/test_create_synthetic_las.py`, `scripts/tests/test_run_las_parse.py`, `scripts/tests/test_run_evaluation.py`, `scripts/tests/test_create_log_plot.py`, and `scripts/tests/test_create_report.py` lock the golden values, alias mapping, limited-accuracy path, path confinement, and artifact creation.
- `evals/evals.json`: behavioral evals for both workflows, alias handling, degraded resistivity, overrides, draft-only email, and confinement.
</Resources>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.

