---
name: qianniu-exporter
description: Use when exporting Excel files from 千牛/生意参谋 数据-自助分析-取数报表-取数模板 through the local qn-export CLI harness. Requires a HAR/cookie capture from an already logged-in browser session; IT profile must not perform GUI clicking itself.
version: 0.1.0
author: Hermes Agent
license: Internal project
metadata:
  hermes:
    tags: [qianniu, taobao, sycm, excel-export, cli-anything]
    related_skills: [cli-hub-meta-skill, official-api-doc-research]
---

# Qianniu Exporter

## Overview

This project-local skill documents the `qn-export` CLI harness for exporting Excel files from:

> 千牛 → 数据 → 自助分析 → 取数报表 → 取数模板

It follows the CLI-Anything pattern: command-line interface, JSON-safe output, explicit prerequisites, and non-destructive verification.

## Commands

```bash
cd /Users/bot1/Volumes/root_for_ai/AI工作区/千牛_数据导出_取数模板CLI_20260531_1331
python3 -m pip install -e .
qn-export --help
qn-export doctor
qn-export operator-brief --out docs/visual_operator_brief.md
qn-export scan-har samples/qianniu_templates.har --out deliverables/qianniu_manifest.json
qn-export fetch-list deliverables/qianniu_manifest.json --cookie-file secrets/cookie.json --out deliverables/template_list.json
qn-export build-downloads deliverables/template_list.json --download-example-manifest deliverables/qianniu_manifest.json --out deliverables/download_manifest.json
qn-export export-all deliverables/download_manifest.json --cookie-file secrets/cookie.json --out-dir deliverables/excels --dry-run
qn-export export-all deliverables/download_manifest.json --cookie-file secrets/cookie.json --out-dir deliverables/excels --limit 1 --poll-attempts 18 --poll-seconds 3
qn-export collect-downloads --source-dir "/Users/bot1/Downloads/My WangWang" --out-dir deliverables/operator_downloads --since-minutes 120
```

## Safety

- Do not print Cookie/Token in chat.
- Do not modify/delete/create report templates.
- IT profile must not perform GUI/browser clicking; use `visual-operator` for HAR capture.
- Verify with `--dry-run` and `--limit 1` before full export.
- Preferred full CLI path after one controlled capture: `scan-har` → `fetch-list` → `build-downloads` → `export-all`.
- For Sycm async exports, `export-all` submits `download.json`, polls `queryDownloadUrl.json`, then downloads the returned OSS signed Excel URL.
