Skill Zhihu Answer logo

Skill Zhihu Answer

OrganizationPopular
ZJU-REAL
skill-zhihu-answer

知乎问答回答发布:在知乎问题下发布原创回答——搜热门问题、检查可答性、写内容、 Playwright 发布(绕 header 遮挡 + JS 遍历发布按钮)。当用户说"回答知乎问题""在知乎问答下回答" "发知乎回答""知乎答题""帮我回答这个知乎问题""批量回答知乎"时使用。与 skill-zhihu-publisher 区别:那个发**专栏文章**(zhuanlan),本 SKILL 专发**问答区的回答**;回答内容写作用制作层 SKILL (novel-writer / copywriting)。

Overview

PublisherZJU-REAL
RepositoryEasel
Skill nameskill-zhihu-answer
Stars
3.5K
Forks
535
Bundled files
2
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZJU-REAL on GitHub. Read the source before you install it.

Installation

Install the Skill Zhihu Answer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/skill-zhihu-answer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZJU-REAL/Easel.git /tmp/Easel
mkdir -p .claude/skills
cp -r /tmp/Easel/skills/openclaw/skill-zhihu-answer .claude/skills/skill-zhihu-answer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skill Zhihu Answer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skill Zhihu Answer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skill Zhihu Answer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

skill-zhihu-answer(发布层 · 知乎问答回答)

在知乎问答帖子下发布原创回答:搜索热门问题 → 检查可答性 → 调用制作层 SKILL 写内容 → Playwright 发布。 核心脚本:skills/shared/scripts/zhihu_answer.py(CWD=项目根)。命令速查见 references/commands.md。


与其他 SKILL 的区别

SKILL定位
skill-zhihu-answer(本 SKILL)知乎问答帖的回答发布:搜题 + 写内容 + 发布
skill-zhihu-publisher知乎专栏文章(zhuanlan)发布,非问答回答
skill-cross-platform-publish一稿多发,多平台分发
novel-writer / copywriting制作层,生产回答正文;本 SKILL 调用它

核心流程

1. 搜索热门问题(可选,或用户直接给 URL)
      ↓
2. 检查可答状态(未答过 + WriteAnswerButton 存在)
      ↓
3. 制作层写内容(用 novel-writer / copywriting SKILL,或用户自备文本)
      ↓
4. 发布前人设检查(有 Profile 时)
      ↓
5. zhihu_answer.py --exec 发布
      ↓
6. 发布后留痕(persona_gate record + publish-log record)

Step 1:搜索热门问题(可选)

用已登录的 ZhihuProfile 搜索问题,直接访问候选页取真实回答数(搜索结果元数据不准):

python
page.goto("https://www.zhihu.com/search?type=question&q=<关键词>", wait_until="networkidle")
# 直接访问候选问题页取真实数据
page.goto("<问题URL>", wait_until="domcontentloaded")
import re
m = re.search(r'(\d[\d,]*)\s*个回答', page.inner_text("body"))
ans_count = int(m.group(1).replace(',', '')) if m else 0

zhihu_answer.py 目前不含搜索功能,搜索用临时脚本或用户直接给 URL(逻辑见 references/commands.md §6)。


Step 2:检查可答状态

python
has_write = page.locator(".WriteAnswerButton").count() > 0
already_answered = page.evaluate("""
    () => Array.from(document.querySelectorAll('button'))
               .some(b => (b.innerText||'').trim() === '编辑回答')
""")
can_answer = has_write and not already_answered

⚠️ 每个用户在同一问题只能回答一次。已答的问题显示「编辑回答」而非「写回答」。 对已答问题不要重复发布,否则进入编辑旧答案流程(发布按钮变为「提交修改」)。


Step 3:制作层写内容

回答正文属于制作层,用制作层 SKILL 写(novel-writer 或 copywriting),也可用用户提供的文本。 内容存为 outputs/主题名/answer_<问题ID>.md。

写作要点(恐怖/悬疑题材示例):第一人称、冷静克制、暗示>直白;短段落多换行适配手机; 开篇 500 字内建立世界观 + 第一个恐怖节点;文末加"本故事纯属虚构"。


Step 4:发布前人设检查

bash
cd <项目根> && python skills/shared/scripts/persona_gate.py check --score <评分>
# 始终退出码 0;低于 80 分时告知偏离点,但不阻断用户发布

Step 5:发布命令

bash
# Dry-run 预检(默认,不真正发布)
cd <项目根> && python skills/shared/scripts/zhihu_answer.py \
    --question <问题URL> --content-file <回答内容.md>

# 正式发布
cd <项目根> && python skills/shared/scripts/zhihu_answer.py \
    --question <问题URL> --content-file <回答内容.md> --exec

# 调试模式(有头浏览器,首次校验选择器时用)
cd <项目根> && python skills/shared/scripts/zhihu_answer.py \
    --question <问题URL> --content-file <回答内容.md> --exec --headed

核心实现:三策略点击「写回答」

根本原因:知乎顶部 <header class="AppHeader"> 覆盖「写回答」按钮,Playwright 常规 .click() 因 pointer event 被拦截而 30s 超时。必须绕过覆盖层。

策略1: btn.dispatch_event("click")          ← 绕过 header,多数页面有效
策略2: React 完整事件序列(mousedown+mouseup+click,dispatchEvent bubbles)
策略3: btn.focus() + keyboard.press("Enter") ← 最可靠降级,焦点触发 React 事件

每策略后检查 .public-DraftEditor-content 是否出现,出现即成功,否则进入下一策略。


核心实现:点击「发布回答」按钮

根本原因:内容输入后按钮可能滚出视口,wait_for(state="visible") 超时;且同页有 「发布设置」与「发布回答」两个含「发布」的按钮,需精确匹配「发布回答」。

javascript
// JS 遍历全部 button,不依赖视口可见性
const pub = Array.from(document.querySelectorAll('button'))
    .find(b => (b.innerText || '').trim().includes('发布回答'));
if (pub) { pub.scrollIntoView({block:'center'}); pub.dispatchEvent(new MouseEvent('click',{bubbles:true,cancelable:true,view:window})); }

降级:locator("button:has-text('发布回答')").wait_for(state="attached") + scroll_into_view_if_needed() + dispatch_event("click")。


Step 6:发布后留痕

bash
cd <项目根> && python skills/shared/scripts/persona_gate.py record \
    --topic <主题> --profile <画像> --score <评分> --verdict <pass|warn>

cd <项目根> && python skills/openclaw/skill-publish-log/scripts/log.py record \
    --platform 知乎 --title <问题标题> --profile <画像> \
    --persona-score <评分> --persona-verdict <结论> --skill-source zhihu-answer

批量发布多个问题

  1. 列出问题 URL + 对应内容文件;2. 批量检查可答状态;3. 制作层写完全部内容再发布(避免写一篇发一篇的上下文碎片化);4. 逐题串行发布(同一浏览器 Profile 不并发);5. 每题间隔约 30 秒降低风控。

已知限制与风险

问题说明
同一问题只能回答一次检查 can_answer 过滤,已答的跳过
知乎 Draft.js 编辑器只支持纯文本段落,Markdown **加粗** 不渲染、会原样显示星号
header 遮挡已通过 dispatch_event 三策略绕过
发布按钮视口外已通过 JS 遍历 + scrollIntoView 绕过
反爬风控用 --disable-blink-features=AutomationControlled;发布间隔 ≥ 30s
登录态读 ~/.easel-browser-profiles/ZhihuProfile;未登录时输出 未登录知乎 并退出

依赖与验证

bash
python skills/shared/scripts/zhihu_answer.py --selftest              # 脚本自测(不启浏览器)
python skills/shared/scripts/account_stats.py check                  # playwright 环境
python skills/shared/scripts/web_publisher.py whoami --platform zhihu # 知乎登录态

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Skill Zhihu Answer AI skill do?

知乎问答回答发布:在知乎问题下发布原创回答——搜热门问题、检查可答性、写内容、 Playwright 发布(绕 header 遮挡 + JS 遍历发布按钮)。当用户说"回答知乎问题""在知乎问答下回答" "发知乎回答""知乎答题""帮我回答这个知乎问题""批量回答知乎"时使用。与 skill-zhihu-publisher 区别:那个发**专栏文章**(zhuanlan),本 SKILL 专发**问答区的回答**;回答内容写作用制作层 SKILL (novel-writer / copywriting)。

Why use Skill Zhihu Answer on TypingMind?

Because you install it once and use it with any model. Skill Zhihu Answer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skill Zhihu Answer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/skill-zhihu-answer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Skill Zhihu Answer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skill Zhihu Answer?

As many as you like. As long as a model supports skills, you can use Skill Zhihu Answer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skill Zhihu Answer AI skill free?

Yes. It is published on GitHub by ZJU-REAL under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇