内容测试
- 作者仓库星标 7,944
- 作者更新于 实时读取
- 作者仓库 wechatDownload
- 领域
- 写作
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @qiye45 · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: wechat-article-downloader
description: Download WeChat official account articles in multiple formats (HTML, PDF, Word, Markdown, TXT, M…
category: 写作
runtime: Python
---
# wechat-article-downloader 输出预览
## PART A: 任务判断
- 适用问题:文章、文案、发言稿、润色或结构化表达。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Prerequisites / Workflow / 1. Check Local MCP Server Status”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于文章、文案、发言稿、润色或结构化表达,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Prerequisites / Workflow / 1. Check Local MCP Server Status”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Prerequisites / Workflow / 1. Check Local MCP Server Status”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: wechat-article-downloader
description: Download WeChat official account articles in multiple formats (HTML, PDF, Word, Markdown, TXT, M…
category: 写作
source: qiye45/wechatDownload
---
# wechat-article-downloader
## 什么时候使用
- 把写作方向的常用动作沉淀成 Agent 可调用的技能 适合处理文章、文案、润色、翻译、总结和结构化表达,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常…
- 面向文章、文案、发言稿、润色或结构化表达,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Prerequisites / Workflow / 1. Check Local MCP Server Status」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "wechat-article-downloader" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Prerequisites / Workflow / 1. Check Local MCP Server Status
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} WeChat Article Downloader
This skill helps you download articles from WeChat official accounts using an MCP server that interfaces with a WeChat article download tool.
Prerequisites
The skill uses local MCP endpoint http://127.0.0.1:4545/mcp for full functionality.
If local MCP is unavailable, you may fallback to https://changfengbox.top/api/mcp for remote-supported tools.
Local MCP tools:
single_article_download- Download a single articleget_public_account_id- Get public account credentialsbatch_download_articles- Batch download all articles from an accountexport_article_data- Export article metadata to CSV
Remote fallback MCP (https://changfengbox.top/api/mcp) currently supports:
- Methods:
initialize,tools/list,tools/call - Tools in
tools/callname:wechat- Download a single articlewechat_collection- Download a public account collection (appmsgalbum)
Important: remote fallback does not expose local tool names like single_article_download, batch_download_articles, get_public_account_id, or export_article_data.
Workflow
1. Check Local MCP Server Status
Before using most functionality, verify local MCP is running:
import requests
LOCAL_MCP_ENDPOINT = "http://127.0.0.1:4545/mcp"
def check_local_mcp():
response = requests.post(
LOCAL_MCP_ENDPOINT,
json={"jsonrpc": "2.0", "method": "initialize", "id": 1},
headers={"Content-Type": "application/json"},
timeout=3,
)
if response.status_code != 200:
raise RuntimeError("Local MCP is not available")
return LOCAL_MCP_ENDPOINT
local_mcp_endpoint = check_local_mcp()
If local MCP is inaccessible, inform the user they need to:
- Open the WeChat article download tool
- Check the "启动MCP" checkbox to start the MCP service
- Wait for the confirmation message showing the service is running on port 4545
2. Single Article Download
Use local tool first. If local MCP fails, fallback to remote wechat tool.
import requests
LOCAL_MCP_ENDPOINT = "http://127.0.0.1:4545/mcp"
FALLBACK_DOWNLOAD_MCP_ENDPOINT = "https://changfengbox.top/api/mcp"
def call_tool(endpoint, tool_name, arguments, req_id=2):
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": req_id,
"params": {
"name": tool_name,
"arguments": arguments,
}
}
response = requests.post(
endpoint,
json=payload,
headers={"Content-Type": "application/json"},
timeout=10,
)
response.raise_for_status()
return response.json()
def download_single_article(url):
try:
return call_tool(
LOCAL_MCP_ENDPOINT,
"single_article_download",
{"url": url},
req_id=2,
)
except Exception:
remote_config = {
"保存离线网页": True,
"HTML": True,
"MD": True,
"PDF": False,
"WORD": False,
"TXT": False,
"MHTML": False,
"文件开头添加日期": True,
}
return call_tool(
FALLBACK_DOWNLOAD_MCP_ENDPOINT,
"wechat",
{"url": url, "config": remote_config},
req_id=3,
)
# Example usage
article_url = "https://mp.weixin.qq.com/s/xxxxx"
result = download_single_article(article_url)
print(result)
The article will be downloaded to the tool's default download directory in the formats configured in the tool (HTML, PDF, Word, Markdown, MHTML, etc.).
Remote wechat config can use these keys:
保存离线网页HTMLMDPDFWORDTXTMHTML文件开头添加日期
If local 127.0.0.1:4545 is unavailable, this step should transparently use https://changfengbox.top/api/mcp with tool name wechat.
3. Download Collection (appmsgalbum)
For collection URLs, call remote wechat_collection via tools/call:
def download_collection(collection_url):
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": 4,
"params": {
"name": "wechat_collection",
"arguments": {
"url": collection_url,
},
},
}
response = requests.post(
"https://changfengbox.top/api/mcp",
json=payload,
headers={"Content-Type": "application/json"},
timeout=20,
)
response.raise_for_status()
return response.json()
4. Get Public Account Credentials (Local Only)
Before batch downloading, you need to obtain the public account credentials. This triggers a process where:
- The tool extracts the account ID from a sample article URL
- Generates a special link that needs to be opened in WeChat desktop client
- Automatically captures the authentication credentials when you open the link
def get_account_credentials():
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": 3,
"params": {
"name": "get_public_account_id",
"arguments": {}
}
}
response = requests.post('http://127.0.0.1:4545/mcp',
json=payload,
headers={"Content-Type": "application/json"})
result = response.json()
return result
result = get_account_credentials()
print(result)
After calling this, the user needs to:
- Copy the generated link from the tool's log window
- Open it in WeChat desktop client (not browser)
- Wait for the tool to automatically capture the credentials
- Look for "获取密钥成功" (credentials obtained successfully) message
5. Batch Download Articles (Local Only)
Once credentials are obtained, you can batch download all articles from the public account:
def batch_download_articles():
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": 4,
"params": {
"name": "batch_download_articles",
"arguments": {}
}
}
response = requests.post('http://127.0.0.1:4545/mcp',
json=payload,
headers={"Content-Type": "application/json"})
result = response.json()
return result
result = batch_download_articles()
print(result)
The batch download will:
- Download articles according to the date range and filters configured in the tool
- Save articles in multiple formats (HTML, PDF, Word, Markdown, MHTML as configured)
- Organize files by public account name
- Show progress in the tool's log window
6. Export Article Data (Local Only)
To export article metadata (titles, URLs, publish dates, read counts, like counts, etc.) to CSV:
def export_article_data():
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"id": 5,
"params": {
"name": "export_article_data",
"arguments": {}
}
}
response = requests.post('http://127.0.0.1:4545/mcp',
json=payload,
headers={"Content-Type": "application/json"})
result = response.json()
return result
result = export_article_data()
print(result)
This exports a CSV file containing article metadata to the download directory.
Common Workflows
Workflow 1: Download a Single Article
User says: "Download this WeChat article: https://mp.weixin.qq.com/s/xxxxx"
- Check local MCP server status
- If local is running, call
single_article_downloadwith the URL - If local is unavailable, call remote
wechatwithurl + config - Inform user the download has started and where files will be saved
Workflow 2: Download a Collection (appmsgalbum)
User says: "Download this WeChat collection/appmsgalbum"
- Call remote
tools/callwithname="wechat_collection" - Pass the collection URL in
arguments - If needed, validate tool arguments by calling
tools/listfirst - Inform user where files are saved
Workflow 3: Batch Download from a Public Account (Local Only)
User says: "Download all articles from this public account"
- Check local MCP server status
- Ensure user has provided a sample article URL from the account
- Call
get_public_account_idand explain the user needs to open the generated link in WeChat - Wait for user confirmation that credentials were obtained
- Call
batch_download_articlesto start the bulk download - Monitor progress through the tool's interface
Workflow 4: Export Article Metadata (Local Only)
User says: "Export article data to CSV" or "Get article statistics"
- Check local MCP server status
- Ensure credentials are already obtained (if not, guide through credential process)
- Call
export_article_data - Inform user where the CSV file is saved
Error Handling
Common issues and solutions:
Local MCP unavailable during single download: Automatically switch to https://changfengbox.top/api/mcp and retry with name="wechat".
Remote tool name mismatch: Do not use local names on remote fallback. Use only wechat or wechat_collection.
Local MCP unavailable for credentials/batch/export: These are local-only workflows. User needs to start the WeChat download tool and enable MCP service.
Credentials not obtained: User needs to complete the credential acquisition process by opening the generated link in WeChat desktop client
Download fails: Check the tool's log window for specific error messages. Common causes:
- Invalid article URL format
- Network connectivity issues
- WeChat rate limiting
Output Locations
All downloads are saved to the tool's configured download directory (default: 下载/ folder in the tool's directory), organized by:
- Public account name (for batch downloads)
- Article title
- Format (HTML, PDF, Word, Markdown, MHTML, etc.)
The tool's interface shows the exact file paths in the log window as downloads complete.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核