From ecom
Creates bulk 301 redirects on Shopify by mapping old URLs to live pages using type-aware fuzzy matching. Recovers SEO equity after migrations, replatforms, or catalog restructures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ecom:shopify-redirect-mappingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn a list of 404ing URLs into live 301 redirects on a Shopify store using
Turn a list of 404ing URLs into live 301 redirects on a Shopify store using
type-aware fuzzy matching with a manual review queue for the leftovers. The job
is reclaiming search equity and rescuing lost visitors, not building a perfect
1:1 map. For bulk apply through a spreadsheet instead of the API, hand the final
map to the sibling shopify-matrixify skill's Redirects sheet.
A wrong-but-related redirect beats a 404. A visitor who lands on a close product or the right category still converts; a visitor who hits a dead page leaves. Google keeps some of the old page's equity when the 301 points somewhere topical; it keeps none when the URL 404s. So tune for coverage, not for a flawless match, and let a human review pass catch the misfires.
Worked case (an automotive-lifestyle brand, anonymized). A first pass used a single conservative 0.92 similarity threshold across all URL types. Out of 1,010 dead URLs it produced 6 redirects: effectively nothing, and the merchant called it useless. Re-running with per-type thresholds plus cross-type fallbacks yielded 725 live redirects (~72% coverage) from the same export. The lesson is blunt: do not ship a conservative first pass. Precision-first thresholds look safe and deliver nothing.
Different URL types tolerate different looseness. Classify each dead path by its prefix, then match it only against live inventory of the same type at these cut-offs:
-jacket landing on another -jacket). That is the acceptable
cost of recall; the review pass pulls the ones that are genuinely wrong.When a path can't clear its own-type threshold, fall down a type rather than giving up:
Never silently fall back to / (the homepage). Homepage fallback looks like
100% coverage but destroys the one signal that tells you a URL still needs human
attention, and it dilutes the redirect's topical value to nothing. A path that
matches nothing goes to the review queue, not to home.
Spec mismatches that are string-identical to the algorithm: a 12mm part slug is one character off a 14mm part slug, a size-S variant reads almost identical to size-XL. Fuzzy matching will confidently pick the wrong one. These get hand-pulled from the auto-apply set during review. That judgment call does not go away, and no threshold removes it.
Every matched path lands in exactly one bucket. This is what makes the pass auditable and the review scoped:
.jpg, .mp4,
/assets/), malformed rows, and anything that fell through to the queue. A
human sets or confirms the target here.Expect iteration. The anonymized case above took several passes (6 → 725 redirects) as fallback stages were added and the review queue was worked down. Budget for at least 2–3 passes on a first engagement: run, review the buckets, adjust thresholds or hand-edit targets, re-run. A one-shot redirect map is a sign you tuned for precision and left coverage on the table.
This skill reads inventory and writes redirects through the Admin API. Pick one lane; never write a token to a committed file.
Lane A, custom-app token. In Shopify admin: Settings → Apps and sales
channels → Develop apps → create an app → grant this skill's minimum scopes
(read_products, read_content, read_online_store_navigation,
write_online_store_navigation), install, and copy
the Admin API access token. Keep it in the env:
export SHOPIFY_STORE="your-store.myshopify.com"
export SHOPIFY_ACCESS_TOKEN="<your Admin API access token>" # env, not disk
Lane B, Shopify CLI OAuth (no stored token). shopify store auth --store $SHOPIFY_STORE --scopes read_products,read_content,read_online_store_navigation,write_online_store_navigation
then shopify store execute to run a validated operation.
Toolkit preflight. Lane B rides on the Shopify CLI: run shopify version
first and install it if missing. For the full Admin GraphQL schema and
validated execution, pair this skill with Shopify's official AI toolkit
plugin. In Claude Code, check claude plugin list; if it isn't there:
claude plugin marketplace add Shopify/Shopify-AI-Toolkit
claude plugin install shopify-plugin@shopify-ai-toolkit
Recommended, not required: Lane A needs only curl and a token. The toolkit gives your agent the API; this skill gives it the playbook.
urlRedirectCreate will error on a source path that already
redirects.urlRedirects dump) before a large write, so the pass is reversible.curl -I and look for 301 plus the mapped location.The GraphQL and matching logic in references/pipeline.md
are copy-and-adapt starting points. Your agent writes throwaway code per
engagement against the current schema, runs it, and discards it: that keeps the
pass honest across Shopify's quarterly schema changes rather than shipping a
binary that silently rots. The eight-step runbook, the matching-algorithm spec,
the urlRedirectCreate and Matrixify apply paths, the redirect-to-404 rot sweep
(urlRedirectUpdate), and the WordPress URL transforms all live there.
curl -I verify, plus WordPress pattern transforms.Last verified: 2026-07-05. GraphQL pinned to Admin API 2025-07; Shopify deprecates versions on a rolling quarterly schedule, so verify the mutation and query names against shopify.dev before trusting a version-specific claim. Read-only re-verification a stranger can run:
# 1. List existing redirects (confirms scope + shows current map)
curl -s "https://$SHOPIFY_STORE/admin/api/2025-07/graphql.json" \
-H "X-Shopify-Access-Token: $SHOPIFY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"{ urlRedirects(first:10){ edges{ node{ path target } } } }"}'
# 2. Probe an old path and confirm it 301s where you expect
curl -sI "https://$SHOPIFY_STORE/old-path" | grep -iE "^(HTTP|location)"
Canonical docs: Shopify URL redirects and the Admin GraphQL API; source the 404 export from Google Search Console (Pages → Not found). These skills capture operational lessons the docs don't; they are not a replacement for the reference.
Queries all Shopify URL redirects and detects redirect chains (A→B→C), duplicate targets, and orphaned redirects to improve SEO and site performance.
Creates, audits, and fixes URL redirects (301/302) for WordPress and Webflow sites. Detects chains and loops, deploys via CMS MCP.
Migrate e-commerce data to Shopify using bulk operations, product imports, and strangler fig pattern. Use for replatforming, importing product catalogs, or migrating customer/order data.
npx claudepluginhub kgelster/awesome-ecom-skills --plugin ecom