Skip to content
Back to skills

pan-transfer-bot

ASecurity

Automated tool to parse Twitter/X posts, extract Quark and Baidu Pan cloud storage links, automatically transfer files into personal cloud storage with date-based archiving, generate new dedicated share links, and create engaging social media copy locally without external AI APIs.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 13, 2026
ai-agentsgofastapiapi

Works with

  • api

Security analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned October 13, 2026

npx -y skills add hen9xin/pan-transfer-bot --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of pan-transfer-bot?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for pan-transfer-bot
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hen9xin-pan-transfer-bot/badge)](https://www.skillsdirectory.com/skills/hen9xin-pan-transfer-bot)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pan-transfer-bot
description: Automated tool to parse Twitter/X posts, extract Quark and Baidu Pan cloud storage links, automatically transfer files into personal cloud storage with date-based archiving, generate new dedicated share links, and create engaging social media copy locally without external AI APIs.
---

# Pan-Transfer-Bot Agent Skill

## 1. Overview
The `pan-transfer-bot` skill provides autonomous AI agents with the capability to process social media posts containing cloud drive resource links. It automatically:
- Resolves and parses Quark Pan (`pan.quark.cn`) and Baidu Pan (`pan.baidu.com`) links, including redirected shortlinks.
- Extracts passcodes/access codes from arbitrary text strings or query parameters.
- Transfers the shared files to the user's authenticated cloud drive under a structured date hierarchy (`YYYY/MM/DD`).
- Generates a fresh, permanent, public share link belonging to the user.
- Employs a local deterministic copywriting engine to rewrite marketing posts with formatting, categories, and emojis (zero third-party AI tokens required).

---

## 2. Service Endpoints

The tool runs a FastAPI server at `http://localhost:8000` (or configured `HOST:PORT`).

### Endpoint 1: Link & Text Parser
- **Method**: `POST /api/parse`
- **Request Body**:
  ```json
  {
    "text": "Check out this course: https://pan.quark.cn/s/abcdef123456 code: 8888"
  }
  ```
- **Response**:
  ```json
  {
    "platform": "quark",
    "links": ["https://pan.quark.cn/s/abcdef123456"],
    "share_ids": ["abcdef123456"],
    "passcode": "8888",
    "clean_text": "Check out this course:"
  }
  ```

---

### Endpoint 2: Full Transfer & Copywriting Pipeline
- **Method**: `POST /api/generate`
- **Request Body**:
  ```json
  {
    "text": "Original tweet content with link",
    "link": "https://pan.quark.cn/s/abcdef123456",
    "passcode": "8888",
    "custom_title": "Optional Custom Title",
    "quark_cookie": "Optional Override Cookie",
    "baidu_cookie": "Optional Override Cookie"
  }
  ```
- **Response**:
  ```json
  {
    "success": true,
    "platform": "quark",
    "original_link": "https://pan.quark.cn/s/abcdef123456",
    "new_link": "https://pan.quark.cn/s/your_new_share_link",
    "passcode": "8888",
    "title": "Course Bundle",
    "file_count": 5,
    "files": [...],
    "rewritten_text": "Engaging rewritten post...",
    "final_tweet": "Complete tweet ready to publish with new link",
    "transfer_msg": "转存成功"
  }
  ```

---

### Endpoint 3: Cookie Settings Management
- **GET /api/settings**: Returns boolean indicators for configured credentials (`has_quark`, `has_baidu`).
- **POST /api/settings**: Saves cookies to `settings.json` and updates `.env`.
- **POST /api/settings/auto-detect**: Scans local Chrome/Edge browser storage and imports authenticated cookies.

---

## 3. Autonomous Agent Workflow Guide

When an agent needs to automate content replication and cloud drive transfer:
1. **Health Check**: Call `GET http://localhost:8000/` or `GET http://localhost:8000/api/settings` to verify server availability and credential readiness.
2. **Auto-Detect Credentials (if needed)**: If cookies are missing, trigger `POST /api/settings/auto-detect`.
3. **Submit Raw Content**: Send the raw tweet string to `POST /api/generate`.
4. **Retrieve Results**: Extract `final_tweet` and `new_link` from the JSON response to publish or display to the end user.

Files in this skill

  • .env.example1.3 KB
  • CONTRIBUTING.md3 KB
  • Dockerfile1007 B
  • SECURITY.md2.2 KB
  • SKILL.md3.3 KB
  • app.py16.7 KB
  • config.py1.3 KB
  • docker-compose.yml600 B
  • requirements.txt84 B
  • services/__init__.py30 B
  • services/ai_rewrite.py3.8 KB
  • services/baidu.py30.4 KB
  • services/cookie_extractor.py7.3 KB
  • services/link_parser.py7.9 KB
  • services/quark.py24.1 KB
  • services/text_generator.py12.9 KB
  • static/index.html19.1 KB
  • static/script.js23.8 KB
  • static/style.css27.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.