by Usagi-org
基于 Playwright 和AI实现的闲鱼多任务实时/定时监控与智能分析系统,配备了功能完善的后台管理UI。帮助用户从闲鱼海量商品中,找到心仪产品。
# Add to your Claude Code skills
git clone https://github.com/Usagi-org/ai-goofish-monitorGuides for using ai agents skills like ai-goofish-monitor.
Last scanned: 4/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-04-17T06:06:58.009Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": false
}ai-goofish-monitor is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Usagi-org. 基于 Playwright 和AI实现的闲鱼多任务实时/定时监控与智能分析系统,配备了功能完善的后台管理UI。帮助用户从闲鱼海量商品中,找到心仪产品。. It has 14,050 GitHub stars.
Yes. ai-goofish-monitor passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/Usagi-org/ai-goofish-monitor" and add it to your Claude Code skills directory (see the Installation section above).
ai-goofish-monitor is primarily written in Python. It is open-source under Usagi-org on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ai-goofish-monitor against similar tools.
No comments yet. Be the first to share your thoughts!
[中文] | English
基于 Playwright 和 AI 的闲鱼多任务实时监控,提供完整的 Web 管理界面。

git clone https://github.com/Usagi-org/ai-goofish-monitor && cd ai-goofish-monitor
cp .env.example .env
vim .env # 填写相关配置项
docker compose up -d
docker compose logs -f app
docker compose down
如果镜像无法访问或下载速度慢,可尝试使用加速:
docker pull ghcr.nju.edu.cn/usagi-org/ai-goofish:latest
docker tag ghcr.nju.edu.cn/usagi-org/ai-goofish:latest ghcr.io/usagi-org/ai-goofish:latest
docker compose up -d
http://127.0.0.1:8000ghcr.io/usagi-org/ai-goofish:latestdocker compose pull && docker compose up -d.env 中的 SERVER_PORT,请同步更新 docker-compose.yaml 里的端口映射。docker-compose.yaml 默认会把 SQLite 主库挂载到 ./data:/app/data,数据库文件默认为 data/app.sqlite3data/ SQLite 主存储(任务、结果、价格历史)state/ 登录状态 cookie 文件prompts/ 任务提示词logs/ 运行日志images/ 商品图片与任务临时图片目录config.json、jsonl/、price_history/ 首次升级到 SQLite 时用于兼容导入的旧数据源data/app.sqlite3APP_DATABASE_FILE 自定义数据库路径;Docker 默认设置为 /app/data/app.sqlite3config.json、jsonl/、price_history/ 导入一次历史数据state/、prompts/、logs/、images/ 仍然是文件系统目录,不在 SQLite 中images/task_images_<task_name>/,任务结束后默认会清理data/app.sqlite3 中数据正确后,可视部署方式决定是否继续保留旧的 config.json、jsonl/、price_history/ 挂载| 变量 | 说明 | 必填 |
|---|---|---|
OPENAI_API_KEY |
AI 模型 API Key | 是 |
OPENAI_BASE_URL |
OpenAI 兼容接口地址 | 是 |
OPENAI_MODEL_NAME |
支持图片输入的模型名称 | 是 |
WEB_USERNAME / WEB_PASSWORD |
Web UI 登录账号密码,默认 admin/admin123 |
否 |
其余配置见下方“配置说明”。
http://127.0.0.1:8000 并登录。state/ 目录,例如 state/acc_1.json。AI判断:填写“详细需求”,提交后会弹出独立进度弹窗,后台异步生成分析标准。关键词判断:填写关键词规则,任务会直接创建,不经过 AI 生成流程。区域筛选:已改为省 / 市 / 区三级选择器,数据基于闲鱼页面抓取快照内置。jsonl 文件。Node v20.18.3 可完成前端构建)python3 -m pip install playwright && python3 -m playwright install chromiumstart.sh 会先检查浏览器是否存在)git clone https://github.com/Usagi-org/ai-goofish-monitor
cd ai-goofish-monitor
cp .env.example .env
chmod +x start.sh
./start.sh
start.sh 会先检查 Playwright CLI 和浏览器前置条件;在前置条件满足后自动安装项目依赖、构建前端、复制构建产物并启动后端。
# 后端
python -m src.app
# 或
uvicorn src.app:app --host 0.0.0.0 --port 8000 --reload
# 前端
cd web-ui
npm install
npm run dev
config.json/jsonl/price_historyspider_v2.py 默认从 SQLite 读取任务;只有显式传入 --config <path> 时才会走 JSON 配置兼容模式data/app.sqlite3/api、/auth、/ws 代理到 http://127.0.0.1:8000。npm run build 先生成 web-ui/dist/,start.sh 再复制到仓库根目录 dist/。dist/index.html 和 dist/assets/。./start.sh 默认输出访问地址 http://localhost:8000 和 API 文档 http://localhost:8000/docs。PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest
cd web-ui && npm run build
POST /api/tasks/generate
decision_mode=ai:返回 202 和 job,需要继续轮询进度。decision_mode=keyword:直接返回已创建任务。GET /api/tasks/generate-jobs/{job_id}:查询 AI 任务生成进度。POST /auth/status:校验 Web UI 登录凭据。OPENAI_API_KEY / OPENAI_BASE_URL / OPENAI_MODEL_NAME:AI 模型接入必填项。PROXY_URL:为 AI 请求单独指定 HTTP/SOCKS5 代理。RUN_HEADLESS:是否以无头模式运行爬虫;Docker 中应保持 true。SERVER_PORT:后端监听端口,默认 8000。LOGIN_IS_EDGE:本地环境可切换为 Edge 内核;Docker 镜像未内置 Edge,容器内会固定使用 Chromium。PCURL_TO_MOBILE:是否将 PC 商品链接转换为移动端链接。NTFY_TOPIC_URLGOTIFY_URL / GOTIFY_TOKENBARK_URLWX_BOT_URLTELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID / TELEGRAM_API_BASE_URLWEBHOOK_*PROXY_ROTATION_ENABLEDPROXY_ROTATION_MODEPROXY_POOLPROXY_ROTATION_RETRY_LIMITPROXY_BLACKLIST_TTLTASK_FAILURE_THRESHOLDTASK_FAILURE_PAUSE_SECONDSTASK_FAILURE_GUARD_PATH完整示例见 .env.example。
POST /auth/status 校验。admin/admin123,生产环境请务必修改。下图描述了单个监控任务从启动到完成的核心处理逻辑。主服务运行于 src.app,按用户操作或定时调度启动一个或多个任务进程。
graph TD
A[启动监控任务] --> B[选择账号/代理配置];
B --> C[任务: 搜索商品];
C --> D{发现新商品?};
D -- 是 --> E[抓取商品详情 & 卖家信息];
E --> F[下载商品图片];
F --> G[调用AI进行分析];
G --> H{AI是否推荐?};
H -- 是 --> I[发送通知];
H -- 否 --> J[保存记录到 SQLite];
I --> J;
D -- 否 --> K[翻页/等待];
K --> C;
J --> C;
C --> L{触发风控/异常?};
L -- 是 --> M[账号/代理轮换并重试];
M --> C;
AI 模式会先生成分析标准,再创建任务。现在该流程已改为后台 job,提交后会显示独立进度弹窗,避免表单长时间卡住。
区域筛选会显著减少搜索结果,适合明确只看某个区域的场景。若你先验证整体市场,建议先不填。
说明根目录 dist/ 缺失。可直接执行 ./start.sh,或先在 web-ui/ 里执行 npm run build,再确认构建产物已复制到仓库根目录。
./start.sh 为什么提示缺少 Playwright 或浏览器?这是脚本的前置检查。请先安装 Playwright CLI 与 Chromium,并确保系统中可用 Chrome / Edge(Linux 环境也可用 Chromium),然后重新执行 ./start.sh。
本项目在开发过程中参考了以下优秀项目,特此感谢:
以及感谢LinuxDo相关人员的脚本贡献
以及感谢 LinuxDo 社区。
以及感谢 ClaudeCode/Gemini/Codex 等模型工具,解放双手 体验Vibe Coding的快乐。