social-auto-tool-builder-1.1.0

复用“小红书自动回复项目”实战经验,快速构建新的本地AI自动化工具(含多平台选择器映射模板)

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 326 · 1 current installs · 1 all-time installs
by范士轶@cruciata
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, and skill.yaml all describe building a local AI + Playwright auto-responder and the instructions only reference Playwright, local Ollama, packaging to EXE, selector templates and dry-run vs send flows — these are coherent and expected for that purpose.
Instruction Scope
SKILL.md explicitly instructs reading DOM/snippets/screenshots to calibrate selectors, running dry-runs, and then performing sends; it does not instruct the agent to read unrelated system files or exfiltrate secrets. It does reference checking a local Ollama HTTP endpoint (127.0.0.1) and using persistent_context for browser login state, which is appropriate for the stated functionality.
Install Mechanism
This is an instruction-only skill with no install spec and no code files. The SKILL.md suggests using common package installs (pip, playwright install) and EXE packaging tools; nothing is pulled from arbitrary URLs in the skill itself.
Credentials
The skill declares no required environment variables, credentials, or config paths. The only runtime network reference is to localhost:11434 (local Ollama), which matches the stated use of a local model. No unrelated tokens or secrets are requested.
Persistence & Privilege
Skill flags are default (not always:true). It does not request persistent platform-wide privileges or instruct modification of other skills or agent-wide configs. It does suggest storing browser login state (persistent_context) which is expected for an automation tool that must act as a logged-in user.
Assessment
This skill appears coherent with its stated goal of producing a local Playwright + Ollama auto-responder. Before using or following its instructions: 1) Understand that the resulting tool will automate actions as your logged-in browser user — test carefully in dry-run mode and on non-production accounts to avoid policy/ToS violations. 2) The skill assumes you run a local Ollama server (127.0.0.1:11434) and have Playwright/browser binaries installed; ensure those are legitimate and up-to-date. 3) The skill itself asks for no secrets, but the tools you build may require login cookies or credentials stored in the browser profile — keep those local and secure. 4) When packaging an EXE, verify the build scripts and any bundled files yourself to avoid accidentally including sensitive data. If you want a higher-assurance review, provide the actual automation code (auto_responder_production.py, build_exe.ps1, requirements.txt) so those files can be inspected for unsafe behavior (remote endpoints, credential capture, obfuscated operations).

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.1.0
Download zip
latestvk9767pef4w5hcgyxx3a6yv00358353fe

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

社媒自动化工具构建 Skill v1.1.0

目标

把“新自动化工具”的制作过程标准化,并在 v1.0.0 基础上新增多平台适配能力:

  • Python + Playwright(persistent_context)
  • 本地 Ollama(意图识别 + 回复生成)
  • 规则过滤 + AI 生成混合策略
  • 先 dry-run 再真实发送
  • 参数化运行 + Windows EXE 打包
  • 小红书 / 抖音 / 快手选择器映射模板

先决输入(必须确认)

  1. 目标平台(xiaohongshu / douyin / kuaishou)
  2. 入口 URL(通知页/消息页)
  3. 已回复判定规则(例如“作者”)
  4. 发送成功信号(toast 或状态文本)
  5. 时间窗口与轮询间隔
  6. 单轮最多处理条数

默认值(信息不全时):

  • interval-minutes=5
  • recent-hours=1
  • max-replies=0
  • --once dry-run

多平台选择器映射模板(核心)

在主程序中维护一个映射表(先填模板,后按真实 DOM 覆盖):

SELECTOR_MAP = {
    "xiaohongshu": {
        "url": "https://www.xiaohongshu.com/notification",
        "comment_item": ".interaction-item, .comment-item",
        "comment_text": ".interaction-content, .comment-text, .content",
        "reply_trigger": "button:has(svg.reply-icon), svg.reply-icon, .reply-btn",
        "input": "p#content-textarea.content-input, [contenteditable='true'].content-input, textarea.comment-input",
        "submit": "button.submit, button:has-text('发送')",
        "success": "text=评论成功",
        "replied_marker": "作者"
    },
    "douyin": {
        "url": "<TO_FILL_DOUYIN_URL>",
        "comment_item": "<TO_FILL>",
        "comment_text": "<TO_FILL>",
        "reply_trigger": "<TO_FILL>",
        "input": "<TO_FILL>",
        "submit": "<TO_FILL>",
        "success": "<TO_FILL_SUCCESS_TEXT>",
        "replied_marker": "<TO_FILL_MARKER>"
    },
    "kuaishou": {
        "url": "<TO_FILL_KUAISHOU_URL>",
        "comment_item": "<TO_FILL>",
        "comment_text": "<TO_FILL>",
        "reply_trigger": "<TO_FILL>",
        "input": "<TO_FILL>",
        "submit": "<TO_FILL>",
        "success": "<TO_FILL_SUCCESS_TEXT>",
        "replied_marker": "<TO_FILL_MARKER>"
    }
}

适配规则:

  • 先读平台映射,再执行统一流程。
  • 每个关键 selector 至少保留 1 个 fallback。
  • 任何平台都先跑 dry-run 列候选,再启用真实发送。

标准流程(6 Phase)

Phase 1:骨架搭建

  • 主程序拆分:AI 客户端、自动化模块、参数解析。
  • 支持参数:
    • --platform
    • --interval-minutes
    • --recent-hours
    • --max-replies
    • --once
    • --interactive

Phase 2:平台映射接入

  • 将平台 selector 映射注入 Automation
  • URL、评论列表、输入框、发送按钮、成功信号全部来自映射。

Phase 3:真实 DOM 校准

  • 让用户提供截图/DOM 片段,增量修正映射。
  • 每次只改一个动作链路(打开弹窗、输入、发送)。

Phase 4:安全与准确

  • 已回复过滤(marker)
  • 时间窗口过滤(recent-hours)
  • 去重((text, age)
  • 2-5 秒随机延迟

Phase 5:验证

  • dry-run:列出候选不发送
  • 用户确认后真实发送
  • 必须等待成功信号

Phase 6:交付

  • EXE 打包(含 Playwright 浏览器路径兼容)
  • QUICK_START + FAQ
  • Git 提交与推送

质量闸门(必须通过)

  1. python -m py_compile auto_responder_production.py
  2. --once 模式可运行
  3. dry-run 候选与人工预期一致
  4. 至少 1 条真实发送成功信号
  5. EXE 参数模式可运行
  6. EXE 交互模式可运行

Windows 命令模板

# 安装依赖
pip install -r requirements.txt
python -m playwright install chromium

# 本地模型检查
python -c "import requests;print(requests.get('http://127.0.0.1:11434/api/tags',timeout=5).status_code)"

# 单轮 dry-run
python auto_responder_production.py --platform xiaohongshu --once --recent-hours 1 --max-replies 3

# 构建 EXE
powershell -ExecutionPolicy Bypass -File .\build_exe.ps1

# EXE 参数模式
.\dist\auto_responder.exe --platform xiaohongshu --interval-minutes 5 --recent-hours 2 --max-replies 3

# EXE 交互模式
.\dist\auto_responder.exe --interactive

可复用 Prompt(新项目直接用)

按 social-auto-tool-builder v1.1.0 的流程,帮我做一个【平台名】自动化工具。
要求:
1) Python + Playwright + 本地 Ollama
2) 用 persistent_context 保存登录状态
3) 先 dry-run 列候选,再真实发送
4) 支持 --platform --interval-minutes --recent-hours --max-replies --once --interactive
5) 用多平台选择器映射模板实现,允许按我提供的DOM增量修正
6) 最后打包EXE并给 QUICK_START

输出物检查清单

  • skill.yamlSKILL.md 完整
  • 选择器映射模板已建立
  • 平台参数化设计明确
  • 验证与交付步骤可执行

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…