Setup
On first use, read setup.md for integration guidelines.
When to Use
User needs Instacart-specific execution rather than generic grocery advice. Activate for shoppable recipe pages, shopping list pages, nearby retailer lookup, MCP-based agent handoff, launch-readiness checks, or API troubleshooting around Instacart Developer Platform.
Architecture
Memory lives in ~/instacart/. See memory-template.md for setup.
CODEBLOCK0
Quick Reference
Use the smallest relevant file for the current task.
| Topic | File |
|---|
| Setup and activation behavior | INLINECODE3 |
| Memory schema and status values |
memory-template.md |
| Auth, environments, and key model |
auth-playbook.md |
| Core endpoint coverage |
endpoint-map.md |
| Request bodies, payload shaping, and curl examples |
request-patterns.md |
| MCP server setup and tool limits |
mcp-integration.md |
| Connect and fulfillment boundaries |
connect-boundaries.md |
| Errors, retries, and low-signal matches |
troubleshooting.md |
Requirements
- - Required secret: INLINECODE11
- Required tool for the documented smoke tests: INLINECODE12
- Optional tool for MCP Inspector workflows: INLINECODE13
- Optional: MCP Inspector for validating MCP connectivity
Never ask the user to paste API keys into chat. Use environment variables or their existing secret manager.
Data Storage
Local notes in ~/instacart/ should store:
- - approved environment and surface selection
- geo defaults such as
country_code and common postal codes - known-good payload shapes and normalized line-item conventions
- generated link cache keyed by normalized content hash
- production approval status and messaging restrictions
Core Rules
1. Choose the Right Surface Before Sending Traffic
Decide explicitly between:
- - Developer Platform MCP for agent-native
create-recipe and INLINECODE17 - Developer Platform REST for recipe pages, shopping list pages, and nearby retailers with full request control
- Instacart Connect for branded ecommerce, fulfillment, post-checkout, sandbox callbacks, or retailer workflows
Do not mix these surfaces casually. Wrong routing creates auth failures, wrong expectations, and rework.
2. Lock Environment, Auth, and Scope First
Before any request, confirm:
- - development or production
- the correct base URL for that environment
- INLINECODE18 for Developer Platform REST
- whether the API key has the required permission level and endpoint access
Production keys should only be used after the integration has passed Instacart review and is active.
3. Normalize Inputs for Matching, Not Human Prose
Instacart matching is heuristic. For each ingredient or line item:
- - keep
name generic and searchable - keep brand preferences in INLINECODE20
- keep health preferences in INLINECODE21
- use either
product_ids or upcs, never both - use supported units and positive quantities only
Do not hide size, brand, dietary intent, and geo assumptions inside one noisy string.
4. Validate Geo and Retailer Context Up Front
For nearby retailer lookup, use
postal_code plus
country_code.
- - current public docs show
US and INLINECODE27 - retailer lookup returns organization-level
retailer_key, not a specific store id - a valid postal code does not guarantee good ingredient coverage
Run retailer lookup before presenting a user-facing link when store relevance matters.
5. Add Client-Side Idempotency
Recipe and shopping-list creation return a fresh
products_link_url, and the docs recommend caching until content changes.
- - canonicalize the request payload
- hash the normalized payload plus environment
- reuse the stored URL when nothing material changed
- regenerate only when title, items, instructions, filters, or link settings changed
Do not spam page-creation endpoints for equivalent content.
6. Treat Measurements and Filters as Ranking Inputs
Ordering and correctness matter:
- - for countable items, prefer INLINECODE30
- if multiple measurements are provided, order them intentionally
- keep brand and health filters separate from the product name
- keep brand spelling and health filters exact
- stay conservative on filter count per item for better matches
Poor units and noisy names are a common cause of missing quantity or weak matches.
7. Respect Launch and Messaging Constraints
Before moving to production:
- - complete development testing
- pass the pre-launch and approval workflow
- assume a new production key is non-functional while pending approval
- keep public messaging and logo usage aligned with Instacart guidelines
Never claim Instacart endorsement, invent brand usage rules, or ship production messaging without checking current guidance.
Common Traps
- - Using Connect when the task only needs a shoppable page -> heavier auth and wrong integration surface
- Using MCP for retailer lookup -> current MCP toolset does not cover it
- Mixing
product_ids and upcs on the same item -> 400 validation error - Repeating the same UPC or product id across multiple items -> duplicate identifier errors
- Stuffing brands into
name instead of brand_filters -> weaker fallback matching - Sending unsupported or vague units -> product may match without a useful quantity
- Treating
retailer_key as a specific store record -> bad downstream assumptions - Recreating identical pages on every run -> unnecessary link churn and harder attribution
- Requesting production traffic before approval -> key stays pending and does not function
- Publishing UI or marketing copy without guideline review -> launch risk and brand rejection
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| https://connect.dev.instacart.tools | API key header, retailer lookup params, page-creation payloads | Developer Platform development REST traffic |
| https://connect.instacart.com |
API key header, retailer lookup params, page-creation payloads | Developer Platform production REST traffic |
| https://mcp.dev.instacart.tools/mcp | API key header and tool payloads | Development MCP server for agent testing |
| https://mcp.instacart.com/mcp | API key header and tool payloads | Production MCP server |
| https://dashboard.instacart.com | Account and API key management traffic | Create keys and review approval state |
| https://enterprise-servicedesk.instacart.com | Support case metadata | Escalate rejected or broken integrations |
No other data should be sent externally unless the user explicitly adopts Instacart Connect or additional partner programs.
Security & Privacy
Data that leaves your machine:
- - request bodies for recipe pages and shopping list pages
- retailer lookup parameters such as postal code and country
- API key authentication headers
- optional MCP tool payloads
Data that stays local:
- - caches and operating notes in INLINECODE36
- request diffs, retry notes, and approved retailer defaults
- raw secrets if the user stores them in an environment manager
This skill does NOT:
- - request API keys in chat
- bypass Instacart approval gates
- imply retailer fulfillment features are available through Developer Platform page APIs
- send undeclared traffic outside the documented Instacart surfaces
Trust
By using this skill, data is sent to Instacart services and any explicitly configured Connect workflows.
Only install and run it if you trust Instacart with the grocery and integration data you send.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
api - Build reliable REST request and error-handling patterns - INLINECODE39 - Structure credential hygiene and environment separation
- INLINECODE40 - Handle grocery-domain planning and item taxonomy
- INLINECODE41 - Model callback verification and event-driven workflows
- INLINECODE42 - Turn repeated integration steps into clear operating runbooks
Feedback
- - If useful: INLINECODE43
- Stay updated: INLINECODE44
设置
首次使用时,请阅读 setup.md 获取集成指南。
使用时机
用户需要Instacart特定的执行方案而非通用杂货建议时启用。适用于可购物食谱页面、购物清单页面、附近零售商查询、基于MCP的代理交接、上线就绪检查或Instacart开发者平台相关的API故障排查。
架构
记忆文件存储在 ~/instacart/ 目录下。参见 memory-template.md 了解设置方法。
text
~/instacart/
|-- memory.md # 运行上下文、激活规则、已批准界面
|-- url-cache.md # 负载哈希和生成的products_link URL
|-- retailer-notes.md # 首选零售商、地理默认值和已验证密钥
|-- launch-notes.md # 生产审批状态和消息约束
-- incidents.md # 失败请求、根本原因和修复方案
快速参考
为当前任务选择最小的相关文件。
| 主题 | 文件 |
|---|
| 设置和激活行为 | setup.md |
| 记忆模式及状态值 |
memory-template.md |
| 认证、环境和密钥模型 | auth-playbook.md |
| 核心端点覆盖范围 | endpoint-map.md |
| 请求体、负载构建和curl示例 | request-patterns.md |
| MCP服务器设置和工具限制 | mcp-integration.md |
| Connect和履约边界 | connect-boundaries.md |
| 错误、重试和低信号匹配 | troubleshooting.md |
要求
- - 必需密钥:INSTACARTAPIKEY
- 文档化冒烟测试必需工具:jq
- MCP Inspector工作流可选工具:npx
- 可选:用于验证MCP连接的MCP Inspector
切勿要求用户将API密钥粘贴到聊天中。请使用环境变量或用户现有的密钥管理器。
数据存储
~/instacart/ 中的本地笔记应存储:
- - 已批准的环境和界面选择
- 地理默认值,如 country_code 和常用邮政编码
- 已验证的负载结构和标准化行项目约定
- 以标准化内容哈希为键的生成链接缓存
- 生产审批状态和消息限制
核心规则
1. 发送流量前选择正确的界面
明确选择:
- - 开发者平台MCP,用于代理原生的 create-recipe 和 create-shopping-list
- 开发者平台REST,用于食谱页面、购物清单页面和附近零售商查询,具有完整请求控制
- Instacart Connect,用于品牌电商、履约、结账后、沙盒回调或零售商工作流
不要随意混用这些界面。错误的路由会导致认证失败、预期错误和返工。
2. 首先锁定环境、认证和作用域
在任何请求之前,确认:
- - 开发环境还是生产环境
- 该环境的正确基础URL
- 开发者平台REST的 Authorization: Bearer
- API密钥是否具有所需的权限级别和端点访问权限
生产密钥仅应在集成通过Instacart审核并激活后使用。
3. 标准化输入以匹配,而非人类语言
Instacart匹配是启发式的。对于每种食材或行项目:
- - 保持 name 通用且可搜索
- 将品牌偏好保留在 filters.brandfilters 中
- 将健康偏好保留在 filters.healthfilters 中
- 使用 product_ids 或 upcs,切勿同时使用
- 仅使用支持的计量单位和正数数量
不要将尺寸、品牌、饮食意图和地理假设隐藏在一个杂乱的字符串中。
4. 预先验证地理和零售商上下文
对于附近零售商查询,使用 postal
code 加 countrycode。
- - 当前公开文档显示支持 US 和 CA
- 零售商查询返回组织级别的 retailer_key,而非特定店铺ID
- 有效的邮政编码不能保证良好的食材覆盖范围
当店铺相关性重要时,在展示面向用户的链接之前先运行零售商查询。
5. 添加客户端幂等性
食谱和购物清单创建会返回一个新的 products
linkurl,文档建议在内容未变化前进行缓存。
- - 规范化请求负载
- 对规范化负载加环境进行哈希
- 当没有实质性变化时重用存储的URL
- 仅在标题、项目、说明、筛选器或链接设置发生变化时重新生成
不要为等效内容重复调用页面创建端点。
6. 将计量单位和筛选器视为排名输入
排序和正确性很重要:
- - 对于可计数物品,优先使用 each
- 如果提供多个计量单位,要有意排序
- 保持品牌和健康筛选器与产品名称分离
- 保持品牌拼写和健康筛选器精确
- 每个物品的筛选器数量保持保守以获得更好的匹配
不良的计量单位和混乱的名称是导致数量缺失或匹配度低的常见原因。
7. 尊重上线和消息约束
在进入生产环境之前:
- - 完成开发测试
- 通过预上线和审批工作流
- 假设新的生产密钥在待审批状态下不可用
- 保持公开消息和标志使用符合Instacart指南
未经检查当前指南,切勿声称获得Instacart认可、编造品牌使用规则或发布生产消息。
常见陷阱
- - 任务仅需可购物页面时使用Connect → 更重的认证和错误的集成界面
- 使用MCP进行零售商查询 → 当前MCP工具集不覆盖此功能
- 在同一物品上混用 productids 和 upcs → 400验证错误
- 在多个物品中重复使用相同的UPC或产品ID → 重复标识符错误
- 将品牌塞入 name 而非 brandfilters → 较弱的回退匹配
- 发送不支持或模糊的计量单位 → 产品可能匹配但无有用数量
- 将 retailer_key 视为特定店铺记录 → 错误的下游假设
- 每次运行都重新创建相同的页面 → 不必要的链接变更和更难的归因
- 在审批前请求生产流量 → 密钥保持待审批状态且不生效
- 未经指南审查发布UI或营销文案 → 上线风险和品牌拒绝
外部端点
| 端点 | 发送的数据 | 用途 |
|---|
| https://connect.dev.instacart.tools | API密钥头、零售商查询参数、页面创建负载 | 开发者平台开发REST流量 |
| https://connect.instacart.com |
API密钥头、零售商查询参数、页面创建负载 | 开发者平台生产REST流量 |
| https://mcp.dev.instacart.tools/mcp | API密钥头和工具负载 | 开发MCP服务器,用于代理测试 |
| https://mcp.instacart.com/mcp | API密钥头和工具负载 | 生产MCP服务器 |
| https://dashboard.instacart.com | 账户和API密钥管理流量 | 创建密钥和查看审批状态 |
| https://enterprise-servicedesk.instacart.com | 支持案例元数据 | 升级被拒绝或损坏的集成 |
除非用户明确采用Instacart Connect或其他合作伙伴计划,否则不应将其他数据发送到外部。
安全与隐私
离开您机器的数据:
- - 食谱页面和购物清单页面的请求体
- 零售商查询参数,如邮政编码和国家
- API密钥认证头
- 可选的MCP工具负载
保留在本地数据:
- - ~/instacart/ 中的缓存和操作笔记
- 请求差异、重试笔记和已批准的零售商默认值
- 如果用户将原始密钥存储在环境管理器中
此技能不会:
- - 在聊天中请求API密钥
- 绕过Instacart审批关卡
- 暗示零售商履约功能可通过开发者平台页面API使用
- 向文档化的Instacart界面之外发送未声明的流量
信任
使用此技能即表示数据将被发送到Instacart服务和任何明确配置的Connect工作流。
仅当您信任Instacart处理您发送的杂货和集成数据时才安装和运行。
相关技能
如果用户确认,使用 clawhub install 安装:
- - api - 构建可靠的REST请求和错误处理模式
- auth - 结构化凭证卫生和环境分离
- grocery - 处理杂货领域规划和物品分类
- webhook - 建模回调验证和事件驱动工作流
- workflow - 将重复的集成步骤转化为清晰的操作手册
反馈
- - 如有帮助:clawhub star instacart
- 保持更新:clawhub sync