店小秘上架
Use this skill to convert an AI 商品流水线上架包 into a Dianxiaomi 店小秘上架 TEMU 半托管 Excel import pack or草稿 workflow. Prefer bulk Excel import for multi-SKU铺货; use browser草稿保存 only for single-SKU validation. This is an operator-assist workflow, not a publishing adapter.
Defaults
- Project:
~/Documents/Playground/flow-task-center-pro - Workspace:
default-workspace - Console:
http://127.0.0.1:4173/pipeline-console.html?workspaceId=default-workspace - Preferred manifest:
~/Documents/Playground/flow-task-center-pro/output/listing-upload-packs/default-workspace/latest/manifest.json - Bulk import output:
~/Documents/Playground/flow-task-center-pro/output/dianxiaomi-bulk-import/default-workspace/<batchId>/ - Human pack root:
~/Documents/AI商品上架包 - Dianxiaomi TEMU 半托管 add page:
https://dianxiaomi.com/web/popTemu/add - Human visible files:
01-上传图片/and02-店小秘补丁页.html
Hard Rules
- Never click
发布,定时发布, or any equivalent final publish action. - In browser tests, stop at dry-run or click only
保存when the user explicitly asks for a saved draft. - For batch铺货, generate a Dianxiaomi official-template
.xlsximport pack first; do not automate web publishing. - Main image path: upload the local 9 generated images to Dianxiaomi 图片空间, export/copy stable 图片空间 URLs, then pass them as
--image-url-map. - Never write
/Users/...,file://,localhost, or127.0.0.1image paths into a Dianxiaomi import workbook. Image columns need server-accessible public URLs. - Treat Cloudflare Tunnel /
trycloudflare.comas draft-save-test only. It is never production-ready image hosting. - Do not invent ProductTruth, material, color, dimensions, weight, price, category, warehouse, freight template, compliance, brand, or authorization.
- Keep
站外产品链接blank by default. Use supplier/1688 links in 店小秘来源URLonly. - Do not write receipts or system files into
~/Documents/AI商品上架包/<product>/. - Do not read or print credentials, cookies, runtime config, tokens, OTPs, or secrets.
Workflow
Read
~/Documents/Playground/AGENTS.mdandCURRENT_TASK.mdin a fresh thread.Fast daily path for generated products:
- Run
npm run dianxiaomi:fast-bulk -- --phase prepare-upload ...once without--image-url-mapto getimage-url-map.template.jsonand the flatimage-space-upload/directory. - Upload the files from
image-space-upload/to Dianxiaomi 图片空间 in one multi-file upload. These files are uniquely named with SKU + slot, so URL scraping does not confuse multiple01.jpgfiles. - Scrape/copy the returned 图片空间 URLs back into
image-url-map.json. - Rebuild the official Excel with
npm run dianxiaomi:fast-bulk -- --phase build-import --image-url-map ..., import the whole batch to待发布, then edit only the first SKU per product family or any error rows.
- Run
For multi-SKU铺货 or batch import, upload generated images to Dianxiaomi 图片空间 first and create an image URL map:
{ "PM-FLOW-197M38J": [ "https://img.dianxiaomi.com/....../01.jpg", "https://img.dianxiaomi.com/....../02.jpg", "https://img.dianxiaomi.com/....../03.jpg", "https://img.dianxiaomi.com/....../04.jpg", "https://img.dianxiaomi.com/....../05.jpg", "https://img.dianxiaomi.com/....../06.jpg", "https://img.dianxiaomi.com/....../07.jpg", "https://img.dianxiaomi.com/....../08.jpg", "https://img.dianxiaomi.com/....../09.jpg" ] }Save it inside the project output, for example:
output/dianxiaomi-bulk-import/default-workspace/<batchId>/image-url-map.jsonBuild the official-template import pack:
Preferred fast-bulk prepare command:
cd ~/Documents/Playground/flow-task-center-pro npm run dianxiaomi:fast-bulk -- \ --phase prepare-upload \ --mode draft-save-test \ --template "/path/to/店小秘TEMU半托管官方模板.xlsx" \ --test-price-usd 19.99 \ --test-declare-price-cny 99The prepare phase is considered successful when it prints
imageSpaceUploadRootPathandimageUrlMapTemplatePath, even thoughimportReadyis still false. Upload every file inimageSpaceUploadRootPathto Dianxiaomi 图片空间, scrape the resulting URLs intoimage-url-map.json, then run:npm run dianxiaomi:fast-bulk -- \ --phase build-import \ --mode draft-save-test \ --template "/path/to/店小秘TEMU半托管官方模板.xlsx" \ --image-url-map "output/dianxiaomi-bulk-import/default-workspace/<batchId>/image-url-map.json" \ --test-price-usd 19.99 \ --test-declare-price-cny 99Lower-level direct builder:
cd ~/Documents/Playground/flow-task-center-pro npm run dianxiaomi:bulk -- \ --mode draft-save-test \ --template "/path/to/店小秘TEMU半托管官方模板.xlsx" \ --image-url-map "output/dianxiaomi-bulk-import/default-workspace/<batchId>/image-url-map.json" \ --test-price-usd 19.99 \ --test-declare-price-cny 99Production mode must omit test prices and use middle-platform pricing:
npm run dianxiaomi:bulk -- \ --mode production-ready \ --template "/path/to/店小秘TEMU半托管官方模板.xlsx" \ --image-url-map "output/dianxiaomi-bulk-import/default-workspace/<batchId>/image-url-map.json"If the command reports
imagePublicUrl:missing,imageUrlMap:*,template:unmatched-header,color:ambiguous,productFamily:category-mismatch, or pricing blockers, stop and report the generated批量预检.htmlandblockers.json. Do not hand-edit a workbook to bypass blockers. When no image URL map is supplied, both commands writeimage-url-map.template.jsonin the batch output. Upload the listed files to Dianxiaomi 图片空间, paste the returned URLs into that template, save it asimage-url-map.json, then rerun with--image-url-map.Resolve one pack for single-SKU browser validation:
node ~/.codex/skills/dianxiaomi-shangjia/scripts/resolve_dxm_pack.mjs --prettyAdd
--sku <masterSku>when multiple SKUs exist. Add--folder "~/Documents/AI商品上架包/<folder>"for a direct human folder.Run preflight before browser work:
node ~/.codex/skills/dianxiaomi-shangjia/scripts/preflight_dxm_pack.mjs --prettyFor a user-authorized save test with a temporary price:
node ~/.codex/skills/dianxiaomi-shangjia/scripts/preflight_dxm_pack.mjs \ --sku PM-FLOW-197M38J \ --mode draft-save-test \ --test-price-usd 19.99 \ --prettyIf Dianxiaomi requires
申报价格(CNY), pass an explicitly authorized separate test declaration price:node ~/.codex/skills/dianxiaomi-shangjia/scripts/preflight_dxm_pack.mjs \ --sku PM-FLOW-197M38J \ --mode draft-save-test \ --test-price-usd 19.99 \ --test-declare-price-cny 99 \ --prettyRead
references/templates.mdwhen deciding which fields can be fixed by template. Readreferences/field-map.mdbefore filling or guiding the 店小秘 page.Distinguish the mode:
dry-run: preview and guide only; do not save.draft-save-test: a user-authorizedmanualTestPriceUsdmay satisfy Dianxiaomi save validation, but it is not official pricing.production-ready: requires middle-platform pricing and all required evidence fields; manual test prices do not count.
If preflight reports missing images, missing title, missing dimensions, missing weight, missing material/color, missing
申报价格(CNY), or a missing user-authorized test/official price for the current mode, stop and report the exact blockers unless the user explicitly asks for a diagnostic dry-run.Use the user's existing Chrome login for Dianxiaomi. Prefer semantic browser control when available; use Computer Use only for native file pickers or visually dependent confirmation.
Start from 店小秘 TEMU 半托管 add/edit page. If an existing product is open, do not overwrite it unless the user explicitly says it is the target draft.
Apply template fields first:
- TEMU 半托管
- 店铺账号
P V Gonly when user-authorized or configured - 美国站
- 中国大陆
- 敏感属性
否only when ProductTruth has no sensitive evidence - 定制产品
否 - 9个工作日内发货 unless the pack supplies a stricter value
- 运费模板 matching
够快only when visible - 仓库全选
GoFast_Y2-L美西_7-9for the currentP V G+ 美国站 test/template - 珠宝首饰收纳类目: use the related path visible in Dianxiaomi such as
家居、厨房用品 > 收纳用品 > 珠宝首饰盒和收纳; stop if only unrelated categories appear
- Upload images from
01-上传图片for single-SKU browser tests, or use Dianxiaomi 图片空间 URLs for Excel import:
- Product carousel:
01-素材图.jpgthrough06-轮播图-5.jpg - Product material image: use
01-素材图.jpg - Description/detail images: use
08-详情图-1.jpgand09-详情图-2.jpg 07-外包装图片.jpgis a backup/outer-package reference unless the page requires it.
- Fill dynamic fields from
02-店小秘补丁页.html: title, English title, SKU, price, declaration price when evidence or explicit CNY test value exists, dimensions, weight, material, color, source URL, description. - After import, open the draft edit page and verify:
- product images are visible, not blank boxes
产地is中国大陆and province is广东- single SKU has one color only; for
PM-FLOW-197M38Jthe color is粉色, not蓝色、黄色、粉色 - category is not mixed across product families
- warehouse rows use
GoFast_Y2-L美西_7-9 - if the list
编辑button does not navigate, read the rowrowidfrom the imported待发布 row and openhttps://www.dianxiaomi.com/web/popTemu/edit?id=<rowid>directly
- Run Dianxiaomi
图片检测when available. If the page reports image or validation failures, stop and summarize. - Save only when explicitly authorized:
node ~/.codex/skills/dianxiaomi-shangjia/scripts/write_dxm_receipt.mjs \
--status saved-draft \
--mode draft-save-test \
--store-name "P V G" \
--warehouse-selection "GoFast_Y2-L美西_7-9" \
--warehouse-selection-mode "select-all" \
--manual-test-price-usd 19.99 \
--note "Saved in Dianxiaomi only; not published"
Real-Tested Notes
- 2026-06-25
PM-FLOW-197M38Jdraft-save-test succeeded with Dianxiaomi 图片空间 URLs. - Fast-bulk command stages:
prepare-upload: generatesimage-space-upload/,image-url-map.template.json,批量预检.html, andblockers.json; it is the correct stopping point before the 图片空间 upload.build-import: requires--image-url-map; it should generate店小秘TEMU半托管批量导入.xlsxor report real blockers.scrape-image-space: reserved for browser/plugin execution; do not claim URL scraping succeeded unless the browser/plugin actually collected Dianxiaomi image-space URLs.
- Dianxiaomi 图片空间 upload path used in the real test:
https://www.dianxiaomi.com/web/service/uploadPic; image management page:https://www.dianxiaomi.com/web/service/album. - Successful image URLs used
https://wxalbum-10001658-file.dianxiaomi.com/...; imported list thumbnails and edit-page carousel images showed800 X 800and loaded with natural size800x800. - Official Excel import created a待发布 draft, but the official workbook did not persist these post-import fields:
产地省份,运费模板, and category material enum. In the real test, edit page fixes were广东省,够快模版, and其他材料because the product evidence was Polyester and no exact Polyester option was visible. - The product list row id for a newly imported draft is usable as the edit id. Example: row
rowid="132884090892225683"opened with/web/popTemu/edit?id=132884090892225683. - A successful edit save shows the modal text
您的产品编辑成功!. This is still a draft-save state; it is not a publish.
Helper Scripts
scripts/resolve_dxm_pack.mjs: wraps the existing AI listing-pack resolver and prints the selected SKU, fields, images, copy page, and human folder.scripts/preflight_dxm_pack.mjs: applies 店小秘 templates, validates 9 image names/order, checks dynamic listing fields, and prints next action.scripts/write_dxm_receipt.mjs: writes a secret-free receipt under the projectoutput/listing-upload-packs/<workspace>/receipts/, never in the human pack folder.
Validation
Before treating skill changes as complete, run:
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py \
~/.codex/skills/dianxiaomi-shangjia
node ~/.codex/skills/dianxiaomi-shangjia/scripts/resolve_dxm_pack.mjs --pretty
node ~/.codex/skills/dianxiaomi-shangjia/scripts/preflight_dxm_pack.mjs --pretty