Xpersona
X

xianyu-api-client-skill

CLAWHUB · Unverified

Secure Xianyu Guanjia API client with endpoint allowlisting, enforced confirmation for high-risk actions, dry-run mode, and unsafe methods for automation. Skill: xianyu-api-client-skill Owner: crab-xieyujin Summary: Secure Xianyu Guanjia API client with endpoint allowlisting, enforced confirmation for high-risk actions, dry-run mode, and unsafe methods for automation. Tags: latest:1.0.6 Version history: v1.0.6 | 2026-05-05T15:25:26.014Z | user No changes detected between versions 1.0.5 and 1.0.6. - No file or documentation changes found in this release. - Skill functio

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s178y8s32z59yxw709th139pk183nnf0:xianyu-api-client-skill
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-crab-xieyujin-xianyu-api-client-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

39,752 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: xianyu-api-client
description: Secure Xianyu Guanjia API client with endpoint allowlisting, enforced confirmation for high-risk actions, dry-run mode, and unsafe methods for automation.
version: 1.0.5
author: AI造物的大铁锤
metadata:
  openclaw:
    requires:
      env:
        - XIAN_YU_APP_KEY
        - XIAN_YU_APP_SECRET
      bins:
        - python
    primaryEnv: XIAN_YU_APP_KEY
    homepage: https://www.goofish.pro
    source: https://clawhub.com/skills/xianyu-api-client
---

# 闲鱼API客户端技能

## 技能概述

这是一个专为闲鱼管家开放平台设计的基础API客户端技能,为所有闲鱼相关操作提供安全、可靠的底层通信能力。本技能处理了所有复杂的认证、签名、错误处理等技术细节,让您能够专注于业务逻辑开发,而无需关心底层API实现。

## 核心价值

- **安全可靠**:严格按照闲鱼管家官方签名算法实现,端点白名单防止未授权调用
- **安全确认**:高风险操作(创建/删除商品、改价)自动暂停并等待用户确认
- **开箱即用**:预置所有常用API端点,支持商品管理、订单处理、用户查询等完整功能
- **智能容错**:内置完善的错误处理机制,自动识别并处理各种异常情况
- **Dry Run支持**:支持预览模式,先检查请求数据再实际执行

## 使用前准备

### 必需配置项

在使用本技能之前,您必须完成以下配置:

#### 1. 获取闲鱼管家开发者账号

- 访问 [闲鱼管家开放平台](https://www.goofish.pro)
- 注册并登录您的开发者账号
- 创建新的应用,获取以下关键信息:
  - **应用KEY (appKey)**:一串数字,如 `203413189371893`
  - **应用密钥 (appSecret)**:一串字母数字组合,如 `o9wl81dncmvby3ijpq7eur456zhgtaxs`

#### 2. 配置环境变量(推荐方式)

将获取到的密钥信息配置为环境变量,这是最安全的方式:

```bash
# Linux/Mac系统
export XIAN_YU_APP_KEY=您的应用KEY
export XIAN_YU_APP_SECRET=您的应用密钥

# Windows系统(命令提示符)
set XIAN_YU_APP_KEY=您的应用KEY
set XIAN_YU_APP_SECRET=您的应用密钥
```

#### 3. 或者程序化配置

如果您不想使用环境变量,也可以在代码中直接传入密钥:

```python
from xianyu_api_client_skill import XianYuAPIClient

client = XianYuAPIClient(
    app_key="您的应用KEY",
    app_secret="您的应用密钥"
)
```

### 权限要求

- 您的闲鱼管家应用必须具有相应的API调用权限
- 确保您的闲鱼店铺已经通过相关认证
- 某些高级功能可能需要额外的权限申请

## 支持的功能范围

### 商品管理

**创建商品完整参数说明(基于实际成功经验):**

```json
{
  "item_biz_type": 2,
  "sp_biz_type": 1, 
  "channel_cat_id": "e11455b218c06e7ae10cfa39bf43dc0f",
  "price": 29900,
  "original_price": 39900,
  "express_fee": 0,
  "stock": 1,
  "outer_id": "YOUR_UNIQUE_ID",
  "stuff_status": 100,
  "publish_shop": [{
    "user_name": "您的闲鱼号",           // 必需!如:xy137114666612
    "images": ["https://example.com/image.jpg"],  // 必需!至少1张图片URL
    "title": "商品标题",              // ≤60字符,不能包含表情符号
    "content": "详细商品描述",
    "service_support": "SDR",         // 固定值
    "province": 110000,              // 省代码
    "city": 110100,                  // 市代码  
    "district": 110101               // 区代码
  }]
}
```

**关键注意事项:**

- ✅ **user_name必需**:必须填写您的真实闲鱼号

- ✅ **images必需**:必须提供有效的图片URL数组

- ✅ **标题限制**:不超过60字符,不能包含表情符号(🎯❌)

- ✅ **价格单位**:以分为单位(29900 = ¥299)

- ✅ **成功响应**:code=0 表示成功,不是200

- 查询商品详情和列表

- 编辑商品信息

- 商品上下架操作

- 库存管理

- 商品删除

### 用户与店铺

- 查询闲鱼店铺信息
- 获取店铺统计数据

### 订单处理

- 查询订单列表和详情
- 订单物流发货
- 订单价格修改

### 辅助功能

- 查询商品类目和属性
- 查询快递公司信息
- 省市区数据标准化

## 安全确认机制

本技能采用强制确认机制,确保所有高风险操作都是安全且可控的:

### 默认安全模式(推荐)

所有写操作**默认需要用户确认**,无法跳过。以下操作会暂停并等待用户确认:

- 创建商品 (`/api/open/product/create`)
- 编辑商品 (`/api/open/product/edit`)
- 删除商品 (`/api/open/product/del`)
- 上架/下架商品 (`/api/open/product/onshelf`, `/api/open/product/offshelf`)
- 修改订单价格 (`/api/open/order/modifyprice`)
- 订单发货 (`/api/open/order/logistics`)

```python
# 默认安全模式:高风

_meta.json

{
  "ownerId": "kn73z6tf4pga2xgpb3j9gwh86583mbrg",
  "slug": "xianyu-api-client-skill",
  "version": "1.0.6",
  "publishedAt": 1777994726014
}

skill-card.md

## Description:

Secure Xianyu Guanjia API client with endpoint allowlisting, enforced confirmation for high-risk actions, dry-run mode, and unsafe methods for automation.

This skill is ready for commercial/non-commercial use.

## Publisher:

[crab-xieyujin](https://clawhub.ai/user/crab-xieyujin)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and external marketplace operators use this skill to let an agent configure and call the Xianyu Guanjia Open Platform for product, order, shop, category, logistics, and area-data workflows. The skill is intended for Xianyu shop automation where API credentials and write permissions are available.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill can perform write operations against Xianyu shop products and orders when valid credentials are provided.

Mitigation: Install only for Xianyu shop automation, use dedicated low-permission credentials, and review write requests before execution.

Risk: The artifact includes credential-like example values.

Mitigation: Do not use the bundled example values; rotate or revoke any real credentials that match the published examples.

Risk: Unsafe methods bypass the normal confirmation prompt for automation.

Mitigation: Use unsafe methods only in controlled automation after dry-run review and with minimum-necessary API permissions.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/crab-xieyujin/skills/xianyu-api-client-skill)
- [OpenClaw source listing](https://clawhub.com/skills/xianyu-api-client)
- [Xianyu Guanjia Open Platform](https://www.goofish.pro)
- [Xianyu Open API endpoint host](https://open.goofish.pro)

## Skill Output:

**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]

**Output Format:** [Markdown with Python and shell code snippets]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include API request payloads, dry-run previews, and credential configuration guidance.]

## Skill Version(s):

1.0.6 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to xianyu-api-client-skill and adjacent AI workflows.