What this is
Takeout Assistant gets a takeout order done for the user: search nearby shops, browse the menu and pick dishes, preview and place the order, and track delivery—the whole flow in one place. It is an installable skill pack built on top of the Gateway, installed on your Agent (Claude Code / OpenClaw / Codex). Once installed, the Agent places orders by calling the CLI subcommands exposed by the skill (mapping 1:1 to the Gateway’s MCP tools)—it never touches the Gateway API directly. The interaction flow, wording conventions, and recovery guidance are all packaged into the skill, ready to use out of the box.Want to orchestrate the underlying capabilities with raw APIs yourself? Behind the skill are the Gateway’s 24 delivery MCP tools. For fine-grained control, see the MCP Overview; this page is about the “install and go” packaging.
Install
The skill repo provides one install command per Agent platform—just swap<platform> for the one you want:
v1.0.0 at the end to pin a version).
After installing, drop a .env into the skill root:
API_KEY is required; GATEWAY_MCP_URL can stay at its default. Create an Agent and enable the takeout capability in the console to get an API Key starting with clw_.
Authentication
The skill uses two-layer identity, but you only need to inject one value:API_KEY.
API_KEY(Agent identity,clw_prefix): the only required injection, set in.env. If missing, the script returnsRECOVERY[API_KEY_MISSING], guiding you to get a key from the console.consent_grant(user authorization,cg_prefix): represents one authorized user, valid for 90 days. Left empty at first, and generated when the user binds in person, once.
request_user_bind (step 1, sends an SMS / returns an authorization link) → verify_user_bind (step 2, verify code / poll) → on success the credential is written to the shared cache (~/.clawdot/credentials.json, isolated per API_KEY + phone, and it survives skill upgrades).- Single user: after binding once, business calls need no
--phone. - Multi-user: one
API_KEYcan serve multiple users, each bound once; business calls pass--phone <11-digit phone>to say who (authorization is stored in the shared cache, keyed by phone number).
The 12 commands
The Agent invokes CLI subcommands (mapping 1:1 to the Gateway’s MCP tool names):python3 scripts/clawdot.py <command> [--phone <phone>].
Order item model
The--items of preview_order is a JSON array; each element describes one item:
item_idandquantityare required;sku_id,ingredient_option_ids,remarkare optional.sku_idcomes from the item’ssku_options[].sku_id(omit it to use the default spec);ingredient_option_idscome fromingredient_options[].option_id.- All ids come from the current shop’s
get_shop_menuoutput—never reuse them across shops, and never use a dish name as an id. - All amount fields are in cents.
Interaction model
The “soul” of the skill is a set of shared interaction conventions, so the Agent knows whether each step succeeded or failed and how to talk to the user. Success / failure signals:- Success = the script returns JSON on stdout.
- Failure = the script prints an error +
RECOVERY[CODE]: <next step>on stderr, with a non-zero exit code. The Agent picks the next action from the RECOVERY hint—for exampleUSER_NOT_BOUND_NEEDS_SMS→ runrequest_user_bind/verify_user_bindto bind; a stale reference (e.g.REFERENCE_STALE) → redosearch_shops→get_shop_menuto get fresh ids.
- Default to being able to serve—once the skill is loaded, assume you can move the order forward; don’t refuse out of thin air.
- Never claim false success—the success conclusion is whatever stdout actually returns.
- Confirm the address first—pick the delivery address and confirm with the user before moving to ordering.
- Ask with options—when the user needs to decide, offer 2–3 options rather than an open-ended question.
preview_id, confirmation_token, etc. flow only inside the Agent).
Next steps
MCP Overview
Want to orchestrate the 18 underlying tools yourself with fine-grained control? See the raw MCP tool contract.
Supported Platforms
Install and trigger details for Claude Code / OpenClaw / Codex.

