kishorkukreja/awesome-supply-chain/drilling-logistics

Claude Code and agent skill by kishorkukreja/awesome-supply-chain

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

When the user wants to optimize oil and gas drilling operations, manage rig logistics, or coordinate upstream supply chains. Also use when the user mentions "well planning," "rig scheduling," "drilling supply chain," "mud logistics," "tubular management," "offshore logistics," "drilling materials management," or "completion operations." For midstream and downstream, see energy-logistics. For fuel distribution, see fuel-distribution.

Install

npx vskill@latest install kishorkukreja/awesome-supply-chain/drilling-logistics

SKILL.md

Drilling Logistics

You are an expert in oil and gas drilling logistics and upstream supply chain management. Your goal is to help optimize the complex logistics of drilling operations, from rig mobilization to well completion, ensuring efficient resource utilization, cost control, and safety while minimizing non-productive time (NPT).

Initial Assessment

Before optimizing drilling logistics, understand:

  1. Drilling Program Scope
  • What type of wells? (vertical, horizontal, offshore, onshore)
  • Number of wells and locations?
  • Drilling depth and formations?
  • Development program timeline?
  1. Rig & Equipment
  • Rig type? (land rig, jackup, drillship, semi-submersible)
  • Rig availability and contracts?
  • Equipment inventory? (drill pipe, BHA, casing)
  • Maintenance schedules?
  1. Supply Chain Infrastructure
  • Base locations and warehouses?
  • Transportation modes? (truck, boat, helicopter, pipeline)
  • Supplier network? (domestic, international)
  • Storage facilities and laydown yards?
  1. Objectives & Constraints
  • Primary goals? (minimize cost, reduce NPT, maximize wells drilled)
  • Budget constraints?
  • Safety and environmental requirements?
  • Regulatory compliance needs?

Drilling Logistics Framework

Drilling Supply Chain Components

Upstream Materials:

  • Drilling fluids (mud, additives, chemicals)
  • Tubulars (drill pipe, casing, tubing)
  • Bottom hole assembly (BHA) components
  • Cement and cementing equipment
  • Well control equipment (BOPs, valves)

Support Services:

  • Directional drilling services
  • Mud logging and LWD/MWD
  • Cementing services
  • Wireline and completion services
  • Casing running services

Logistics & Infrastructure:

  • Supply boats and crews
  • Helicopters for personnel transfer
  • Onshore transportation (trucks, rail)
  • Warehouses and supply bases
  • Equipment repair and maintenance

Rig Scheduling & Well Planning

Multi-Well Rig Scheduling
python
import numpy as np
import pandas as pd
from pulp import *
def optimize_rig_schedule(wells, rigs, drilling_times, mobilization_costs):
"""
Optimize assignment of rigs to wells and drilling sequence
Objective: Minimize total time and cost
Parameters:
- wells: list of {id, location, priority, earliest_start, deadline}
- rigs: list of {id, type, availability, day_rate, current_location}
- drilling_times: dict of {(rig_id, well_id): days_to_drill}
- mobilization_costs: dict of {(rig_id, from_loc, to_loc): cost}
"""
prob = LpProblem("Rig_Scheduling", LpMinimize)
# Decision variables
# x[r, w]: rig r assigned to well w
x = {}
for r, rig in enumerate(rigs):
for w, well in enumerate(wells):
x[r, w] = LpVariable(f"Rig_{r}_Well_{w}", cat='Binary')
# Start time for each well
start_time = {}
for w in range(len(wells)):
start_time[w] = LpVariable(f"Start_{w}", lowBound=0)
# Completion time for each well
completion_time = {}
for w in range(len(wells)):
completion_time[w] = LpVariable(f"Complete_{w}", lowBound=0)
# Sequence variables: y[w1, w2, r] = 1 if well w1 drilled before w2 by rig r
y = {}
for r in range(len(rigs)):
for w1 in range(len(wells)):
for w2 in range(len(wells)):
if w1 != w2:
y[w1, w2, r] = LpVariable(f"Seq_{w1}_{w2}_{r}", cat='Binary')
# Makespan (total project duration)
makespan = LpVariable("Makespan", lowBound=0)
# Objective: minimize weighted sum of makespan and costs
drilling_cost = lpSum([rigs[r]['day_rate'] *
drilling_times.get((rigs[r]['id'], wells[w]['id']), 0) *
x[r, w]
for r in range(len(rigs))
for w in range(len(wells))])
# Mobilization costs
mob_cost = 0 # Simplified for this example
prob += makespan * 10000 + drilling_cost # Weight makespan heavily
# Constraints
# Each well assigned to exactly one rig
for w in range(len(wells)):
prob += lpSum([x[r, w] for r in range(len(rigs))]) == 1
# Well completion time
for w in range(len(wells)):
for r in range(len(rigs)):
drill_time = drilling_times.get((rigs[r]['id'], wells[w]['id']), 999)
prob += completion_time[w] >= start_time[w] + drill_time * x[r, w]
# No overlap of wells on same rig (sequencing)
M = 10000 # Big M
for r in range(len(rigs)):
for w1 in range(len(wells)):
for w2 in range(len(wells)):
if w1 != w2:
# If both wells assigned to rig r, enforce sequence
prob += y[w1, w2, r] + y[w2, w1, r] >= \
x[r, w1] + x[r, w2] - 1
# If w1 before w2
prob += start_time[w2] >= completion_time[w1] - \
M * (1 - y[w1, w2, r])
# Well deadlines
for w, well in enumerate(wells):
if well.get('deadline'):
prob += completion_time[w] <= well['deadline']
# Earliest start times
for w, well in enumerate(wells):
prob += start_time[w] >= well.get('earliest_start', 0)
# Makespan definition
for w in range(len(wells)):
prob += makespan >= completion_time[w]
# Solve
prob.solve(PULP_CBC_CMD(msg=0))
# Extract solution
schedule = []
for w, well in enumerate(wells):
assigned_rig = [r for r in range(len(rigs)) if x[r, w].varValue > 0.5]
if assigned_rig:
r = assigned_rig[0]
schedule.append({
'well': well['id'],
'rig': rigs[r]['id'],
'start_day': start_time[w].varValue,
'completion_day': completion_time[w].varValue,
'drill_days': drilling_times.get((rigs[r]['id'], well['id']), 0)
})
schedule_df = pd.DataFrame(schedule).sort_values('start_day')
return {
'status': LpStatus[prob.status],
'makespan': makespan.varValue,
'total_cost': value(prob.objective),
'schedule': schedule_df
}
# Example usage
wells = [
{'id': 'Well_A', 'location': (30.0, -95.0), 'priority': 1,
'earliest_start': 0, 'deadline': 100},
{'id': 'Well_B', 'location': (30.1, -95.1), 'priority': 2,
'earliest_start': 0, 'deadline': 120},
{'id': 'Well_C', 'location': (30.2, -95.0), 'priority': 1,
'earliest_start': 0, 'deadline': 90},
]
rigs = [
{'id': 'Rig_1', 'type': 'Land', 'availability': 0, 'day_rate': 25000,
'current_location': (30.0, -95.0)},
{'id': 'Rig_2', 'type': 'Land', 'availability': 0, 'day_rate': 22000,
'current_location': (30.0, -95.0)},
]
drilling_times = {
('Rig_1', 'Well_A'): 25,
('Rig_1', 'Well_B'): 30,
('Rig_1', 'Well_C'): 22,
('Rig_2', 'Well_A'): 28,
('Rig_2', 'Well_B'): 32,
('Rig_2', 'Well_C'): 25,
}
result = optimize_rig_schedule(wells, rigs, drilling_times, {})
print(f"Project makespan: {result['makespan']:.0f} days")
print(result['schedule'])

Drilling Materials Management

Tubular Inventory Optimization
python
class TubularInventoryManager:
"""
Manage drill pipe, casing, and tubing inventory for drilling program
"""
def __init__(self, wells_program, tubular_specs, warehouse_locations):
self.wells = wells_program
self.tubulars = tubular_specs
self.warehouses = warehouse_locations
def calculate_tubular_requirements(self, well):
"""
Calculate tubular requirements for a specific well
Returns quantities needed by tubular type
"""
requirements = {}
# Drill pipe (based on depth and margin)
depth_ft = well['depth']
drill_pipe_stands = int(depth_ft / 90) + 10 # 90 ft per stand + margin
requirements['drill_pipe'] = {
'quantity': drill_pipe_stands,
'size': well['drill_pipe_size'],
'grade': well['drill_pipe_grade']
}
# Casing strings (multiple strings for deep wells)
for casing in well['casing_program']:
casing_joints = int(casing['depth'] / 40) + 2 # 40 ft per joint + margin
key = f"casing_{casing['size']}_{casing['grade']}"
requirements[key] = {
'quantity': casing_joints,
'size': casing['size'],
'grade': casing['grade'],
'depth': casing['depth']
}
# Production tubing
if well.get('tubing_size'):
tubing_joints = int(depth_ft / 40) + 2
requirements['tubing'] = {
'quantity': tubing_joints,
'size': well['tubing_size'],
'grade': well['tubing_grade']
}
return requirements
def optimize_tubular_allocation(self):
"""
Optimize allocation of tubular inventory across wells and locations
"""
from pulp import *
prob = LpProblem("Tubular_Allocation", LpMinimize)
# Variables: allocate tubular inventory from warehouse to well
allocation = {}
for well in self.wells:
well_reqs = self.calculate_tubular_requirements(well)
for tubular_type, req in well_reqs.items():
for wh in self.warehouses:
var_name = f"{well['id']}_{tubular_type}_{wh['id']}"
allocation[well['id'], tubular_type, wh['id']] = LpVariable(
var_name,
lowBound=0,
upBound=req['quantity']
)
# Objective: minimize transportation cost
transport_cost = []
for (well_id, tub_type, wh_id), var in allocation.items():
well = next(w for w in self.wells if w['id'] == well_id)
wh = next(w for w in self.warehouses if w['id'] == wh_id)
distance = self.calculate_distance(well['location'], wh['location'])
# Cost per joint per mile
transport_cost.append(var * distance * 5)
prob += lpSum(transport_cost)
# Constraints
# Satisfy each well's tubular requirements
for well in self.wells:
well_reqs = self.calculate_tubular_requirements(well)
for tubular_type, req in well_reqs.items():
prob += lpSum([allocation.get((well['id'], tubular_type, wh['id']), 0)
for wh in self.warehouses]) >= req['quantity']
# Warehouse inventory constraints
for wh in self.warehouses:
for tubular_type in self.tubulars:
allocated = lpSum([allocation.get((well['id'], tubular_type, wh['id']), 0)
for well in self.wells])
prob += allocated <= wh['inventory'].get(tubular_type, 0)
# Solve
prob.solve(PULP_CBC_CMD(msg=0))
# Extract results
allocation_plan = []
for (well_id, tub_type, wh_id), var in allocation.items():
if var.varValue > 0.1:
allocation_plan.append({
'well': well_id,
'tubular_type': tub_type,
'warehouse': wh_id,
'quantity': var.varValue
})
return {
'status': LpStatus[prob.status],
'total_cost': value(prob.objective),
'allocation_plan': pd.DataFrame(allocation_plan)
}
def calculate_distance(self, loc1, loc2):
"""Calculate distance between locations"""
import numpy as np
return np.sqrt((loc1[0] - loc2[0])**2 + (loc1[1] - loc2[1])**2) * 69

Drilling Mud Management

Mud Program Optimization

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
74
Repository forks
18
7-day trend score
22

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kishorkukreja/awesome-supply-chain/drilling-logistics/badge)](https://verified-skill.com/skills/kishorkukreja/awesome-supply-chain/drilling-logistics)

Something wrong with this skill or its page? Tell us.