← Back to Skills Marketplace
zzy05651666

Apifox Exporter

by zzy05651666 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
229
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install apifox-exporter
Description
导入 Apifox 导出的 OpenAPI JSON,递归展开引用,按模块分组整理并输出清晰的接口文档,支持多项目管理。
README (SKILL.md)

Apifox Exporter Skill

版本: 2.0.0
作者: 果果 @ 婉秋
描述: 全自动从 Apifox 导出接口数据并整理成标准格式的文档


✨ v2.0.0 新特性

现在支持全自动浏览器自动化!

  • 全自动模式:一键完成所有操作(登录→选择团队→选择项目→导出→整理)
  • 登录状态保存:首次登录后,后续无需重复登录
  • 多团队支持:自动查找项目所在团队
  • 灵活的口令:支持多种指定团队和项目的方式
  • 半自动模式:保留原有手动导出方式作为备用

🚀 使用方式

方式 1:全自动模式(推荐)

基础口令:

更新接口文档
导出接口
刷新 Apifox 接口

指定项目(团队用默认):

更新接口文档,用商城项目
更新接口文档 - 商城

指定团队和项目:

更新接口文档,团队是xxxx,项目是xxx
更新接口文档 - 团队名 - 项目名

方式 2:半自动模式(备用)

半自动更新接口文档

需要手动从apifox点击导出按钮导出借楼json文件后存到 ~/.openclaw/workspace/script/apifox/source.json,其他自动完成。


📋 配置默认值

修改 script/auto-export-playwright.js 开头的默认配置:

const DEFAULT_TEAM_NAME = '团队名';
const DEFAULT_PROJECT_NAME = '项目名';

📁 文件结构

apifox-exporter/
├── SKILL.md                    # Skill 描述
├── README.md                   # 详细文档
├── skill.yaml                  # Skill 配置
├── package.json                # 依赖配置
├── script/
│   ├── auto-export-playwright.js  # 全自动脚本(主入口)
│   ├── auto-export.js             # 半自动脚本(备用)
│   └── export.js                  # 核心处理脚本
└── .gitignore

运行时生成:

  • chrome-profile/ - 浏览器登录状态(首次运行后登录创建,一次登录后面就自动保存登录状态)
  • source.json - 下载的原始数据
  • Apifox 接口导出.txt - 最终输出(桌面)

🔧 安装方法

方法 1:从 ClawHub 安装

openclaw skill install apifox-exporter

方法 2:手动安装

  1. 复制 skill 文件夹到 ~/.openclaw/workspace/skills/apifox-exporter/
  2. 安装依赖:
cd ~/.openclaw/workspace/skills/apifox-exporter
npm install
npx playwright install chromium

💡 首次使用

  1. 运行口令:说"更新接口文档"
  2. 扫码登录:浏览器会自动打开,扫码登录 Apifox
  3. 自动保存:登录状态会保存,下次无需重新登录
  4. 自动导出:脚本会自动完成后续所有操作

🎯 输出位置

文件 位置
接口文档 桌面\Apifox 接口导出.txt
原始数据 ~/.openclaw/workspace/script/apifox/source.json

⚠️ 注意事项

  1. 首次使用需要登录:登录状态会保存,后续无需重复登录
  2. 保持网络畅通:需要访问 Apifox 云端
  3. 下载目录可访问:下载的文件会保存到脚本目录
  4. 敏感数据安全:导出的文档包含示例数据,注意不要包含真实密码

🐛 常见问题

Q: 登录状态失效了怎么办?

A: 重新运行脚本,会提示你重新登录,登录后会自动保存新状态。

Q: 找不到项目怎么办?

A: 脚本会自动尝试所有团队,如果还是找不到,可以手动在浏览器中进入项目。

Q: 下载的文件没找到?

A: 检查下载事件监听是否正常,或查看 Chrome 默认下载路径。

Q: 想用回手动导出?

A: 说"半自动更新接口文档"即可。


📝 更新日志

v2.0.0 (2026-03-19)

  • ✨ 新增 Playwright 全自动浏览器自动化
  • ✨ 支持多团队自动查找
  • ✨ 登录状态持久化保存
  • ✨ 灵活的命令行参数支持
  • ✨ 多种自然语言口令格式

v1.0.1 (2026-03-18)

  • 🔧 修复硬编码路径问题
  • 📝 明确说明需要手动导出

v1.0.0 (2026-03-18)

  • ✨ 初始版本发布

Made with ❤️ by 果果

Usage Guidance
This skill appears to do what it says: it automates the Apifox web UI (via Playwright), saves a persistent browser profile, captures the exported JSON, and formats it into a text doc on your Desktop. Before installing: 1) Be aware the skill will create a chrome-profile directory under ~/.openclaw/workspace/script/apifox which will contain cookies/session tokens—delete it if you want to revoke saved logins. 2) The skill will write files to your Downloads/workspace and Desktop; verify these locations are acceptable. 3) Installation requires npm and Playwright (which downloads Chromium binaries from official sources). 4) Consider running the scripts manually the first time (npm install; npx playwright install chromium; node script/auto-export-playwright.js) to observe behavior, and run in a controlled account if you are concerned about stored credentials. 5) Note a minor portability bug: the Playwright script uses process.env.USERPROFILE (Windows) without a HOME fallback—verify paths are correct on your OS. If you need lower risk, use the '半自动' (semi-automatic) flow that requires manually exporting the JSON and avoids saved browser profile.
Capability Analysis
Type: OpenClaw Skill Name: apifox-exporter Version: 2.0.0 The skill bundle is designed to automate the export of API documentation from Apifox using Playwright for browser automation. It includes scripts to handle automated login, navigation, and data processing, ultimately saving a formatted text file to the user's desktop. While the scripts perform broad actions such as managing a persistent browser profile and scanning the local Downloads folder (in the semi-automatic fallback script `auto-export.js`), these behaviors are transparently documented and directly support the stated functionality. No evidence of data exfiltration, unauthorized network communication, or malicious intent was found.
Capability Assessment
Purpose & Capability
The skill's name/description (Apifox export) match the actual code and runtime requirements: it uses Playwright to automate a browser session, listens for downloads, and transforms exported OpenAPI JSON into a formatted text document. The dependency on Playwright and the included scripts are expected and proportionate.
Instruction Scope
SKILL.md and skill.yaml instruct the agent to launch the provided scripts, install Node/Playwright, open the Apifox site, and either perform full browser automation or accept a manually exported JSON. The instructions reference only the Apifox site and local filesystem paths required for operation; they do not attempt to read unrelated system files or reach unexpected external endpoints.
Install Mechanism
There is no opaque remote install URL; installation uses npm and Playwright (npx playwright install chromium), which will download official browser artifacts. No custom downloads from unknown hosts or URL shorteners are present.
Credentials
The skill requests no secrets or external credentials. However it persistently stores a browser profile (cookies/session data) under ~/.openclaw/workspace/script/apifox/chrome-profile and writes output to the user's Desktop—these artifacts can contain authentication tokens and exported API data, so the persistence is functionally necessary but sensitive.
Persistence & Privilege
The skill will create directories and files in the user's home (workspace/script/apifox, chrome-profile, and Desktop output). always:false is set (normal). The persistent browser profile enables saved login state (convenient) but increases the sensitivity of the files it creates; the skill does not attempt to modify other skills or system-wide agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install apifox-exporter
  3. After installation, invoke the skill by name or use /apifox-exporter
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
v2.0.0 introduces full automation via browser automation. - Added Playwright-based "全自动" export scripts: auto-export-playwright.js and auto-export.js - Now supports fully automatic Apifox login, selection, export, and document generation - Login status is persistently saved; no need to re-login each time - Retains half-automatic/manual export as a fallback option - Flexible project/team switching via natural language or parameters
v1.0.1
apifox-exporter 1.0.1 - 修复硬编码路径问题,提升跨平台兼容性 - 明确说明需要手动从 Apifox 导出 OpenAPI JSON 文件 - 增加敏感数据警告与安全提示
v1.0.0
apifox-exporter v1.0.0 - 初始版本发布 - 支持多项目管理与切换 - 递归展开所有 schema/$ref 引用 - 按模块分组整理接口,自动生成目录索引 - 自动整理、导出标准美观的接口文档到桌面 全程你只需要让openclaw学习skill——>打开你的apifox并登录——>告诉你的openclaw选择apifox项目——>口令“导出接口”干活——>桌面自动生成整理好的文档——>apifox更新接口后用口令“更新接口文档”更新
Metadata
Slug apifox-exporter
Version 2.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Apifox Exporter?

导入 Apifox 导出的 OpenAPI JSON,递归展开引用,按模块分组整理并输出清晰的接口文档,支持多项目管理。 It is an AI Agent Skill for Claude Code / OpenClaw, with 229 downloads so far.

How do I install Apifox Exporter?

Run "/install apifox-exporter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Apifox Exporter free?

Yes, Apifox Exporter is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Apifox Exporter support?

Apifox Exporter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Apifox Exporter?

It is built and maintained by zzy05651666 (@zzy05651666); the current version is v2.0.0.

💬 Comments