--- name: maintenance-followup-digest description: Builds a weekly maintenance follow-up list for a small fleet. It shows units that are down, annual inspections due, overdue and due-soon preventive maintenance, open work orders, and warning-lamp faults or defects with no work order, read-only from the fleet's own Samsara, Fleetio or Geotab account or from a pasted CSV export. Use it when the user asks what maintenance is overdue, due soon or still open this week. --- # Weekly maintenance follow-up digest **When to use:** once a week (Monday morning works well), or any time the owner asks "what's down, what's overdue, what's due soon, and what's still open?" Everything runs inside the user's own agent session, against the user's own fleet account or file. Don't send fleet data anywhere except the user's own chat or files. ## Required inputs Ask for anything that's missing before you start: 1. **Data source**, one or more of: Samsara MCP, Fleetio MCP, MyGeotab MCP, REST API access the user set up themselves, or **no connector:** a pasted or attached CSV export (see "No connector? Use a CSV"). 2. **"Due soon" fallback window:** used only for items whose platform has no due-soon setting of its own (see step 4). Default 14 days by date, and 10% of the service interval by meter (for example 1,000 mi on a 10,000 mi PM). 3. **"Stale" threshold for open work orders:** default 7 days. 4. **Fault ignore list (optional, user-editable):** codes the owner knows are noise. Keep it as a plain list in the chat or a file the user owns, for example `SPN 3510 FMI 4` or `P0420`. Show the current list in the output so the owner can edit it. 5. **"Down" statuses (optional):** which vehicle statuses mean a unit is down. Default: "Out of Service" and "In Shop". 6. **Scope (optional):** a group, tag or list of units. Default is the whole fleet the user can see. 7. **Week ending date:** default today, in the user's time zone. ## Read-only rule (always applies) - Use read calls only. Never create, update, resolve, dismiss or delete anything, and never message drivers. - **The MyGeotab MCP can write** (Add / Set / Remove, `DismissFaults`, text messages). On Geotab, use only `Get` / `GetCountOf` / `ListEntities`-type reads. - If a step seems to need a write, stop and tell the user what they'd need to do in their own platform. ## Steps ### 1. Confirm the connection Make one cheap read (for example, a vehicle count) on each connected platform. If a call fails on auth or permissions, tell the user which platform failed and why, then keep going with the others. For a CSV, check the columns and say which are missing. ### 2. Pull data for each platform you have **Samsara MCP** (confirmed tools: `read_reference_card`, `describe_query`, `run_query`, `samsara_assistant`) - Call `read_reference_card()` and check that the query IDs below exist for this org. Call `describe_query(id)` before the first `run_query` to get the exact variables and columns. - `run_query("query://assets/preventive_maintenance", …)`: upcoming PM items and due information. Include PM schedules named for the annual or periodic inspection. - `run_query("query://assets/maintenance", …)`: check-engine-light and DTC status, fleet-wide. Keep the lamp fields the query returns. - `run_query("query://dvir/defects/list", …)`: DVIR defects and resolution state. Keep the unresolved ones. - Work orders aren't in the Samsara MCP query catalog. If the user has a Samsara API token with "Read Work Orders" scope, read `GET /maintenance/work-orders/stream` filtered to open statuses. Otherwise put "work orders: not available from Samsara MCP" under Data gaps. - Don't use `samsara_assistant` for numbers in the digest; it returns prose, not rows. It's fine for a follow-up question. **Fleetio MCP** (read-only; Fleetio doesn't publish its tool names, so pick the tool that matches each request) - Vehicles with their status (Fleetio's built-in statuses include "In Shop" and "Out of Service"; accounts can rename or add their own). - PM / service reminders, with their status (`ok`, `due_soon`, `overdue`, `snoozed`) and their own due-soon thresholds. - Renewal reminders. Keep any whose type names an annual, periodic, DOT or state inspection, and registration. - Open work orders, with status, assignee, started and created dates. - Open issues, including ones auto-created from DVIR defects. - Faults, if the MCP returns them. - REST fallback, with the user's own key: `GET /v2/service_reminders`, `GET /v1/vehicle_renewal_reminders`, `GET /v2/work_orders`, `GET /v2/issues`, `GET /v1/vehicles`. **MyGeotab MCP** (reads only) - `Get` `FaultData` for the last 7 days. Keep `faultState` (Active / Pending / None) and the J1939 lamp fields `redStopLamp`, `amberWarningLamp`, `protectWarningLamp` and `malfunctionLamp`. Geotab documents these lamp fields as "Only reported for J1939 faults; false for other fault types," so on light-duty (OBD-II) units a false lamp means "not reported", not "off". - `Get` `DVIRLog` for the last 7 days, and keep logs with defects. *Assumption:* the defect repair status comes back on these logs. If it doesn't, list the defects as "repair status unknown." - **PM due dates are not confirmed on Geotab.** Geotab's maintenance reminder and work-order entities are undocumented and aren't listed in the MCP. Don't try them. Put "PM schedule and annual inspection: not available from Geotab MCP" under Data gaps. ### 3. Normalize Make one row per item with these fields: `unit`, `vin` (if known), `type` (down / inspection / PM / work order / issue / defect / fault), `title`, `status`, `due` (date and/or meter), `due_soon_source` (platform setting or fallback), `opened`, `age_days`, `assignee`, `lamp` (red stop / amber / protect / MIL / none / unknown), `source` (platform + record ID). When the same vehicle appears on two platforms, match by VIN first, then by unit name. Never merge two rows on a guess. If you aren't sure, keep both and flag "possible duplicate." ### 4. Due soon: use the platform's own setting - **Fleetio:** use the reminder's own status. `due_soon` means Fleetio's due-soon threshold for that reminder was reached; `overdue` means past due. Don't recompute it. If a reminder has no due-soon threshold, Fleetio goes straight from OK to Overdue; list it as due soon only if it falls inside the fallback window, and label it "fallback window". - **Samsara:** use the PM status the data returns (for example overdue or upcoming). If there's no due-soon setting, apply the fallback window and label the row "fallback window". - **CSV:** use a due-soon or status column if there is one; otherwise apply the fallback window and label it. - If the unit's recent miles or hours per day are readable, add "about days at recent use" to meter-based rows. Otherwise leave it out. ### 5. Faults: warning lamps only - Show a fault only if it's **active** and has a **warning lamp**: red stop, amber warning, protect, or MIL / check engine light (OBD-II confirmed codes with the MIL on). - Drop codes on the ignore list. - Don't list the rest. Count them: " active codes with no warning lamp hidden; hidden by your ignore list." - If the lamp state can't be read for a unit, don't drop its codes silently. Write one line per unit: ": active codes, lamp status not readable." ### 6. Sort into buckets (this order) 1. **Units down / out of service:** units in a "down" status, plus units with an open work order whose status says it's waiting (for example on parts or a vendor), if the status names show that. Show the status, the open work order, and how long: use the status-change date if the data shows it, otherwise the work order's age, and say which. No cost or downtime estimates. 2. **Active red-stop faults:** every active fault with the red stop lamp, whether or not it has a work order. Show the linked work order if the data shows one, otherwise "no WO". Red stop is the highest-severity lamp in this skill's ranking, so these never wait for the last section. 3. **Annual / periodic inspection (49 CFR 396.17):** overdue or due soon. If no inspection reminder or PM schedule exists for a unit, say so under Data gaps. A blank here must not read as "all current". Registration goes here too if it's readable. Other renewals only if the user asks. 4. **Overdue PM:** past its due date or meter. 5. **Due soon:** per step 4. 6. **Open work orders:** stale ones (older than the threshold) first. 7. **Other warning-lamp faults (amber, protect, MIL / check engine), open issues and defects with no linked work order.** Red-stop faults are already listed in bucket 2, so don't repeat them here. Use links only when the data shows them; don't infer a link. 8. **Closed this week** (optional, short): only if the data has close dates. ### 7. Write the digest Use the output format below. Keep it short. Units, dates and counts come straight from the data. Don't estimate costs, downtime or risk, and don't add priorities or advice beyond what's in the data. The summary line is counts only. ## Output format ``` Maintenance follow-up: week ending () Summary: down, red-stop faults ( with no WO), inspections due, overdue PM, due soon, open WOs ( stale), other items with no WO UNITS DOWN () - | | WO <WO status> | down <n> days (<from status date / from WO age>) | <source> ACTIVE RED-STOP FAULTS (<n>) - <unit> | <fault key> <description> | RED STOP LAMP | <WO <id> <status> / no WO> | first seen <date> | <source> ANNUAL / PERIODIC INSPECTION, 396.17 (<n>) - <unit> | <inspection or renewal name> | due <date> | <overdue by n days / due soon> | <source> OVERDUE PM (<n>) - <unit> | <service> | due <date / meter> | overdue by <days / miles> | <source> DUE SOON (<n>) - <unit> | <service> | due <date / meter> | <platform setting / fallback window> | <source> OPEN WORK ORDERS (<n>, <k> stale > <threshold> days) - <unit> | WO <id> <title> | <status> | open <age> days | <assignee or "unassigned"> | <source> OTHER WARNING-LAMP FAULTS, ISSUES AND DEFECTS WITHOUT A WORK ORDER (<n>) - <unit> | <type> | <title or code> | <lamp: amber / protect / MIL / none for issues and defects> | first seen <date> | <source> Hidden: <n> active codes with no warning lamp; <n> on your ignore list Ignore list in use: <codes, or "none"> DATA GAPS - <platform or CSV>: <what couldn't be read and why> ``` If a bucket is empty, write "none." Don't drop the bucket. ## Sample output (fake units, for illustration only) ``` Maintenance follow-up: week ending 2026-11-16 (Fleetio + Geotab) Summary: 1 down, 1 red-stop fault (1 with no WO), 1 inspection due, 2 overdue PM, 1 due soon, 3 open WOs (1 stale), 0 other items with no WO UNITS DOWN (1) - TRK-105 | Out of Service | WO 5002 Replace turbo, Waiting on parts | down 6 days (from WO age) | Fleetio ACTIVE RED-STOP FAULTS (1) - TRK-106 | SPN 100 FMI 1 (engine oil pressure) | RED STOP LAMP | no WO | first seen 2026-11-15 | Geotab ANNUAL / PERIODIC INSPECTION, 396.17 (1) - TRL-201 | Annual DOT inspection | due 2026-11-10 | overdue by 6 days | Fleetio OVERDUE PM (2) - TRK-101 | PM-B service | due 120,000 mi | overdue by 850 mi | Fleetio - TRK-101 | Air dryer cartridge | due 2026-11-01 | overdue by 15 days | Fleetio DUE SOON (1) - TRK-103 | PM-A service | due 2026-11-24 | platform setting | Fleetio OPEN WORK ORDERS (3, 1 stale > 7 days) - TRK-102 | WO 4990 Door seal | Open | open 12 days | unassigned | Fleetio - TRK-105 | WO 5002 Replace turbo | Waiting on parts | open 6 days | Shop A | Fleetio - TRK-104 | WO 5003 Brake inspection | In progress | open 1 day | Shop A | Fleetio OTHER WARNING-LAMP FAULTS, ISSUES AND DEFECTS WITHOUT A WORK ORDER (0) - none Hidden: 14 active codes with no warning lamp; 3 on your ignore list Ignore list in use: SPN 3510 FMI 4 DATA GAPS - Geotab: PM schedule and annual inspection not available from Geotab MCP - TRK-108: no annual inspection reminder set up in Fleetio ``` ## No connector? Use a CSV If the user has no MCP connection, ask them to export these reports to CSV from their platform and paste them or attach the files. For example, Fleetio index pages (vehicles, service reminders, work orders) have More Actions > Export Data, and its reports export as CSV; MyGeotab's Active Engine Faults report downloads as Excel, which can be saved as CSV. Expected columns (names can differ; map them and say how you mapped them): | Export | Columns | |---|---| | Vehicles | unit, VIN, status (required for Units down) | | PM / service reminders | unit, service, due date and/or due meter, status (ok / due soon / overdue) if available, current meter | | Renewals or inspections | unit, type (annual inspection, registration), due date | | Work orders | unit, WO number, title, status, created or started date, assignee | | Issues / defects | unit, title, reported date, status, linked WO if any | | Faults (optional) | unit, code, lamp (red / amber / protect / MIL / none), active or not, first seen | *Assumption:* a MyGeotab fault report export includes a lamp column. Geotab's API documents the lamp fields on `FaultData`, but its public report help pages (checked 2026-11-17) don't list the export's columns. If the fault export has no lamp column, write "lamp status not readable" per unit as in step 5, and say so under Data gaps. Use the same buckets and rules. Put "CSV" as the source and list missing exports or columns under Data gaps. ## Using this in a chat tool without a skills folder If your AI tool doesn't load skill folders, paste this whole SKILL.md into the chat (or into the tool's custom instructions), then paste or attach your CSV exports, or connect your platform if the tool supports it. Then ask: "Run the maintenance follow-up digest for this week." ## Limits - This is a read-only report. It doesn't schedule, assign or close anything. - It's only as good as the platform data. If PMs or the annual inspection aren't set up in the platform, they won't show up; the digest says so under Data gaps. - Hiding no-lamp faults is a noise filter. It doesn't mean those codes are harmless. - Samsara: work orders need a separate API token; MCP data depends on the Samsara products the org uses, and exact columns come from `describe_query`. - Geotab: no confirmed PM-schedule, inspection or work-order read through MCP. Lamp fields are J1939-only. - Fleetio: MCP tool names aren't published and may change, and calls count against the plan's API rate limit (50/min Professional, 250/min Premium). - The output doesn't replace a mechanic's judgment or any legal inspection requirement.