Install
openclaw skills install dealpilotCross-Platform Shopping Decision Agent / 全网购物决策官. Compares prices, quality, and risk across 淘宝/拼多多/京东/一号店/唯品会 and recommends the best platform for a given product and context.
openclaw skills install dealpilot你是全网购物决策官。
你的任务不是罗列商品参数,而是在用户给出购物需求后,帮他在多个平台中找到最优解, 并给出可执行的购买建议。
DealPilot 是一个跨平台购物比价决策引擎,覆盖:淘宝、拼多多、京东、一号店、唯品会。
核心价值:
用户可能会说:
interface ShoppingRequest {
// 商品信息
product?: string; // 商品名称/关键词
productUrl?: string; // 商品链接(可多平台)
category?: string; // 品类
// 用户偏好
budget?: PriceRange; // 预算范围
priorities?: string[]; // 优先级:["价格", "品质", "速度", "售后"]
quantity?: number; // 购买数量
// 场景
scenario?: "personal" | "gift" | "resale"; // 自用/送礼/转卖
urgency?: "low" | "medium" | "high"; // 紧急程度
// 平台范围(默认全部)
platforms?: Platform[];
// 约束
mustHave?: string[]; // 必须有的特性/服务
mustAvoid?: string[]; // 必须避免的
}
type Platform = "taobao" | "pdd" | "jd" | "yhd" | "vip";
type PriceRange = { min?: number; max?: number; };
interface DecisionReport {
// 推荐决策
recommendedPlatform: Platform;
recommendedUrl?: string;
recommendedPrice?: number;
// 决策理由
reasons: string[]; // 为什么要选这个平台
// 风险提示
risks: RiskItem[]; // 当前方案的风险点
// 替代方案
alternatives: AltPlatform[]; // 其他可选平台,排序
// 时机建议
timingAdvice: TimingAdvice;
// 对比摘要(表格)
comparison: PlatformSummary[];
// 最终结论(可执行)
conclusion: string;
}
interface RiskItem {
level: "low" | "medium" | "high";
description: string;
mitigation?: string; // 如何降低风险
}
interface AltPlatform {
platform: Platform;
score: number; // 0-100
price?: number;
keyReason: string;
}
interface TimingAdvice {
verdict: "buy_now" | "wait" | "compare_first";
reason: string;
waitDays?: number; // 建议等多少天
betterPeriod?: string; // "618", "双十一" 等
}
interface PlatformSummary {
platform: Platform;
price?: number;
quality: "low" | "medium" | "high";
shipping: "slow" | "medium" | "fast";
afterSales: "weak" | "medium" | "strong";
authenticity: "risky" | "medium" | "safe";
score: number;
}
用户需求输入
↓
[需求解析] → 识别商品、预算、偏好、场景
↓
[平台搜索] → 各平台并行搜索(stub 阶段返回 mock 数据)
↓
[价格抓取] → 提取各平台到手价(含优惠/拼团等)
↓
[质量评估] → 店铺信誉、评论、售后标识
↓
[风险评分] → 假货/售后/物流风险量化
↓
[决策推荐] → 综合评分 + 时机判断
↓
[报告生成] → DecisionReport 输出
每个平台适配器需实现以下接口:
interface PlatformAdapter {
platform: Platform;
// 搜索商品
search(query: string, options?: SearchOptions): Promise<SearchResult[]>;
// 获取商品详情
getProductDetail(url: string): Promise<ProductInfo>;
// 计算最终到手价(含优惠/拼团/百亿补贴等)
calcFinalPrice(product: ProductInfo): Promise<FinalPrice>;
// 评估店铺/卖家风险
assessSeller(url: string): Promise<SellerRisk>;
// 平台特性判断
getPlatformTraits(): PlatformTraits;
}
interface SearchOptions {
category?: string;
minPrice?: number;
maxPrice?: number;
sortBy?: "price" | "sales" | "rating";
}
interface FinalPrice {
rawPrice: number;
finalPrice: number;
discountDesc: string[]; // ["百亿补贴-100", "拼团-30"]
isSubsidized: boolean; // 是否官方补贴
}
interface PlatformTraits {
strength: string[]; // ["价格最低", "自营可信"]
weakness: string[]; // ["物流较慢", "退换麻烦"]
bestFor: string[]; // ["标准品", "电子产品"]
worstFor: string[]; // ["生鲜", "奢侈品"]
}
| 维度 | 淘宝 | 拼多多 | 京东 | 一号店 | 唯品会 |
|---|---|---|---|---|---|
| 价格 | 中 | 最低 | 高 | 中低 | 中 |
| 品质 | 中 | 偏低 | 高 | 中 | 中 |
| 物流 | 中 | 慢 | 最快 | 快 | 中 |
| 售后 | 中 | 弱 | 强 | 中 | 中 |
| 正品 | 中 | 风险高 | 最安全 | 中 | 中 |
下一步由平台组接入真实适配器。
taobao - 淘宝平台适配pdd-shopping - 拼多多平台适配jingdong - 京东平台适配shopping-advisor - 单商品决策逻辑MVP 骨架版本 - 平台适配器为 stub 实现,返回 mock 数据。
scripts/test-stub.js)cd /Users/jianghaidong/.openclaw/skills/dealpilot
node scripts/test-stub.js
// 示例:调用 dealpilot 进行决策
const { normalizeRequest } = require('./scripts/normalize.js');
const { decide } = require('./scripts/decide.js');
const { formatReport } = require('./scripts/analyze.js');
async function runDealPilot(product, budget) {
const request = normalizeRequest({ product, budget });
const report = await decide(request);
return formatReport(report);
}
// 示例调用
runDealPilot("蓝牙耳机", { max: 200 }).then(console.log);
| 平台 | 适配器 | 状态 | 备注 |
|---|---|---|---|
| 淘宝 | TaobaoAdapter | stub | 待接入 taobao skill |
| 拼多多 | PddAdapter | stub | 待接入 pdd-shopping skill |
| 京东 | JdAdapter | stub | 待接入 jingdong skill |
| 一号店 | YhdAdapter | stub | 待接入 yhd skill |
| 唯品会 | VipAdapter | stub | 待接入 vip skill |
dealpilot/
├── SKILL.md # 技能定义
├── clawhub.json # 技能元数据
├── package.json # 依赖配置
├── README.md # 项目说明
├── engine/ # 决策引擎
│ ├── router.ts # 路由层(决策入口)
│ └── types.ts # 类型定义
├── platforms/ # 平台适配器
│ ├── base.ts # 适配器基类
│ ├── taobao.ts # 淘宝适配器
│ ├── pdd.ts # 拼多多适配器
│ ├── jd.ts # 京东适配器
│ ├── yhd.ts # 一号店适配器
│ └── vip.ts # 唯品会适配器
└── scripts/ # 工具脚本
├── normalize.js # 需求解析
├── decide.js # 决策调用
├── analyze.js # 报告格式化
└── test-stub.js # 自测脚本
taobao - 淘宝平台搜索与详情pdd-shopping - 拼多多百亿补贴/拼团策略jingdong - 京东自营/物流分析shopping-advisor - 单商品深度分析