← 返回
内容创作 Key 中文

Skill Dropshipping Product Launcher

Creates WooCommerce draft product listings with images, variants, and margin calculation from CJ Dropshipping products using product ID and sell price.
使用产品ID和售价,根据CJDropshipping产品创建包含图片、变体和利润计算的WooCommerce草稿产品列表。
zero2ai-hub
内容创作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 740
下载
💾 16
安装
1
版本
#latest

概述

skill-dropshipping-product-launcher

One command: CJ Dropshipping product → WooCommerce draft listing.

Fetches product data from CJ, downloads images, uploads to WordPress media library, calculates margin, and creates a WooCommerce draft product — with variants if CJ has them.


Inputs

ArgumentRequiredDescription
---------
--product / -pCJ Dropshipping product ID (e.g. CJA123456789)
--priceYour sell price in AED
--category / -cCategory name or WooCommerce category ID
--dry-runPreview without creating anything in WooCommerce

Outputs

✅ Product created!
   WooCommerce ID : 4821
   Margin         : 42.3%
   Admin URL      : https://tech1mart.com/wp-admin/post.php?post=4821&action=edit
   Product URL    : https://tech1mart.com/?p=4821

Machine-readable JSON block at end of stdout (key: __RESULT__):

{
  "wooProductId": 4821,
  "margin": "42.3",
  "productUrl": "https://tech1mart.com/?p=4821",
  "adminUrl": "https://tech1mart.com/wp-admin/post.php?post=4821&action=edit",
  "title": "Product Name",
  "cjProductId": "CJA123456789",
  "sellPriceAED": 149.99,
  "cjPriceUSD": 22.5
}

Auth Config

  • CJ API: ~/cj-api.json — fields: apiKey, accessToken, tokenExpiry
  • WooCommerce: ~/woo-api.json — fields: url, consumerKey, consumerSecret

Tokens are refreshed automatically.


Pipeline

  1. Fetch product from CJ (/product/query + /product/variant/query)
  2. Download images → /tmp/product-images//
  3. Upload images → WooCommerce media library (/wp-json/wp/v2/media)
  4. Calculate margin: ((sellAED - cjUSD × 3.67) / sellAED × 100) — warns if < 30%
  5. Create WooCommerce draft product (/wp-json/wc/v3/products) with:
    • Title, description, images
    • regular_price (AED)
    • type: variable + variations if CJ has multiple variants
    • meta_data: _cj_product_id
  6. Output: product ID, margin %, admin + storefront URLs

Usage Examples

# Basic launch
node scripts/launch.js --product CJA123456789 --price 149.99

# With category
node scripts/launch.js --product CJA123456789 --price 149.99 --category Electronics

# Dry run (preview only, no WooCommerce writes)
node scripts/launch.js --product CJA123456789 --price 149.99 --dry-run

# Check CJ product data only
node scripts/cj-fetch.js CJA123456789

Dependencies

cd scripts
npm install axios form-data

Or from skill root:

npm install

Files

skill-dropshipping-product-launcher/
├── SKILL.md              ← this file
├── package.json
└── scripts/
    ├── launch.js         ← main entry point
    ├── cj-fetch.js       ← CJ API fetcher + token refresh
    └── woo-create.js     ← WooCommerce uploader + product creator

Margin Formula

const cjPriceAED = cjPriceUSD * 3.67;
const margin = ((sellPriceAED - cjPriceAED) / sellPriceAED * 100).toFixed(1);

⚠️ Warning shown if margin < 30%.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 04:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,126
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,240
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 294 📥 136,395