
Weread
- 274 installs
- 19 repo stars
- Updated July 21, 2026
- shiquda/weread-cli
WeRead is an agent skill for the weread CLI that wraps the official WeChat Reading API so developers can query shelves, notes, and reading stats with stable local commands.
About
WeRead is the companion skill for shiquda/weread-cli, teaching agents to use the published weread command for WeChat Reading data instead of hand-written HTTP calls. Reach for it when users mention 微信读书, shelf inspection, reading time, highlights, notes export, or API key setup. It encodes domain rules, normalized errors, and the command map for search, progress, reviews, and discover recommendations.
- Maps shelf, notes export, readdata stats, discover, and book resolve to first-class weread commands
- Runs weread doctor for auth and CLI health before any WeRead task
- Defaults agents to --json and file exports for large notebook or highlight payloads
- Documents wrk- API key setup via weread config set-key and official weread-skills page
Weread by the numbers
- 274 all-time installs (skills.sh)
- +16 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #179 of 550 CLI & Terminal skills by installs in the Skillselion catalog
- Data as of Jul 27, 2026 (Skillselion catalog sync)
npx skills add https://github.com/shiquda/weread-cli --skill wereadAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 274 |
|---|---|
| repo stars | ★ 19 |
| Last updated | July 21, 2026 |
| Repository | shiquda/weread-cli ↗ |
How do you access personal WeRead data from an agent without reimplementing auth, skill_version headers, and error parsing?
Drive WeRead shelf, notes, reading stats, and discovery through the weread CLI instead of ad hoc curl against WeChat Reading APIs.
Who is it for?
Developers or readers automating WeChat Reading workflows who install weread-agent-cli and want structured agent guidance.
Skip if: Teams with no WeRead account or users who only need generic ebook parsing unrelated to the WeRead API.
When should I use this skill?
The user mentions WeRead, 微信读书, bookshelf, notes export, reading statistics, or first-time wrk- API key configuration.
What you get
Correct weread CLI invocations, JSON summaries, and exported note files with doctor-validated authentication.
Files
WeRead
The local weread CLI is the only interface you need. It handles authentication, request shape, skill_version, JSON parsing, upgrade checks, and normalized errors — writing ad hoc curl requests would mean reimplementing all of that and losing the normalized error layer.
Agents should use --json by default. Use human-readable output only when the user explicitly wants terminal-readable command output.
For large outputs such as shelf, notebooks, bookmarks, or exports, write JSON or Markdown to a file first, then summarize the result in chat. Do not paste full large JSON payloads or full exported notes into the conversation.
For notes export, use --output <path> by default. Only stream the export to stdout when the user explicitly asks to see the full export inline.
First Decision
Before any WeRead work, check auth and CLI health:
weread doctorIf the weread command is missing, or if auth_configured is false, read references/first-use.md and guide the user through setup.
Command Map
weread search "三体" --scope book --count 10
weread book resolve "三体" --limit 5
weread book info <bookId>
weread book chapters <bookId>
weread book progress <bookId>
weread shelf list
weread shelf recent --limit 10
weread readdata detail --mode monthly
weread readdata summary --mode monthly
weread notes notebooks --count 100
weread notes top --limit 20
weread notes bookmarks <bookId>
weread notes export <bookId> --format markdown --output notes.md
weread notes mine <bookId> --count 20
weread notes underlines <bookId> <chapterUid>
weread notes best <bookId> --chapter-uid <chapterUid>
weread notes readreviews <bookId> <chapterUid> --reviews-json '[{"range":"900-2004","count":20}]'
weread reviews list <bookId> --type 1 --count 20
weread reviews single <reviewId>
weread discover recommend --count 12
weread discover similar <bookId> --count 12
weread api listWhen a supported API isn't covered by a first-class command, use the raw escape hatch:
weread api call /store/search --param keyword=三体 --param scope=10When To Read References
References are loaded on demand to keep startup context lean. Load them only when the task requires it:
- First-time setup, missing auth, or API Key questions: read
references/first-use.md - Shelf totals, public/private counts, audiobook or article-collection handling: read
references/domain-rules.md - Notes, highlights, bookmarks, personal ideas, public reviews, or exports: read
references/domain-rules.md - Reading statistics, historical periods, cross-year ranges, or time-unit interpretation: read
references/domain-rules.md - Deep links to books, chapters, highlights, or ideas: read
references/domain-rules.md
Intent Routing
Search
- Find a book, get a
bookId, or user says搜书/找书:weread search "<keyword>" --scope book - Generic
搜一下or mixed intent:--scope all - Web fiction or
网文:--scope fiction - Audiobooks, podcasts,
听书,有声书, or专辑:--scope audio - Authors:
--scope author - Full-text search or
书里提到:--scope fulltext - Book lists:
--scope list - Official accounts:
--scope mp - Articles:
--scope article
Book Details
If the user gives a title rather than an ID, prefer weread --json book resolve "<title>" --limit 5 and use items[].bookId.
- Metadata:
book info - Chapter UIDs (needed for notes/highlights by chapter):
book chapters - Reading progress:
book progress—progressis an integer percent;1means 1%, only100means finished
Shelf
Use weread --json shelf list. For recent reading, use weread --json shelf recent --limit 10. For anything nuanced (public/private split, audiobook handling), read references/domain-rules.md.
Reading Statistics
Use weread --json readdata summary --mode monthly for common summaries, or weread --json readdata detail with --mode weekly, monthly, annually, or overall. Time fields in structured output are seconds. For historical or cross-period calculations, read references/domain-rules.md.
Notes and Highlights
- Overview across all books:
weread --json notes notebooks - Books with the most personal notes/highlights:
weread --json notes top --limit 20 - Single-book export:
weread notes export <bookId> --format markdown --output <path>; choose a local Markdown path and summarize counts/content instead of pasting the whole file - If manually combining data, use both
weread --json notes bookmarks <bookId>andweread --json notes mine <bookId> - For counting rules, export limits, or popular highlight queries, read
references/domain-rules.md
Reviews
Public reviews: weread --json reviews list <bookId> with --type 0 (all) through --type 4. Single review: weread --json reviews single <reviewId>.
Recommendations
- Personalized:
weread --json discover recommend - Similar books:
weread --json discover similar <bookId>
Pagination
Stay shallow by default — only paginate further when the user explicitly asks for a complete export, a ranking, or a total that requires all pages. Use --limit for display size and --all where supported. For manual pagination, use --json and pass the native cursor from the previous JSON result:
- Search:
hasMore == 1→ pass last itemsearchIdxas--max-idx - Notebooks:
hasMore == 1→ pass lastbooks[].sortas--last-sort - Reviews: pass last review
idxas--max-idxand returnedsynckeyas--synckey - Similar: pass last item
idxas--max-idxandbooksimilar.sessionIdas--session-id
Error Handling
The CLI normalizes errors to JSON:
{
"ok": false,
"skill_version": "1.0.3",
"error": {
"type": "missing_auth",
"message": "..."
}
}missing_auth: readreferences/first-use.mdand help configure the keyupgrade_required: stop immediately and followupgrade_info.message; don't continue the original task until upgradedupstream_timeout,network_error: these are retryable; the CLI already retries transient failures before returning the errorapi_error,http_error,invalid_json: report the failure; retry only when repeating is safe
User-Facing Output
- Default to
--json; use--compactwhen a command returns too much metadata for the task - Convert Unix timestamps to readable dates
- Convert seconds to hours and minutes
- Use numbered lists for search results, shelf entries, notes, reviews, and recommendations
- Include WeRead deep links when useful; format rules are in
references/domain-rules.md
WeRead Domain Rules
Use this reference for field meanings and user-facing interpretation. It intentionally avoids low-level request mechanics because the weread CLI handles those.
Shelf Rules
Use weread --json shelf list.
Visible shelf total:
books.length + albums.length + (mp ? 1 : 0)Important distinctions:
books[]contains electronic/imported/book-like entries.albums[]contains audiobooks or audio albums. They count as shelf items.mpis the article-collection entry. If present, it counts as one visible shelf item.- Do not use
bookCountas the total shelf count unless the user specifically asks for electronic books only.
Public/private counts:
- Private =
books[].secret == 1+albums[].albumInfoExtra.secret == 1+(mp ? 1 : 0) - Public =
books[].secret == 0+albums[].albumInfoExtra.secret == 0 - Count only returned visible entries.
Reading Progress
Use weread --json book progress <bookId>.
progressis an integer percentage from0to100.1means1%, not complete.- Only
100means finished. - Reading time fields are seconds.
Reading Statistics
Use weread --json readdata detail.
Modes:
weekly: natural weekmonthly: natural monthannually: natural yearoverall: all history
Time fields are seconds, including:
totalReadTimedayAverageReadTimereadLongest[].readTimedailyReadTimesvalues
Interpretation:
- Prefer
totalReadTimefor totals. readTimesis for bucketed detail, not the primary total.dayAverageReadTimeis averaged over natural days, not only reading days.- For "reading-day average", calculate
totalReadTime / readDaysand say that this is derived.
Historical and cross-period ranges:
- The API is based on fixed periods, not arbitrary start/end dates.
- For a whole year, use
--mode annuallywith a timestamp inside that year. - For cross-year requests, query each natural year and sum
totalReadTime. - For partial boundary periods, use
dailyReadTimeswhen available. If it is not available, use month/year approximation and state the approximation.
Notes, Highlights, And Bookmarks
Notebook overview:
weread --json notes notebooks --count 100Single-book exportable content usually needs:
weread --json notes bookmarks <bookId>
weread --json notes mine <bookId>Counting rules:
- Notebook total notes =
reviewCount + noteCount + bookmarkCount. noteCountmeans highlight count, not total notes.reviewCountincludes personal ideas/reviews and should not be added again under another label.
Export rules:
- Exportable content = highlight text + personal ideas/reviews.
- Bookmark positions are counted by
bookmarkCount, but bookmark content is not exportable through the current CLI commands. - If the user explicitly asks for bookmark content, explain that only the count is available.
Popular highlights:
weread --json notes underlines <bookId> <chapterUid>returns heat/statistics and ranges, not highlight text.weread --json notes best <bookId>returns popular highlight text and counts.weread --json notes readreviews <bookId> <chapterUid> --reviews-json '[...]'returns ideas/comments under specific highlight ranges.
Reviews
Personal notes and public reviews are different:
- Personal content:
weread --json notes mine <bookId> - Public book reviews:
weread --json reviews list <bookId>
Public review filter values:
--type 0: all--type 1: recommended--type 2: negative--type 3: recent--type 4: normal
For user-facing display, convert review star values when present:
100: five stars80: four stars60: three stars40: two stars20: one star
Search Scope Rules
Use these scopes:
book: electronic booksall: mixed search when the user only says "搜一下"fiction: web fictionaudio: audiobooks, podcasts, albumsauthor: authorsfulltext: full-text search inside bookslist: book listsmp: official accountsarticle: articles
When resolving a title to a bookId, use --scope book unless the user clearly asks for a different type.
Deep Links
Add deep links when useful and when the required fields are available.
Book:
weread://reading?bId={bookId}Chapter:
weread://reading?bId={bookId}&chapterUid={chapterUid}Highlight or idea position:
weread://bestbookmark?bookId={bookId}&chapterUid={chapterUid}&rangeStart={rangeStart}&rangeEnd={rangeEnd}&userVid={userVid}Range parsing:
rangeis usually shaped like900-2004.rangeStartis the number before-.rangeEndis the number after-.userVidmay be omitted if unavailable.
Only generate a highlight-position link when bookId, chapterUid, and range are available.
First Use And API Key Setup
Use this reference when weread doctor reports missing auth, when the weread command is not installed, when the user asks how to get an API Key, or when the user is setting up WeRead for the first time.
Install The CLI
If the weread command is missing, install the published CLI package:
npm install -g weread-agent-cliThen verify the command:
weread --version
weread doctorGet An API Key
1. Open the official WeRead Skills page:
https://weread.qq.com/r/weread-skills2. Sign in with the WeRead account whose reading data the user wants to access. 3. Find the API Key section on that page and copy the key. It should look like:
wrk-...4. Configure the local CLI:
weread config set-key "wrk-..."5. Verify:
weread doctorWhere The Key Is Stored
The CLI stores the key in:
~/.weread-cli/config.jsonThe environment variable WEREAD_API_KEY takes priority over the config file. This is useful for temporary overrides or CI:
export WEREAD_API_KEY="wrk-..."
weread doctorSafety Notes
- Treat the API Key as a private credential.
- Do not commit the key to a repository.
- Do not paste the key into issue trackers, README examples, or shared logs.
weread config listandweread doctoronly show a masked preview.
Common Setup Problems
- If
doctorstill says auth is missing, runweread config pathand confirm the key was saved in that file. - If an environment variable is set to the wrong key, it overrides the config file. Clear
WEREAD_API_KEYand rerundoctor. - If the key was copied with spaces or quotes, run
weread config set-keyagain with the clean key.
Related skills
FAQ
How is the CLI installed?
npm install -g weread-agent-cli; the skill is added with npx skills add shiquda/weread-cli --yes per the README.
Where is the API key stored?
weread config set-key saves credentials to ~/.weread-cli/config.json unless WEREAD_API_KEY overrides.
What should agents run before other commands?
weread doctor checks CLI presence and auth_configured; references/first-use.md covers setup when auth is missing.