Skill Dropshipping Product Launcher
by @zero2ai-hub
Creates WooCommerce draft product listings with images, variants, and margin calculation from CJ Dropshipping products using product ID and sell price.
clawhub install skill-dropshipping-product-launcherπ About This Skill
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
| Argument | Required | Description |
|---|---|---|
| --product / -p | β
| CJ Dropshipping product ID (e.g. CJA123456789) |
| --price | β
| Your sell price in AED |
| --category / -c | β | Category name or WooCommerce category ID |
| --dry-run | β | Preview 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.json β fields: apiKey, accessToken, tokenExpiry~/woo-api.json β fields: url, consumerKey, consumerSecretTokens 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.99With category
node scripts/launch.js --product CJA123456789 --price 149.99 --category ElectronicsDry run (preview only, no WooCommerce writes)
node scripts/launch.js --product CJA123456789 --price 149.99 --dry-runCheck 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%.