Free OpenClaw skill · No signup · v1.0.0
Free OpenClaw Skill for Last-Mile Delivery: Dispatcher and Route Agent (Download)
A working OpenClaw skill for last-mile delivery operators running 10 to 200 routes a day. Owns route optimization handoff, driver dispatch communication, customer ETA orchestration, failed-delivery recovery, and California AB 5 IC compliance, wired into Onfleet, OptimoRoute, Bringg, DispatchTrack, Samsara, DoorDash Drive, and Uber Direct.
Built and maintained by Adhiraj Hangal, OpenClaw Consult. Code I wrote runs inside OpenClaw's source, merged by the project's creator.
Free OpenClaw skill for last-mile delivery operations
14 KB file. Free for any use. Drop it into your OpenClaw setup and your agent knows your business in 60 seconds.
We email you a copy plus the install notes. One email, no list, no spam.
What this skill does for your last-mile delivery operations
- Pulls the day's stops from Onfleet, OptimoRoute, or Bringg, scores them against your driver pool and 3PL overflow capacity, and stages the dispatch list.
- Routes overflow volume to DoorDash Drive or Uber Direct when in-house routes are at capacity, and reconciles the cost-per-stop daily.
- Owns the customer ETA narrative: pre-arrival SMS, on-the-way push, attempted-delivery photo, and reschedule flow on failure.
- Tracks driver compliance for California-based independent contractor operations under AB 5 (Borello test, business-to-business exemption requirements).
- Flags route anomalies (idle time, missed stop pattern, geofence breach) from Samsara or DispatchTrack telematics before they become customer escalations.
What's inside this OpenClaw skill
The full file you download, indexed below for search engines and for operators who want to read before they install.
---
name: last-mile-dispatcher-and-route
description: Dispatcher and route orchestration agent for last-mile delivery operations. Handles route optimization handoff, driver dispatch, overflow to DoorDash Drive or Uber Direct, customer ETA narrative, failed-delivery recovery, and California AB 5 IC compliance. Integrates with Onfleet, OptimoRoute, Bringg, DispatchTrack, Samsara.
version: 1.0.0
author: OpenClaw Consult (Adhiraj Hangal)
license: MIT
url: https://openclawconsult.com/skills/last-mile-delivery
---
# OpenClaw Skill: Last-Mile Delivery Dispatcher and Route Agent
## Overview
This skill turns the OpenClaw agent into the orchestration layer for a
last-mile delivery operation. It does not replace the dispatcher, the
operations director, or the route planner. It owns the cross-platform
coordination so the human roles spend their time on driver relationships,
B2B account management, and exception handling.
It is designed for operators running 10 to 200 routes a day, with a route
platform on Onfleet, OptimoRoute, Bringg, or DispatchTrack, telematics on
Samsara, and overflow capacity at DoorDash Drive or Uber Direct.
## What this skill does
1. Stages the morning dispatch list from the route platform against driver capacity
2. Routes overflow to DoorDash Drive or Uber Direct when in-house capacity is short
3. Owns the customer ETA narrative across the delivery lifecycle
4. Triages failed deliveries into the reschedule flow
5. Flags California AB 5 independent contractor exposure on marginal cases
6. Surfaces driver and route anomalies from telematics before they escalate
## Triggers
```yaml
triggers:
- type: heartbeat
schedule: "0 6 * * *" # Daily 6am
action: morning_dispatch_staging
- type: heartbeat
schedule: "0/15 * * * *" # Every 15 minutes
action: live_route_telemetry_review
- type: heartbeat
schedule: "0 19 * * *" # Daily 7pm
action: end_of_day_reconciliation
- type: on_event
event: route_platform.stop_completed
action: log_stop_outcome
- type: on_event
event: route_platform.delivery_failed
action: enter_reschedule_flow
- type: on_event
event: route_platform.driver_offline
action: alert_dispatcher_and_propose_overflow
- type: on_event
event: telematics.geofence_breach
action: log_and_flag_for_review
```
## Workflow: morning dispatch staging
Every morning at 6am the agent:
1. Pulls the day's stops from Onfleet, OptimoRoute, Bringg, or DispatchTrack
2. Pulls the driver roster from the route platform or your scheduling tool
3. Runs the gap analysis: planned stops vs driver capacity within SLA windows
4. Identifies high-LTV B2B accounts that must go in-house regardless of capacity
5. Drafts the overflow batch for DoorDash Drive or Uber Direct on the remainder
6. Routes the staged dispatch list to the dispatcher for approval
A representative 10-driver operation has 120 to 200 stops per morning. The
skill stages the dispatch in under 90 seconds.
## Workflow: overflow handoff
When capacity is short on a given zone or SLA window, the skill:
1. Batches overflow stops by geographic cluster
2. Computes the cost-per-stop for DoorDash Drive vs Uber Direct vs same-day
in-house repower
3. Picks the cheapest option that hits the SLA promise
4. Excludes stops flagged in-house-only (high-LTV B2B, signature required,
ID verification required, controlled substances)
5. Drafts the overflow request with the right manifest format for each partner
6. Routes for dispatcher approval; after validation, low-risk batches go autonomous
Cost-per-stop reconciliation runs at end-of-day so the operations director sees
the actual blended cost vs the in-house cost.
## Workflow: customer ETA narrative
The skill owns the full customer ETA arc:
- T minus 60 minutes: pre-arrival SMS with the delivery window and a tracking
link
- T minus 15 minutes ("3 stops away"): live update with revised ETA
- On-the-way: push notification or SMS when the driver leaves the prior stop
- Delivered: confirmation SMS with the photo-on-delivery attached
- Failed: immediate reschedule SMS with a one-tap reschedule link
Cadence is editable per customer segment. Consumer addresses get the full
narrative. B2B receiving docks get a stripped-down 60-minute heads-up only.
## Workflow: failed delivery and reschedule
When a delivery fails (not home, gate locked, refused, address invalid):
1. The driver logs the failure reason in the route platform
2. The agent reads the failure code and the photo (if attached)
3. Drafts the customer reschedule SMS with reason-keyed copy
4. Schedules follow-ups at 4 hours and 24 hours if no response
5. At 24 hours with no response, routes the package back to depot and flags the
ops director
Failures route through the dispatcher's approval queue for the first two weeks.
Then "not-home consumer address" failures flip to autonomous, while everything
else (refused, address invalid, signature required) stays human-routed.
## Workflow: California AB 5 IC compliance flag
For California-domiciled drivers operating as independent contractors, the
skill applies a Borello-test heuristic on each contracting structure:
- Does the driver use their own vehicle?
- Does the driver carry their own commercial GL and auto policy?
- Does the driver hold a business license?
- Is the work B2B in nature (you contracting with the driver's business)?
- Does the driver retain the right to accept or reject any individual job?
- Does the driver work for other companies?
Cases that fall cleanly on the IC side get logged. Marginal cases route to
the operations director with the relevant facts surfaced. The skill is not a
substitute for labor counsel; it is a flag-and-route tool.
## Memory keys
```yaml
memory:
- key: lastmile.route_state[{route_id}]
description: Live state of a route in flight
schema: { driver_id: string, stops_total: number, stops_completed: number, stops_failed: number, sla_at_risk: bool, current_eta_drift_minutes: number }
- key: lastmile.driver_scorecard[{driver_id}]
description: Rolling driver performance
schema: { stops_per_hour_30d: number, on_time_rate_30d: number, complaint_rate_30d: number, geofence_breaches_30d: number, photo_compliance_30d: number }
- key: lastmile.account_segment[{account_id}]
description: Customer or B2B account classification
values: [consumer, b2b_standard, b2b_high_ltv, b2b_signature_required, b2b_controlled]
- key: lastmile.overflow_ledger[{date}]
description: Daily overflow handoff ledger
schema: { stops_in_house: number, stops_doordash: number, stops_uber: number, blended_cps: number }
```
## Message templates
```yaml
templates:
customer_eta_pre_arrival:
channel: sms
body: |
Hi {customer_first_name}, this is {brand_name}. Your delivery is on
the way, ETA between {window_start} and {window_end}. Track:
{tracking_link}. Reply HELP if you have questions.
customer_eta_3_stops_away:
channel: sms
body: |
{customer_first_name}, your {brand_name} driver is 3 stops away.
Updated ETA: {revised_eta}. Track: {tracking_link}.
failed_delivery_not_home:
channel: sms
body: |
Hi {customer_first_name}, we tried to deliver your {brand_name}
order at {attempt_time} but no one was home. Reschedule with one
tap: {reschedule_link}. If we do not hear back by tomorrow we will
send it back to depot.
b2b_receiving_dock_heads_up:
channel: email
body: |
Receiving team at {b2b_account_name},
{brand_name} delivery on the way. ETA: between {window_start} and
{window_end}. {pallet_count} pallets, PO {po_number}, driver name
{driver_first_name}, truck {truck_id}.
Confirm dock door availability or reply with a revised window.
overflow_dispatch_to_dispatcher:
channel: slack
body: |
OVERFLOW BATCH READY
Zone: {zone}
Stops: {stop_count}
Partner: {doordash_or_uber}
Cost/stop: ${cost_per_stop}
Blended vs in-house: {variance_pct}
Approve: {approval_link}
```
## Required integrations
| Integration | Purpose | Read | Write |
|----------------------------|-----------------------------------------------|------|-------|
| Onfleet | Routes, drivers, stops, completions | yes | optional |
| OptimoRoute | Route planning and optimization | yes | optional |
| Bringg | Routes and customer-facing tracking | yes | optional |
| DispatchTrack | Routes, signatures, photos | yes | optional |
| Samsara | Vehicle telematics, geofence, idle time | yes | no |
| DoorDash Drive | Overflow stop submission | yes | yes |
| Uber Direct | Overflow stop submission | yes | yes |
| Twilio (or similar) | Customer SMS | no | yes |
| Slack | Dispatcher and operations alerts | no | yes |
| OpenClaw Memory | Cross-run state | yes | yes |
| OpenClaw Heartbeat | Scheduled triggers | yes | yes |
Write-back to the route platform starts disabled. Most operators flip writes
on for low-risk fields (customer ETA updates, reschedule links) after the
first two weeks.
## Compliance notes
For California operations, the AB 5 heuristic in this skill is a routing
helper, not a legal opinion. The Borello multi-factor test and the B2B
exemption requirements (AB 5 section 2776) are fact-intensive. Any marginal
case should route to your counsel. The skill defaults to flagging conservatively.
For accessible delivery (residential, ADA-required signature, controlled
substances under DEA Schedule II-IV), the skill never auto-handoffs to a 3PL
overflow partner and always routes to an in-house driver with the right
credential.
## Configuration
```yaml
config:
brand_name: "Your Brand"
depot_zones: ["zone_a", "zone_b", "zone_c"]
approval_mode: dispatcher_approves_all # or "autonomous_after_2_weeks"
sla_window_minutes_default: 240 # 4-hour delivery window default
overflow_cost_cap_per_stop: 5.50
high_ltv_b2b_accounts: []
in_house_only_categories:
- signature_required
- id_verification_required
- controlled_substances
- high_ltv_b2b
california_ab5_flag: true
reschedule_cadence_hours: [4, 24]
consumer_eta_templates:
pre_arrival_minutes: 60
near_arrival_stops_remaining: 3
b2b_eta_templates:
pre_arrival_minutes: 60
```
## Quick install
```bash
mkdir -p ~/.claude/skills
mv last-mile-delivery.md ~/.claude/skills/last-mile-dispatcher-and-route.md
# Edit the config block to match your operation
```
Launch OpenClaw and the skill is live. Trigger it manually with
`stage morning dispatch` or `reconcile end of day` or wait for Heartbeat to
fire on the configured schedule.
## Want it wired to your stack?
This SKILL.md is the starting point. If you want it plugged into your
specific route platform, overflow partners, B2B account list, and customer
SMS provider on a fixed-price two-week clock, with the founder writing every
line of the build, the door is at https://www.adhirajhangal.com/work
Install in 60 seconds
- 1
Drop the file into your OpenClaw skills directory
Save the downloaded last-mile-delivery.md as ~/.claude/skills/last-mile-dispatcher-and-route.md (or scope it per depot in your project-level .claude/skills/). OpenClaw picks up new skill files on next agent launch, no restart required.
- 2
Wire in your route platform and overflow partners
Edit the integrations block to point at your Onfleet, OptimoRoute, Bringg, or DispatchTrack API and (if you use them) your DoorDash Drive and Uber Direct credentials. Read access to today's routes is enough to start; write access lets the skill auto-assign overflow once you flip the autonomous flag.
- 3
Start in approval mode, validate, then flip to autonomous
Run for two weeks with the dispatcher approving every customer ETA message and every overflow handoff. The skill defaults route any failed delivery, any high-LTV B2B account, and any AB 5 contracting question to a human. After two weeks, the ETA narrative and overflow auto-assignment flip to autonomous on the templates that prove out.
Example conversation
You
It is 6:30am. Stage the day's routes and tell me where I am going to need DoorDash overflow.
Agent
Day staging complete. 147 stops planned across 8 in-house routes and 12 active W-2 drivers. After OptimoRoute optimization, capacity is 132 stops at the SLA-promised window. Gap: 15 stops in the South Bay zone that will breach SLA without overflow. Drafted DoorDash Drive batch for those 15 stops at $4.85 cost-per-stop, 12% above our blended cost but inside the overflow budget you set. Routed for your approval. 2 stops are high-LTV B2B accounts (Hangal Imports x9 boxes, Steinberger Wholesale x14 boxes) flagged for in-house assignment regardless of capacity, currently slotted on Route 3 and Route 7 with a 12-min slack each.
Founder-led · 14 days
Want this last-mile dispatcher and route agent live in your last-mile delivery operation in 14 days?
Adhiraj ships OpenClaw AI agents into real businesses. Short discovery to map it to Onfleet, OptimoRoute, and DoorDash Drive, build in 14 days, then optional ongoing support so your OpenClaw system keeps working.
Build it with meCommon questions
Does this work without Onfleet?
+
Yes. The skill ships integration prompts for Onfleet, OptimoRoute, Bringg, and DispatchTrack, and falls back to a CSV manifest or Google Sheets feed for smaller operations. We have run this on top of a manual spreadsheet workflow with 4 drivers for the first 30 days before the operator picked a route platform.
How does the overflow handoff to DoorDash Drive or Uber Direct work?
+
When the agent detects a capacity gap (planned stops over driver capacity within the SLA window) it batches the overflow stops by zone, drafts the DoorDash Drive or Uber Direct request, and routes for dispatcher approval. After two weeks, low-risk overflow batches (consumer addresses inside your home zone) flip to autonomous. High-LTV B2B and any address with a delivery instruction note still route to a human.
How does it handle California AB 5 independent contractor compliance?
+
The skill carries an AB 5 flag for any California-domiciled IC driver. When the flag is on, the agent applies the Borello multi-factor test heuristics from the contracting structure (own vehicle, own tools, own business license, B2B nature of work, freedom to accept or reject). Marginal cases are routed to the operations director with the relevant facts surfaced. The skill is a flag-and-route tool, not a substitute for legal counsel on labor classification.
Can it write the customer ETA SMS or do I need a separate tool?
+
The skill drafts and (after validation) sends the full ETA narrative: pre-arrival 60-minute window, 'driver is 3 stops away' update, on-the-way push, attempted-delivery confirmation with photo, and reschedule flow if the delivery fails. It can plug into your existing SMS provider (Twilio, MessageBird, Pinpoint) or piggyback on Onfleet or Bringg's customer-facing SMS if you already use it.
Can I modify this skill?
+
Yes. MIT licensed. Edit the route scoring rules, the overflow cost thresholds, the customer ETA cadence, the AB 5 routing logic. Most operators fork it inside the first month to match their SLA promises and overflow economics.
How does it score driver and route performance?
+
The skill maintains a per-driver and per-route scorecard: stops-per-hour, on-time rate, photo-on-delivery compliance, customer complaint rate, idle time, geofence breaches. The weekly digest ranks drivers and surfaces anomalies (driver dropping below their 30-day average, route consistently breaching SLA on Tuesdays). Hiring and firing decisions stay with the operations director.
What does it do when a delivery fails?
+
Failed delivery triggers the reschedule flow: an immediate SMS to the customer with a one-tap reschedule link, a follow-up if no response in 4 hours, and a final touch at 24 hours before the package returns to depot. The reschedule cadence is editable in the config and respects do-not-disturb windows you set per customer.
How does this compare to Onfleet's built-in dispatcher or OptimoRoute's planning?
+
Onfleet and OptimoRoute are excellent route platforms. The OpenClaw skill is an agent runtime on top: it reasons about overflow timing, customer SLA risk, AB 5 contracting status, B2B vs consumer treatment, and the dispatcher's daily ritual. Most operators keep their existing route platform and add this skill for the cross-system judgment.
What does this cost to run on top of OpenClaw?
+
Token cost depends on route volume. A 10-driver operation running 1,200-2,000 stops per week sees expected monthly token spend in the $80-$220 range using OpenClaw's default model selection. The skill batches route review and ETA generation to keep per-stop inference cost low.
Can OpenClaw Consult wire this to my exact stack?
+
Yes. The free SKILL.md is the starting point. If you want it plugged into your specific route platform, overflow partners, customer SMS provider, and B2B account list on a fixed-price 14-day clock, the door is at openclawconsult.com/hire.
Want the full implementation playbook?
Read the deep-dive guide for last-mile delivery operations
The playbook covers workflows, software integrations, compliance, ROI math, and a four-week rollout plan. The skill file above is a working slice of that build.
Read the last-mile delivery operations playbook →Related free skills
Free OpenClaw Skill for trucking businesses
A working OpenClaw skill for small-to-midsize trucking carriers running CDL Class A fleets. Owns load board scanning, broker quote follow-up, driver dispatch communication, HOS compliance review, and driver retention outreach, wired into McLeod LoadMaster, TMW Suite, DAT, Truckstop.com, and Motive ELD.
Free OpenClaw Skill for courier and same-day services
A working OpenClaw skill for courier and same-day delivery operators with a B2B-heavy account mix. Owns same-day dispatch triage, medical specimen handoff to Quest and LabCorp, legal court-runner coordination, B2B account NPS tracking with an 80+ target, wired into OnFleet, Vonigo, and Tookan.
Want it wired to your stack?
The free skill is the starting point. If you want it plugged into your actual software, on a fixed-price two-week clock, with the founder writing every line, this is the door.