{"id":66634,"plugin_id":"plugin_asdk_app_6a5104583be08191a0f29f096fe1aca6","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-28T12:27:43.649Z","digest":"c43eaea91bdab055ae4723d72aebf56ef2fb09390bc9b45d84a9a6624520d65e","against":null,"payload":{"description":"Configure an existing Motive dealer via api_docs + execute: resolve the dealer, audit baseline site config (CMS, nav, feeds, pricing, AI), apply identity and feature updates with change sets, then verify. Use when onboarding/launching a dealer, finishing setup checklist items, or the user asks to set up / configure a dealership (not for creating a brand-new dealer record — that is outside MCP).\n","included_files":[{"relative_path":"references/execute-change-sets.md","size_in_bytes":891},{"relative_path":"references/feeds-and-inventory.md","size_in_bytes":1889},{"relative_path":"references/nav-and-cms.md","size_in_bytes":1458}],"name":"dealer-setup","skill_md_contents":"---\nname: dealer-setup\ndescription: >\n  Configure an existing Motive dealer via api_docs + execute: resolve the dealer,\n  audit baseline site config (CMS, nav, feeds, pricing, AI), apply identity and\n  feature updates with change sets, then verify. Use when onboarding/launching a\n  dealer, finishing setup checklist items, or the user asks to set up / configure\n  a dealership (not for creating a brand-new dealer record — that is outside MCP).\n---\n\n# Dealer setup (via execute)\n\nThere is **no** `ctx.create_dealer`. Setup means configuring a dealer that already\nexists. Do all work with `api_docs` / `search_docs` + `execute`. Do not invent APIs.\n\n## Tools you will use\n\n| Tool                       | Role                                                         |\n| -------------------------- | ------------------------------------------------------------ |\n| `search_docs` / `api_docs` | MCP tools (not `ctx.*`) — confirm kwargs before writing code |\n| `execute`                  | All reads and writes through `async def run(ctx): ...`       |\n| `report_issue`             | Docs wrong, unexpected errors, bad shapes                    |\n\nOptional visual inventory Apps (`browse_inventory`, `show_vehicle`) are\n**not** part of setup — ignore them unless the user asks to look at cars.\n\n## Change-set rules (writes)\n\n- Read-only `execute` calls never open a change set.\n- First mutating call: omit `change_set_id`, pass a clear `commit=...`.\n- Later mutating calls in the same prompt: reuse returned `change_set_id`.\n- Prefer small commits per concern (`Update sales phone`, `Enable chat`, …).\n\n## Workflow\n\nWork phase-by-phase. Stop and ask the user when an attribute is ambiguous or\nowner-only access fails.\n\n### 1. Resolve dealer_id\n\nIf the user gave a name/domain, search; if they gave an id, still confirm it.\n\n```python\nasync def run(ctx):\n    return await ctx.search_dealers(name=\"Example Motors\", page=1, per_page=25)\n```\n\nConfirm with:\n\n```python\nasync def run(ctx):\n    return await ctx.get_dealer(dealer_id)\n```\n\nRecord `id`, `name`, `domain` / `launch_domain`, `oem_type`, phones, address, and\nfeature/page flags from the DTO for the rest of the checklist.\n\n### 2. Baseline audit (single gather)\n\nPull a snapshot before changing anything. Adjust the set if the user only asked\nfor a slice (e.g. “just feeds”).\n\n```python\nasync def run(ctx):\n    dealer, pages, nav_settings, nav_links, feeds, pricing, ai, srp = await ctx.gather(\n        ctx.get_dealer(dealer_id),\n        ctx.list_cms_pages(dealer_id),\n        ctx.get_nav_settings(dealer_id),\n        ctx.list_nav_links(dealer_id),\n        ctx.get_import_feeds(dealer_id),\n        ctx.get_pricing_stack(dealer_id),\n        ctx.get_ai_config(dealer_id),\n        ctx.get_srp_config(dealer_id),\n    )\n    return {\n        \"dealer\": {\n            \"id\": dealer.get(\"id\"),\n            \"name\": dealer.get(\"name\"),\n            \"domain\": dealer.get(\"domain\"),\n            \"sales_phone\": dealer.get(\"sales_phone\"),\n            \"service_phone\": dealer.get(\"service_phone\"),\n            \"oem_type\": dealer.get(\"oem_type\"),\n            \"chat_enabled\": dealer.get(\"chat_enabled\"),\n            \"credit_enabled\": dealer.get(\"credit_enabled\"),\n            \"new_page\": dealer.get(\"new_page\"),\n            \"used_page\": dealer.get(\"used_page\"),\n        },\n        \"cms_page_count\": len(pages or []),\n        \"nav_link_count\": len(nav_links or []),\n        \"nav_settings\": nav_settings,\n        \"feed_summary\": feeds,\n        \"pricing_stack\": pricing,\n        \"ai_mode\": ((ai or {}).get(\"ai_config\") or {}).get(\"ai_mode\"),\n        \"has_srp_config\": srp is not None,\n    }\n```\n\nSummarize gaps for the user (missing phones, chat off, no feeds, empty nav, etc.)\nbefore writing.\n\n### 3. Identity / contact / feature flags\n\n**Owner-only.** Use `update_dealer` with only fields the user requested.\nLook up allowed fields with `search_docs` → `update_dealer` if unsure.\nImage uploads (logo, favicon, …) are **not** supported via MCP.\n\n```python\nasync def run(ctx):\n    return await ctx.update_dealer(\n        dealer_id,\n        sales_phone=\"5125559999\",\n        service_phone=\"5125558888\",\n        chat_enabled=True,\n    )\n```\n\n`commit` example: `Set phones and enable chat`.\n\nProtected fields: never pass `lead_email`, `service_adf_email`,\n`parts_adf_email`, `oem_dealer_code`, or `oem_type` to `update_dealer` (not even\nto fill a blank or resend the same value). If it raises a protected-field\n`ValueError`, warn the user and direct them to Admin Lead Settings.\n\n### 4. Feeds (if in scope)\n\nInspect then create/update. Confirm feed-source enums with docs first.\n\n```python\nasync def run(ctx):\n    feeds, sources = await ctx.gather(\n        ctx.get_import_feeds(dealer_id),\n        ctx.list_feed_sources(),\n    )\n    return {\"feeds\": feeds, \"sources\": sources}\n```\n\nThen `create_import_feed` / `update_import_feed` / pipeline helpers only when the\nuser supplied credentials/URLs and confirmed the source. Prefer\n[references/feeds-and-inventory.md](references/feeds-and-inventory.md).\n\n### 5. Navigation (if in scope)\n\n```python\nasync def run(ctx):\n    settings, sections, links = await ctx.gather(\n        ctx.get_nav_settings(dealer_id),\n        ctx.list_nav_sections(dealer_id),\n        ctx.list_nav_links(dealer_id),\n    )\n    return {\"settings\": settings, \"sections\": sections, \"links\": links}\n```\n\nUpdate settings or create/update links/sections only for explicit user requests.\nSee [references/nav-and-cms.md](references/nav-and-cms.md).\n\n### 6. CMS sanity (if in scope)\n\nList pages; fix SEO/tags/canonical only when asked. Do not invent page copy.\n\n```python\nasync def run(ctx):\n    pages = await ctx.list_cms_pages(dealer_id)\n    return [{\"id\": p.get(\"id\"), \"slug\": p.get(\"slug\"), \"title\": p.get(\"title\")} for p in pages]\n```\n\n### 7. Pricing / AI (if in scope)\n\n- For a full Vehicle Pricing V2 config (Price, Payment, and Lease tabs), follow\n  `skill://pricing-config-setup/SKILL.md`.\n- Read `get_pricing_stack` / configs before mutating pricing.\n- AI: `get_ai_config` then `update_ai_config` (owner-only) with documented enums\n  (`ai_mode`, bubble variant, etc.).\n\n### 8. Verify\n\nRe-run a focused gather of what you changed and report before/after to the user.\n\n```python\nasync def run(ctx):\n    return await ctx.get_dealer(dealer_id)\n```\n\n## Failure handling\n\n- **403 / Owner access required** — stop owner-only writes; tell the user.\n- **409 stale dealer** — re-`get_dealer`, retry `update_dealer` once with fresh data.\n- Missing/wrong kwargs — `search_docs` / `api_docs(method=...)`, then `report_issue` if docs are wrong.\n- Never guess feed credentials, OEM fields, or nav destinations.\n- **Protected field ValueError** — `update_dealer` included a lead email,\n  `oem_dealer_code` or `oem_type`. Nothing was written. Warn the user and\n  direct them to Admin Lead Settings (not MCP).\n\n## Progressive detail\n\n- Feeds / inventory checkout: [references/feeds-and-inventory.md](references/feeds-and-inventory.md)\n- Nav / CMS writes: [references/nav-and-cms.md](references/nav-and-cms.md)\n- Change-set patterns: [references/execute-change-sets.md](references/execute-change-sets.md)\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}