weread
Search WeRead, inspect books and reading data, manage the bookshelf, public-account subscriptions and reviews, read, write, edit, and batch-sync highlights and notes, build private article feeds and archives, ask WeRead AI, or import a personal book through the installed `weread-omni` JSON CLI. Use for requests involving 微信读书, WeChat Reading, a user's WeRead shelf, public accounts, articles, highlights, notes, reviews, reading statistics, recommendations, or book lookup.
- Star
- 718
- 分类
- 数据
- 许可证
- MIT
- 最近提交
- 2026年11月16日
skills/weread/SKILL.md
在 GitHub 上查看WeRead
Use the installed CLI as the only interface. Always pass --json, parse
successful stdout as JSON, and summarize the result for the user. On a non-zero
exit, parse the JSON error from stderr. Never expose credentials or paste raw
tokens.
Batch annotations and rate limits
For multiple annotations, an entire chapter, updates from a source document, or a resumed run, read the batch annotation workflow before the first write. It defines source completeness, range selection, deduplication, durable receipts, recovery, and exhaustive acceptance checks.
Serialize all remote CLI calls for the selected account, including searches, reads, writes, and verification. Wait at least 2 seconds after each call finishes before starting the next; use one queue, without parallel workers. This is a conservative operating interval validated in a 263-note run, not an official server quota; one CLI command can make several HTTP requests. On HTTP 429 or an explicit frequency-limit response, stop the write queue and follow the batch workflow's recovery table. Never automatically retry a write whose outcome is uncertain. Save its intent and response before continuing.
Account selection
Choose exactly one account for the session and preserve it through every CLI
call. Use the alias supplied by the user or operator. If none was supplied,
weread-omni accounts --json must show exactly one configured account. In the
examples below, $ACCOUNT means that alias. Do not switch accounts after a
failure.
Writes are permitted unless the operator has set WEREAD_READONLY. A refused
write fails with disabled by WEREAD_READONLY; report that limit as policy, and
never unset it or retry against another account on the user's behalf.
Session preflight
Before the first authenticated operation, run:
weread-omni --account "$ACCOUNT" doctor --json
Proceed only when the result has ok: true, cli.package: "weread-omni", and auth.status: "authenticated". On an authentication
error, require the same cli.package in the JSON error before following its
hint. Do not start QR login without user confirmation. Follow the returned
account-specific hint; malformed or unreadable state must be corrected or
removed first. Retry doctor once with the same account. If it returns
non-JSON or names another
package, stop and report the path from command -v weread-omni; do not guess
another command.
Read workflow
Start with the narrowest read that answers the request. Preserve bookId
values from search or shelf results for follow-up commands.
Book metadata, chapter listings, and downloaded public-account articles are
served from a local library after the first read, so a repeated read can return
a stored copy rather than a fresh one. If a result looks out of date, say so and
offer --refresh to refetch and replace it; --no-library skips the library
entirely for one command. Never present stored content as freshly fetched.
weread-omni --account "$ACCOUNT" public-accounts read-article 'https://mp.weixin.qq.com/s/ARTICLE' --json
weread-omni --account "$ACCOUNT" search books "三体" --json
weread-omni --account "$ACCOUNT" search books "刘慈欣" --scope 6 --json
weread-omni --account "$ACCOUNT" book info BOOK_ID --json
weread-omni --account "$ACCOUNT" book search BOOK_ID "exact original text" --chapter-uid CHAPTER_UID --json
weread-omni --account "$ACCOUNT" shelf sync --count 20 --json
weread-omni --account "$ACCOUNT" public-accounts subscriptions --count 20 --json
weread-omni --account "$ACCOUNT" public-accounts articles MP_WXS_123 --count 20 --json
weread-omni --account "$ACCOUNT" public-accounts resolve-article 'https://mp.weixin.qq.com/s/ARTICLE' --json
weread-omni --account "$ACCOUNT" notes notebooks --count 10 --json
weread-omni --account "$ACCOUNT" notes recent --count 10 --json
weread-omni --account "$ACCOUNT" notes mine BOOK_ID --count 10 --json
weread-omni --account "$ACCOUNT" notes underlines BOOK_ID CHAPTER_UID --json
weread-omni --account "$ACCOUNT" notes read-reviews BOOK_ID CHAPTER_UID --reviews '[{"range":"393-401","count":10}]' --json
weread-omni --account "$ACCOUNT" review single REVIEW_ID --json
weread-omni --account "$ACCOUNT" read-data detail --mode weekly --json
weread-omni --account "$ACCOUNT" discover recommend --count 10 --json
weread-omni --account "$ACCOUNT" ai ask-book BOOK_ID "Summarize the central argument" --json
search books defaults to --scope 10 for ebooks. Choose the scope from the
request: 0 all, 10 ebooks, 16 web fiction, 14 audio, 6 authors, 12
full text, 13 booklists, 2 public accounts, or 4 articles. Do not use
scope 10 for every intent. When hasMore is 1, pass the last result's
searchIdx as --max-idx; a page is not the complete result set.
Use only the cursor that belongs to the command:
- For
shelf sync, passnextOffsetas--offset. - For
public-accounts articles, omit--offseton the first call, or pass a previoussynckeyas--synckeyfor a delta refresh. Never combine the two. If the response hasnextOffset, pass it as--offset; stop when it is absent. - For
notes notebooks, pass the final book'ssortas--last-sort. notes recentis a bounded account-wide snapshot; it has no page cursor.- For
notes bestandreview list, add the returned item count to the previous--max-idx. - Use
synckeyonly to refresh previously fetched data. It is not a page cursor.
Preserve every upstream hasMore and cursor exactly; do not infer completion
from a short result or from a missing hasMore.
shelf sync returns a compact page by default. Use --full only when the user
needs exact upstream sync fields; it cannot be combined with --count or
--offset.
Use book detail for product images and other books by the same author or
rightsholder. It returns six entries per related catalog by default; use
--count (1-12) when a smaller result is enough. Use book chapters or
book progress for those specific views.
book chapters returns the table of contents, where each
entry carries the chapterUid that the notes and review commands use to address
a position in a book. Use notes bookmarks, notes best, or notes underlines
for those note types. To read thoughts under a popular highlight, take its
chapterUid and range from notes best, call notes read-reviews, then use
review single when the user wants one thought in full. Use review list,
discover similar, and ai suggest for reviews, related books, and suggested
questions.
For a supplied article URL, use public-accounts read-article URL --json directly;
no public-account search or subscription is needed. resolve-article only returns
an ID and review single may only contain metadata or an abstract.
Use the returned markdown or contentHtml, and cite sourceUrl. A cache hit is
marked fromCache: true, with cachedAt and a null fetchedAt. status: readable
does not independently establish completeness (completeness: unverified);
inspect the article structure and ending when completeness matters. partial
means only a preview was obtained. An unavailable body exits nonzero with JSON
diagnostics on stderr; never summarize its metadata as though it were the body.
For public-account discovery and subscription, follow this sequence:
- Search with
weread-omni --account "$ACCOUNT" search books KEYWORD --scope 2 --json. - Show the matches and have the user choose the exact
MP_WXS_<digits>ID. Never auto-select or auto-subscribe the first fuzzy match. - Subscribe only when requested, then use
public-accounts subscriptions,articles,feed, orexport. - Unsubscribe only after confirming the exact account.
weread-omni --account "$ACCOUNT" public-accounts subscribe MP_WXS_123 --json
weread-omni --account "$ACCOUNT" public-accounts feed MP_WXS_123 --format rss --out /private/path/feed.xml --json
weread-omni --account "$ACCOUNT" public-accounts feed subscriptions --format json --out /private/path/feed.json --json
weread-omni --account "$ACCOUNT" public-accounts export MP_WXS_123 --out /private/path/archive --json
weread-omni --account "$ACCOUNT" public-accounts unsubscribe MP_WXS_123 --yes --json
Feed and export outputs contain at most 20 items by default and 100 maximum.
For aggregate feeds, this is a final output limit; collection may retrieve up
to that many candidates per account. CLI output paths are never overwritten.
An export is complete only when manifest.json exists; report an incomplete
path rather than deleting it.
Article retrieval makes one bounded direct retrieval attempt from a validated
HTTPS mp.weixin.qq.com/s source URL using WeRead's E-Ink User-Agent. The
attempt may follow at most three validated redirects and sends no WeRead
authentication headers to that host. If a diagnostic reports
SOURCE_CLOUDFLARE_CHALLENGE or SOURCE_WECHAT_CHALLENGE, tell the user to
open its sourceUrl in a browser. Do not claim the archive is complete or
imply that the CLI can execute JavaScript challenges or solve CAPTCHAs.
For a question about a book's substance, prefer ai ask-book: the server
answers it directly, with no need to pull anything down first.
Locate text before annotating
Use book search BOOK_ID "original text" --chapter-uid CHAPTER_UID --json
to obtain new ranges without browser selection. Resolve CHAPTER_UID from
book chapters; the printed chapter number is not its UID. This differs from
search books --scope 12, which searches the catalog rather than one chapter.
The result contains bookId, chapterUid, keyword, source, complete,
and matches[] with range, start, end, markText, and context.
source=reader-search uses the web search API's match coordinates.
For uploaded CB_ EPUBs, source=reader-html locates text in the server's
converted chapter and adds chapterSha256. Both use the selected CLI account;
no browser, browser cookie extraction, or local EPUB is needed. Reads are fresh.
Before an authorized annotation:
- Require
complete: true, the intended book/chapter, and the expected original text and context. Search preserves case and normalizes layout whitespace for uploaded EPUBs. Treat zero matches as not found. With multiple matches, choose only when the user's intended context uniquely identifies one; never choose the first automatically. Narrow the quote or ask for the missing context. - Preserve the returned
rangeexactly. HTML tags and entities can makeend - startdiffer frommarkText.length. Never calculate a WeRead range from raw local EPUB offsets, another edition, or a fixed offset adjustment. - Read
notes bookmarks BOOK_ID --jsonbefore adding a highlight. Reuse a matching chapter/range/text instead of duplicating it. For a new highlight, pass the returnedrangeandmarkTexttonotes add-bookmarkand read back. - For the requested thought, pass the same chapter/range and
markTextas--abstracttoreview add --private. Save its ID immediately and follow the private read-back checks below. Reuse saved receipts when resuming a task.
If the search is incomplete, authentication fails, a chapter is unavailable, or its checksum fails, do not write. Report the specific failure. Uploaded TXT, PDF, and unsupported chapter formats do not have a verified HTML locator. If the book is replaced or its edition changes, locate the quote again.
Account changes
Run a write only when the user explicitly requests that change. State the target before acting. Do not infer consent from a prior read.
weread-omni --account "$ACCOUNT" shelf add BOOK_ID --json
weread-omni --account "$ACCOUNT" review add BOOK_ID "A private thought" --private --json
weread-omni --account "$ACCOUNT" review edit REVIEW_ID "Replacement text" --json
weread-omni --account "$ACCOUNT" import book /absolute/path/to/book.epub --json
Private thoughts and annotations
Use --private when creating personal thoughts, annotations, or reading notes,
unless the user explicitly requests non-private publication. Check
review add --help for this option before the first private write. If the
installed CLI lacks it, report the missing capability and upgrade; never fall
back to publishing without the option.
weread-omni --account "$ACCOUNT" review add BOOK_ID "My private note" --type 1 --chapter-uid CHAPTER_UID --range "777-778" --abstract "the highlighted text" --private --json
weread-omni --account "$ACCOUNT" review single REVIEW_ID --json
Read back the returned ID with review single. Confirm private creation only
when review.isPrivate is exactly 1, and verify the content, book, chapter,
and range. Missing privacy data is unverified, not private. Preserve the ID and
report a mismatch; retry reads if needed, not the write.
For an edit, read the current content and visibility first. Pass --private
when retaining an existing private note or when the user requests private
visibility. To make an existing thought private, use
review edit REVIEW_ID "EXACT_EXISTING_CONTENT" --private --json, then read it
back. Keep the full existing content when only visibility is changing.
--no-private explicitly clears the private flag and requires a user request
for that visibility change. It leaves any other audience restrictions intact.
Omitting both flags sends no visibility field; creation then uses the server
default. A book's private-reading setting does not establish a thought's privacy.
import book accepts an EPUB, PDF, MOBI, TXT, or AZW3 file the user already
has; it uploads that file to the user's own WeRead account.
Shelf state changes use the positive state by default and a negated option for the reverse:
weread-omni --account "$ACCOUNT" shelf pin BOOK_ID --json
weread-omni --account "$ACCOUNT" shelf pin BOOK_ID --no-top --json
weread-omni --account "$ACCOUNT" shelf set-private BOOK_ID --json
weread-omni --account "$ACCOUNT" shelf set-private BOOK_ID --no-secret --json
weread-omni --account "$ACCOUNT" shelf mark-finished BOOK_ID --json
weread-omni --account "$ACCOUNT" shelf mark-finished BOOK_ID --no-finished --json
weread-omni --account "$ACCOUNT" shelf mark-reading BOOK_ID --json
weread-omni --account "$ACCOUNT" shelf mark-reading BOOK_ID --no-reading --json
Review ratings use the protocol scale 20, 40, 60, 80, or 100.
Add a highlight (划线) with the chapter, character range, and highlighted text:
weread-omni --account "$ACCOUNT" notes add-bookmark BOOK_ID CHAPTER_UID "777-778" "the highlighted text" --json
weread-omni --account "$ACCOUNT" notes update-bookmark BOOKMARK_ID --style 2 --color-style 5 --json
Deletion is destructive. Confirm the exact target with the user, then include
--yes; never retry a failed write blindly.
weread-omni --account "$ACCOUNT" shelf delete BOOK_ID --yes --json
weread-omni --account "$ACCOUNT" notes remove-bookmark BOOKMARK_ID --yes --json
weread-omni --account "$ACCOUNT" review delete REVIEW_ID --yes --json
weread-omni --account "$ACCOUNT" public-accounts unsubscribe MP_WXS_123 --yes --json
Result handling
- On success, report the useful fields and retain relevant IDs for follow-ups.
- A response may omit fields or return fewer items than requested. Use only values actually returned; do not synthesize a missing field or describe it as zero/empty.
- Use
totalCountfrom the compact shelf response. In a--fullresponse, the total isbooks.length + albums.length + (non-empty mp ? 1 : 0). Do not answer frombookCountalone. - A notebook's total notes are
reviewCount + noteCount + bookmarkCount.noteCountis highlights only, andreviewCountalready includes personal thoughts/reviews. Exportable content requires bothnotes bookmarksandnotes mine; highlight text is returned, but type-0 bookmark text is not. - Treat every reading-duration field as seconds except
preferAuthor[].readTime, which is already formatted text. Reading progress is an integer percentage:1means 1%, and only100means finished. - Public review ratings use
20,40,60,80,100for one through five stars. Personal-note review ratings may instead be0-5or-1for none. - Use a returned
deepLinkdirectly as the open link. Never construct one when the response omits it. Convert Unix timestamps to dates before presenting them. - On
{ "error": ... }, explain the error without guessing or silently switching commands. - Interpret error codes together with the endpoint and returned message.
Codes such as
-2010and-2013have endpoint-dependent meanings; retain diagnostics and distinguish authentication, permission, and throttling. Respect the server decision without looping or switching accounts to bypass it. - Paginate only when the user needs more results. Continue only when the
backend returns the required next-page signal (
hasMore=1,nextOffset, or the command's documented cursor). If the response omits a completion signal, report that the available page is bounded rather than claiming it is the complete result set. - Keep source data in Chinese when appropriate; translate or summarize only when requested.
- Write Chinese responses as original Chinese, not as sentence-by-sentence translations from English. Prefer short, concrete, idiomatic wording; state what the user can do before commands and constraints; retain established technical names when they are clearer; and remove translationese or generic AI marketing language before replying.
相似的 Skill
health
GAgarrytan/gstack143k近 7 天新增 598 个 star
deprecation-and-migration
ADaddyosmani/agent-skills122k近 7 天新增 1,667 个 star
ccs-align
THthedotmack/claude-mem121k近 7 天新增 1,626 个 star
handoff
THthedotmack/claude-mem121k近 7 天新增 1,626 个 star
mem-search
THthedotmack/claude-mem121k近 7 天新增 1,626 个 star