本文へ移動
cccskills
無料GitHub で公開

zhihu

Interact with Zhihu (zhihu.com) — browse hot questions, read answers, search content, view topics, check user profiles. Use this skill whenever the user mentions Zhihu, 知乎, zhihu.com, wants to browse Chinese Q&A content, read Zhihu answers, search Zhihu questions, check Zhihu hot list, or look up Zhihu users/topics. Also trigger when the user pastes a Zhihu URL (e.g. zhihu.com/question/12345), mentions a Zhihu topic, or asks about Chinese knowledge sharing platforms.

インストール方法を見る

含まれるファイル(15)

  • SKILL.md6.8 KB
  • references/provider-config.yaml502 B
  • scripts/zhihu_answer.py1.1 KB
  • scripts/zhihu_client.py3.7 KB
  • scripts/zhihu_hot.py1.4 KB
  • scripts/zhihu_member.py1.6 KB
  • scripts/zhihu_question.py2.0 KB
  • scripts/zhihu_search.py1.9 KB
  • scripts/zhihu_topic.py1.7 KB
  • tests/test_zhihu_answer.py1.4 KB
  • tests/test_zhihu_hot.py1.7 KB
  • tests/test_zhihu_member.py2.1 KB
  • tests/test_zhihu_question.py2.0 KB
  • tests/test_zhihu_search.py2.3 KB
  • tests/test_zhihu_topic.py1.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Zhihu

Browse, search, read, and interact with Zhihu — China's largest Q&A platform.

Skill Directory

<SKILL_DIR> is the directory containing this SKILL.md file. Determine it ONCE at the start and reuse it.

Setup (run FIRST — every time, before any operation)

You MUST complete this setup before running any script. Do NOT skip this step.

sig status zhihu 2>&1

Check the JSON output fields configured and valid:

  • configured: false → run Provider Setup below. Do NOT proceed without completing it.
  • valid: false (but configured: true) → run sig login zhihu, then re-check.
  • valid: true → detect proxy (see below), then execute the user's request.

Provider Setup

  1. Read <SKILL_DIR>/references/provider-config.yaml
  2. Append the provider block to ~/.sig/config.yaml under providers:
  3. Ask the user: "Do you need a proxy to access this site?" — if yes, add networkProxy: <url> under the provider in config.yaml
  4. Run sig login zhihu (with --network-proxy <url> if proxy was specified)
  5. Verify: run sig status zhihu again — must show valid: true before proceeding

Proxy Detection (after provider is valid)

grep -A15 "^\s*zhihu:" ~/.sig/config.yaml | grep networkProxy | awk '{print $2}'

If this outputs a URL, prefix ALL python3 commands with HTTPS_PROXY=<url> HTTP_PROXY=<url>. If using socks5, convert to socks5h for python (e.g. socks5://... → socks5h://...). If empty, no proxy needed.

Running Scripts

All scripts require setup to be completed first (see above).

All operations — use sig run to inject cookie (required for all Zhihu endpoints):

sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_hot.py --cookie "$SIG_ZHIHU_COOKIE" --limit 10'

Env var: SIG_ZHIHU_COOKIE

On auth error (401/403): run sig login zhihu automatically (no user prompt), then retry.

Scripts Reference

All scripts are in this skill's scripts/ directory. Run via Bash tool.

Read Operations

ScriptPurposeAuth
zhihu_hot.pyHot list (知乎热榜)Required
zhihu_question.pyQuestion answers + infoRequired
zhihu_answer.pySingle answer detailRequired
zhihu_search.pySearch questions/topics/peopleRequired
zhihu_member.pyUser profile + answersRequired
zhihu_topic.pySearch topics by keywordRequired

zhihu_hot.py

--cookie COOKIE       Zhihu session cookie (required)
--limit N             Max items (default: 50)

zhihu_question.py

--cookie COOKIE       Zhihu session cookie (required)
--id ID               Question ID (required)
--answers-limit N     Max answers to fetch (default: 10)
--sort SORT           Sort answers: "default" or "created" (default: "default")

Note: Question title and ID are extracted from the answers endpoint since Zhihu's question detail API is protected by anti-crawler measures.

zhihu_answer.py

--cookie COOKIE       Zhihu session cookie (required)
--id ID               Answer ID (required)

zhihu_search.py

--cookie COOKIE       Zhihu session cookie (required)
--query TEXT          Search query (required)
--type TYPE           Search type: "general", "topic", or "people" (default: "general")
--limit N             Max results (default: 20)

zhihu_member.py

--cookie COOKIE       Zhihu session cookie (required)
--url-token NAME      Member URL token (required)
--include-answers     Also fetch member's recent answers (flag)

zhihu_topic.py

--cookie COOKIE       Zhihu session cookie (required)
--query TEXT          Topic search query (required)
--limit N             Max results (default: 10)

Note: Direct topic detail API is protected by anti-crawler. This script searches topics by keyword instead.

Key Concepts

Questions — The core unit on Zhihu. Each question has a title, detail, and a list of answers. Found in URLs like zhihu.com/question/12345. Get from hot list or search results, then use with zhihu_question.py.

Answers — Responses to questions, ranked by votes. Each answer has content, vote count, and author info. Use zhihu_answer.py to fetch a single answer by ID.

Hot List (知乎热榜) — Zhihu's trending questions, ranked by heat score. Use zhihu_hot.py to browse.

Topics — Zhihu organizes content into topics (like tags). Examples: AI, programming, science. Use zhihu_topic.py to search topics by keyword.

Members — User profiles identified by url_token (found in URLs like zhihu.com/people/zhang-san). Use zhihu_member.py to view profile and answers.

Search — Zhihu supports searching across questions, topics, and people. Use zhihu_search.py with the --type flag to filter.

Error Handling

ErrorCauseFix
401 UnauthorizedSession expired / no cookieAuto-run sig login (no user prompt needed), retry
403 ForbiddenAnti-crawler or rate limitWait and retry, or check cookie
404 Not FoundInvalid IDCheck question/answer ID
RATE_LIMITEDToo many requestsWait and retry

Workflow Examples

Browse hot questions

  1. sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_hot.py --cookie "$SIG_ZHIHU_COOKIE" --limit 10'

Read a question and its answers

  1. sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_question.py --cookie "$SIG_ZHIHU_COOKIE" --id 20010554 --answers-limit 5'

Search for content

  1. sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_search.py --cookie "$SIG_ZHIHU_COOKIE" --query "machine learning" --type general --limit 10'

View a user profile

  1. sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_member.py --cookie "$SIG_ZHIHU_COOKIE" --url-token zhang-san --include-answers'

Search topics

  1. sig run zhihu -- bash -c 'python3 <SKILL_DIR>/scripts/zhihu_topic.py --cookie "$SIG_ZHIHU_COOKIE" --query "Python" --limit 5'

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

bilibili

無料

Interact with Bilibili (B站) — browse trending videos, view video details, read comments, search videos and users, view user profiles, like, coin, and favorite videos. Use this skill whenever the user mentions Bilibili, B站, wants to browse Bilibili content, search Bilibili videos, read Bilibili comments, look up Bilibili users, or interact with Bilibili content. Also trigger when the user pastes a Bilibili URL (e.g. bilibili.com/video/BV...) or mentions a BV ID.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

douyin

無料

Provide authenticated cookies for Douyin (抖音/TikTok China) — two providers: douyin (www.douyin.com for scraping) and douyin-live (live.douyin.com for livestream). Use this skill whenever the user needs Douyin cookies for scraping tools like DouYin_Spider, or needs to authenticate with Douyin services. Trigger when the user mentions 抖音, Douyin, TikTok China, douyin cookies, or wants to use tools that require Douyin login cookies.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

Interact with Hacker News (news.ycombinator.com) — browse top, new, and best stories, read item details and comment threads, look up user profiles, and search posts via Algolia. Use this skill whenever the user mentions Hacker News, HN, YCombinator news, ycombinator.com, news.ycombinator.com, wants to browse tech news, read HN discussions, search HN posts, or look up HN users. Also trigger when the user pastes an HN URL (e.g. news.ycombinator.com/item?id=12345). Keywords: Hacker News, HN, YC, ycombinator, tech news, Show HN, Ask HN, HN front page.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

linkedin

無料

Interact with LinkedIn — view your profile, browse other profiles, read the feed, search jobs/posts/people, get job details, create posts, like/unlike posts, comment, send connection requests, and follow/unfollow users. Use this skill whenever the user mentions LinkedIn, wants to search for jobs or people, read their LinkedIn feed, view a profile, get job details, create a post, like or comment on content, send a connection request, or follow someone. Also trigger when the user pastes a LinkedIn URL (e.g. linkedin.com/in/..., linkedin.com/jobs/view/...) or mentions LinkedIn networking.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

msteams

無料

Interact with Microsoft Teams — send and read messages, search conversations, look up people, check calendar, get meeting transcripts, and manage chats. Use this skill whenever the user mentions Teams, MS Teams, Microsoft Teams, wants to send a message, read chat history, search conversations, look up a colleague, check their calendar, find meeting recordings or transcripts, see direct reports or manager, or do anything involving Teams communication. Also trigger when the user asks about scheduling, org chart, people search, or wants to message someone.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

outlook

無料

Interact with Outlook email — read inbox, send emails, search messages, reply/forward, manage folders, download attachments. Use this skill whenever the user mentions email, Outlook, inbox, mail, send email, check email, unread messages, email search, attachments, reply to email, forward email, 邮件, 收件箱, or wants to read, send, search, reply to, forward, or manage emails.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

sigcli のスキルをすべて見る

このスキルの問題を報告する