Skip to main content

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:
The install script downloads from the latest Release, verifies sha256, and extracts to the right location (append 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 returns RECOVERY[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.
Binding takes two steps (SMS by default, H5 link also supported):
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_KEY can 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).
No admin silent binding. Every user must authorize in person once—there is no backend secret that can skip this step for them.

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_id and quantity are required; sku_id, ingredient_option_ids, remark are optional.
  • sku_id comes from the item’s sku_options[].sku_id (omit it to use the default spec); ingredient_option_ids come from ingredient_options[].option_id.
  • All ids come from the current shop’s get_shop_menu output—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 example USER_NOT_BOUND_NEEDS_SMS → run request_user_bind / verify_user_bind to bind; a stale reference (e.g. REFERENCE_STALE) → redo search_shops → get_shop_menu to get fresh ids.
Execution rules:
  1. 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.
  2. Never claim false success—the success conclusion is whatever stdout actually returns.
  3. Confirm the address first—pick the delivery address and confirm with the user before moving to ordering.
  4. Ask with options—when the user needs to decide, offer 2–3 options rather than an open-ended question.
Talk to the user in plain language: Frame everything from the user’s point of view: “what you did, what I found for you, what’s next.” Never expose internal terms, field names, or internal ids to the user (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.