.cortex/skills/fleet-intelligence-food-delivery/SKILL.md
Food delivery fleet intelligence using synthetic datasets generated by Data Studio in ORS Control Panel. Reads from SYNTHETIC_DATASETS.UNIFIED via projection views (DELIVERIES, RESTAURANTS_ENRICHED) filtered by CONFIG table. Use when: setting up food delivery data, food delivery intelligence. Do NOT use for: taxi fleet simulation (use fleet-intelligence-taxis), route deviation analysis, or route optimization demos. Triggers: setup food delivery fleet, food delivery intelligence.
npx skillsauth add snowflake-labs/sfguide-create-a-route-optimisation-and-vehicle-route-plan-simulator fleet-intelligence-food-deliveryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Food delivery fleet intelligence solution powered by Data Studio synthetic datasets.
Data is generated using Data Studio in the ORS Control Panel, which writes to:
SYNTHETIC_DATASETS.UNIFIED.FACT_VEHICLE_TELEMETRYSYNTHETIC_DATASETS.UNIFIED.FACT_TRIPSProjection views in FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY filter the unified tables by vehicle type and region via a CONFIG table. See references/sql-projection-views.sql for the complete view definitions.
Objects created:
CONFIG — single-row filter table (VEHICLE_TYPE + REGION)DELIVERIES + RESTAURANTS_ENRICHED — React Fleet Delivery page viewsThe San Francisco baseline is loaded by build-routing-solution Step 8 into UNIFIED tables.
| Parameter | Default | Description |
|-----------|---------|-------------|
| DATABASE | FLEET_INTELLIGENCE | Target database for all objects |
| SCHEMA | FLEET_INTELLIGENCE_FOOD_DELIVERY | Schema for projection views and CONFIG |
| WAREHOUSE | ROUTING_ANALYTICS | Warehouse for queries |
| VEHICLE_TYPE | ebike | Vehicle type filter applied to UNIFIED tables |
| REGION | san_francisco | Region filter applied to UNIFIED tables |
build-routing-solution Step 8)| Privilege | Scope | Reason | |-----------|-------|--------| | CREATE DATABASE | Account | Creates FLEET_INTELLIGENCE database | | CREATE WAREHOUSE | Account | Creates ROUTING_ANALYTICS warehouse | | CREATE SCHEMA | Database (FLEET_INTELLIGENCE) | Creates FLEET_INTELLIGENCE_FOOD_DELIVERY schema | | CREATE TABLE | Schema | Creates CONFIG table | | CREATE VIEW | Schema | Creates projection views | | SELECT ON SYNTHETIC_DATASETS.UNIFIED | Schema | Reads Data Studio output tables |
Note: ACCOUNTADMIN is NOT required. Create a custom role with the above privileges.
Follow the Error Logging convention in AGENTS.md. Log file prefix:
fleet-intelligence-food-delivery.
The primary data path is Data Studio in the ORS Control Panel:
ebike (E-Bike Couriers) profileThis writes to SYNTHETIC_DATASETS.UNIFIED.FACT_VEHICLE_TELEMETRY and SYNTHETIC_DATASETS.UNIFIED.FACT_TRIPS. The projection views in Step 10 read from these tables.
Seed data is pre-loaded by build-routing-solution Step 8 into SYNTHETIC_DATASETS.UNIFIED. To create the projection views:
Execute references/seed-data.sql. This creates CONFIG, DELIVERIES, and RESTAURANTS_ENRICHED views over UNIFIED data.
Execute each step in order using snowflake_sql_execute. Substitute {PLACEHOLDER} values based on the user's chosen configuration before executing.
These rules MUST be followed to avoid silent failures:
One statement per
snowflake_sql_executetool call. Never combine multiple SQL statements (CREATE, INSERT, SET, USE) in a single tool call. Multi-statement blocks can silently fail -- tables may be created with 0 rows and no error is reported. This rule applies to thesnowflake_sql_executetool only;snow sql -fand other CLI execution is fine.Always use fully qualified object names. Use
FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.<object>instead of relying onUSE DATABASE/USE SCHEMA. Session context fromUSEstatements does not persist acrosssnowflake_sql_executecalls.Never use
SETsession variables. Variables set withSET VAR = 'value'do not persist across calls. Instead, substitute literal values directly into the SQL before execution.Verify row counts after each CTAS. Run
SELECT COUNT(*) FROM <table>after everyCREATE TABLE ... AS SELECTto catch silent failures early.All CREATE statements must include a COMMENT tracking tag per AGENTS.md convention:
COMMENT = '{"origin":"sf_sit-is-fleet","name":"oss-fleet-intelligence-food-delivery",...}'. Seereferences/sql-projection-views.sqlfor tagged SQL.
ALTER SESSION SET query_tag = '{"origin":"sf_sit-is-fleet","name":"oss-fleet-intelligence-food-delivery","version":{"major":1, "minor":0},"attributes":{"is_quickstart":1, "source":"sql"}}';
Create FLEET_INTELLIGENCE database, ROUTING_ANALYTICS warehouse, and FLEET_INTELLIGENCE_FOOD_DELIVERY schema.
Run references/sql-projection-views.sql to create CONFIG table + projection views from SYNTHETIC_DATASETS.UNIFIED. Creates 3 objects: 1 config table + 2 React views (DELIVERIES, RESTAURANTS_ENRICHED).
SELECT 'CONFIG' AS TBL, COUNT(*) AS CNT FROM FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.CONFIG
UNION ALL SELECT 'DELIVERIES', COUNT(*) FROM FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERIES
UNION ALL SELECT 'RESTAURANTS_ENRICHED', COUNT(*) FROM FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.RESTAURANTS_ENRICHED;
Expected: CONFIG=1, DELIVERIES and RESTAURANTS_ENRICHED > 0 (row counts depend on Data Studio generation or seed data).
| Issue | Solution |
|-------|----------|
| No data in projection views | Run Data Studio generation with ebike profile for your region |
| CONFIG table missing | Run Step 3 to create CONFIG + projection views |
To remove all objects created by this skill:
-- Projection views
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.RESTAURANTS_ENRICHED;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERIES;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.CONFIG;
-- Legacy objects (from deprecated Steps 3-9)
DROP STREAMLIT IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.SWIFTBITE_DELIVERY_DASHBOARD;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_SUMMARY;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_ROUTE_PLAN;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_NAMES;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.ORDERS_ASSIGNED_TO_COURIERS;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.COURIER_LOCATIONS_V;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.VW_DELIVERY_SUMMARY;
DROP VIEW IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.VW_COURIER_LOCATIONS;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.COURIER_LOCATIONS;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_ROUTE_GEOMETRIES;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_ROUTES_PARSED;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_ROUTES;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.ORDERS_WITH_LOCATIONS;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.DELIVERY_ORDERS;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.ADDRESSES_NUMBERED;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.RESTAURANTS_NUMBERED;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.COURIERS;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.CUSTOMER_ADDRESSES;
DROP TABLE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.RESTAURANTS;
DROP STAGE IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY.STREAMLIT_STAGE;
DROP SCHEMA IF EXISTS FLEET_INTELLIGENCE.FLEET_INTELLIGENCE_FOOD_DELIVERY;
Tip: Use the
cleanupskill to auto-discover all tagged objects via COMMENT tracking.
tools
Optimize, audit, create, and improve Cortex Code skills following official best practices from the Anthropic skill-building guide. Use when: creating a new skill, reviewing an existing skill, optimizing skill description or triggers, improving SKILL.md structure, auditing skill quality, fixing undertriggering or overtriggering, restructuring skill for progressive disclosure. Do NOT use for: general code review, non-skill markdown editing, MCP server development. Triggers: optimize skill, audit skill, review skill, create skill, improve skill, fix skill triggers, skill best practices, skill quality check.
testing
Discover and remove all Snowflake objects created by skills in this repo. Uses the COMMENT tracking tag (sf_sit-is-fleet) to find objects, generates DROP statements, and optionally executes them. Use when: cleaning up after a demo, removing all skill-created objects, tearing down an environment, uninstalling a specific skill's objects. Do NOT use for: dropping objects not created by these skills, production environment cleanup without review. Triggers: routing-solution-cleanup, cleanup, teardown, remove, uninstall, drop all, clean up demo, remove skill objects, reset environment.
tools
Check and install build prerequisites for the Routing Solution project. Use when: verifying environment setup before building, checking if Docker/Podman/snow CLI are installed, confirming readiness to build. Do NOT use for: building the routing solution itself (use build-routing-solution), deploying demos, or changing ORS configuration. Triggers: check prerequisites, check build prerequisites, am I ready to build, what do I need installed, verify environment setup, Docker installed, Podman installed, snow CLI installed.
tools
Enable or disable ORS routing profiles (driving-car, driving-hgv, cycling, walking, wheelchair). Subskill of routing-customization — must be invoked from the router, not independently. Use when: changing vehicle types as part of customization workflow. Do NOT use for: standalone execution, changing map region, or deploying demo apps. Triggers: change routing profile, change vehicle type, enable profile, disable profile.