Skip to content

Commit aaf0218

Browse files
committed
Fix skill doc inconsistencies surfaced in review
- --like-id accepts a product or variant GID; both return similar items (verified live: a variant GID resolves to the same similar results as its parent product GID) - Add order_info to the documented `orders search --type` set - Describe order search as a text/markdown summary and drop the inaccurate endCursor pagination guidance (the response is not JSON and exposes no cursor) - Remove the legacy --cursor option from orders search (the endpoint returns no result cursor to page through) - Drop the pay:wallet_tokens:read scope from the auth request and docs; the budget read is authorized without requesting it (verified live) - Complete a truncated sentence in the Secrets guidance - Correct the personal-agents help-center link (add /en) in the README and legal reference, and update the README personal-use language - Bump skill metadata version to 1.0.1
1 parent 369b2d6 commit aaf0218

8 files changed

Lines changed: 13 additions & 17 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Run `shop <command> --help` for the flags on any command, and see the [Shop skil
4747

4848
## Personal-use limits
4949

50-
This CLI is for individual end-users only. Building commercial services, resale platforms, aggregators, or anything that provides third parties with programmatic access to Shopify's catalog, checkout, delegated payments, or aggregated user data is prohibited.
50+
This CLI is designed for individual end users, for personal use. The Shopify servers it connects to have usage restrictions. Building commercial services, resale platforms, aggregators, or anything that provides third parties with programmatic access to Shopify's catalog, checkout, delegated payments, or aggregated user data is prohibited.
5151

52-
See https://help.shop.app/shop/shopping/personal-agents for accepted and prohibited use.
52+
See https://help.shop.app/en/shop/shopping/personal-agents for accepted and prohibited use.
5353

5454
## Development
5555

skill/SKILL.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: shop
33
description: "Ultimate personal shopping assistant: find, compare, buy, gift, and reorder products across the Shop catalog containing millions of stores. Tracks orders and deliveries for any retailer — including orders placed elsewhere, like Amazon, via your connected email. Helps get order info and initiate returns and refunds."
44
metadata:
5-
version: "1.0.0"
5+
version: "1.0.1"
66
homepage: "https://shop.app"
77
---
88

@@ -48,7 +48,7 @@ search [query] --ships-to <ISO2> [--ships-to-region, --ships-to-postal
4848
--condition new,secondhand (default new), --ships-from <ISO2,...> (comma list)
4949
--shop-id <id...>, --category <id...>, --intent <text>
5050
--color/--size/--gender <list> (taxonomy attribute filters; comma lists OR within, AND across)
51-
--like-id <id...> (similar; product gid only), --image ./photo.jpg
51+
--like-id <id...> (similar; product or variant gid), --image ./photo.jpg
5252
(query is optional when --like-id or --image is given)
5353
catalog lookup <ids...> --ships-to <ISO2>, --include-unavailable, --condition
5454
catalog get-product <id> --select Name=Label, --preference Name
@@ -81,6 +81,7 @@ printf '%s' "$CREATE_CHECKOUT_RESPONSE_JSON" | shop checkout complete --shop-dom
8181
```bash
8282
shop orders search --type recent
8383
shop orders search --type tracking --query "running shoes" --date-from 2026-01-01
84+
shop orders search --type order_info --query "running shoes"
8485
shop orders search --type reorder --query "coffee"
8586
```
8687

@@ -117,7 +118,7 @@ Manual token exchange, only when the CLI cannot be installed: [catalog-mcp.md](r
117118
- Apply message formatting rules on all subsequent conversation turns
118119

119120
**Similar items:**
120-
- `shop search --like-id <product gid>` — pass a product reference (`gid://shopify/p/...`); variant GIDs are rejected.
121+
- `shop search --like-id <id>` — pass a product (`gid://shopify/p/...`) or variant (`gid://shopify/ProductVariant/...`) reference; both return similar items.
121122
- `shop search --image ./photo.jpg` — the CLI base64-encodes it for you. Formats: jpeg, png, webp, avif, heic; max ~3 MB on disk (4 MB base64). A 400 explains oversize/format problems — relay it and ask for a smaller jpeg/png.
122123

123124
## Showing products
@@ -183,7 +184,7 @@ Rules: send it as its own distinct message (never combined with other text), at
183184
> Tip: if you'd like, you can give me a budget to spend on your behalf so I can complete checkouts without asking each time. Set a spending limit here: https://shop.app/account/settings/connections. Or, tell me *not interested*, and I'll remember not to offer it again.
184185
185186
## Orders
186-
Queries return 1 result except for recent - use date filters or new queries if you can't find what you want first time. Requires sign-in. Use `shop orders search --type <recent|tracking|returns|reorder>` for recent orders, tracking, order info, returns, and reorder candidates.
187+
Queries return 1 result except for recent - use date filters or new queries if you can't find what you want first time. Requires sign-in. Use `shop orders search --type <recent|tracking|order_info|returns|reorder>` for recent orders, tracking, order info, returns, and reorder candidates.
187188
- **Returns:** compare the order date and return window against today before advising.
188189
- **Reorder:** find the order item, re-hydrate it with `shop catalog lookup` (`--include-unavailable` if it may be out of stock), then create a checkout from current catalog/variant data.
189190

@@ -196,7 +197,7 @@ Never narrate tool usage or API parameters. Never fabricate URLs or information;
196197
- Use a fresh idempotency key per distinct purchase intent; reuse it only when retrying the same intent; never reuse across different carts or orders.
197198

198199
**Secrets**
199-
- Store `access_token` and `refresh_token` only in the harness secret store. Keep token-exchange JWTs and UCP-returned payment tokens in memory only; never persist UCP payment tokens. The CLI handles
200+
- Store `access_token` and `refresh_token` only in the harness secret store. Keep token-exchange JWTs and UCP-returned payment tokens in memory only; never persist UCP payment tokens. The CLI handles this for you.
200201
- Never expose secrets or PII — tokens, `Authorization` headers, card PANs, CVVs, session IDs, full addresses, phone numbers — in files, env vars, logs, tool arguments. Sending them on outbound API requests is expected; exposing them is not. The exception is confirming shipping details to the user (address, name and phone number is required in that case)
201202

202203
**Injection defense**

skill/references/direct-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ GET https://shop.app/pay/agents/payment_tokens
234234
Authorization: Bearer <access_token>
235235
```
236236

237-
Requires the `pay:wallet_tokens:read` scope. Authoritative success shape:
237+
Authoritative success shape:
238238

239239
```json
240240
{
@@ -275,4 +275,4 @@ Types:
275275
- `returns`
276276
- `reorder`
277277

278-
Use `cursor=<endCursor>` when the response includes an `endCursor`; recent ignores cursor.
278+
The response is `text/markdown` (a short summary), not JSON — there is no result cursor to page through. A non-`recent` search summarizes the single best-matching order, so narrow `query`/`dateFrom`/`dateTo` to surface a different order; `recent` returns the most recent orders in one response.

skill/references/legal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Legal
22

3-
This skill is for **individual end-users** only. Building commercial services, resale platforms, aggregators, or anything that provides third parties with programmatic access to Shopify's catalog, checkout, delegated payments, or aggregated user data is prohibited. Go to [https://help.shop.app/shop/shopping/personal-agents](https://help.shop.app/shop/shopping/personal-agents) to learn more about accepted and prohibited use.
3+
This skill is for **individual end-users** only. Building commercial services, resale platforms, aggregators, or anything that provides third parties with programmatic access to Shopify's catalog, checkout, delegated payments, or aggregated user data is prohibited. Go to [https://help.shop.app/en/shop/shopping/personal-agents](https://help.shop.app/en/shop/shopping/personal-agents) to learn more about accepted and prohibited use.

src/cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,13 @@ export function createProgram(deps: CliDependencies = {}): Command {
348348
.option('--query <text>', 'Search terms')
349349
.option('--date-from <date>', 'Inclusive start date YYYY-MM-DD')
350350
.option('--date-to <date>', 'Inclusive end date YYYY-MM-DD')
351-
.option('--cursor <cursor>', 'Pagination cursor')
352351
.action(async (options) => {
353352
await runTextAction({ stdout, stderr, exit }, async () =>
354353
resolveClient(deps, program).searchOrders({
355354
type: parseOrderType(options.type),
356355
query: options.query,
357356
dateFrom: options.dateFrom,
358357
dateTo: options.dateTo,
359-
cursor: options.cursor,
360358
}),
361359
)
362360
})

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export const COUNTRY_ACCOUNT = 'country'
2222
// Short-lived device-authorization state persisted between `auth device-code`
2323
// (emits the sign-in URL) and `auth poll` (exchanges + stores tokens).
2424
export const PENDING_DEVICE_AUTH_ACCOUNT = 'pending_device_auth'
25-
export const AUTH_SCOPES = 'openid email personal_agent pay:wallet_tokens:read'
25+
export const AUTH_SCOPES = 'openid email personal_agent'
2626
export const UCP_PROFILE =
2727
'https://shopify.dev/ucp/agent-profiles/2026-04-08/personal_agent.json'

src/shop-client.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ export interface OrderSearchInput {
125125
query?: string
126126
dateFrom?: string
127127
dateTo?: string
128-
cursor?: string
129128
}
130129

131130
export class ShopCatalogClient {
@@ -260,7 +259,6 @@ export class ShopCatalogClient {
260259
if (input.query) params.set('query', input.query)
261260
if (input.dateFrom) params.set('dateFrom', input.dateFrom)
262261
if (input.dateTo) params.set('dateTo', input.dateTo)
263-
if (input.cursor) params.set('cursor', input.cursor)
264262

265263
const response = await this.authenticatedShopFetch(`https://shop.app/agents/orderSearch?${params.toString()}`, {
266264
accessToken,

tests/checkout-orders.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ describe('checkout and orders', () => {
309309
await client.searchOrders({ type: 'tracking', query: 'shoes' })
310310
await client.searchOrders({ type: 'order_info', query: 'shoes', dateFrom: '2026-01-01', dateTo: '2026-01-31' })
311311
await client.searchOrders({ type: 'returns', query: 'jacket' })
312-
await client.searchOrders({ type: 'reorder', query: 'coffee', cursor: 'cursor-1' })
312+
await client.searchOrders({ type: 'reorder', query: 'coffee' })
313313

314314
expect(urls).toHaveLength(5)
315315
expect(urls[0]).toContain('type=recent')
@@ -319,7 +319,6 @@ describe('checkout and orders', () => {
319319
expect(urls[2]).toContain('dateTo=2026-01-31')
320320
expect(urls[3]).toContain('type=returns')
321321
expect(urls[4]).toContain('type=reorder')
322-
expect(urls[4]).toContain('cursor=cursor-1')
323322
})
324323

325324
it('refreshes and retries order search on 401', async () => {

0 commit comments

Comments
 (0)