Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture, enabling desktop agents to connect to various data sources on demand. Xiaohongshu (RED) is a critical content and trending platform, but it does not offer a login-free public API. Searching, viewing details, and reading comments all require front-end request signing and session cookies, and pure algorithm-based signing is frequently blocked by device fingerprinting walls. For agent developers who need stable, long-term access to Xiaohongshu content, calling the API directly is often not feasible. This plugin follows the same approach as the Douyin plugin: it launches a dedicated Chrome instance within the plugin process, uses CDP to intercept the signed requests sent by Xiaohongshu, and only reads the response JSON without touching the signing logic itself, thereby bypassing the fingerprinting wall.
Plugin Scope & Data Pipeline¶
This plugin is a Xiaohongshu trending/topic collection plugin for the DSH desktop client, maintained by N006Unnamed. It provides DSH with the ability to connect to Xiaohongshu, search notes, fetch details and comments, and generate publishable drafts. The data pipeline follows a three-layer architecture of “Browser Layer + Xiaohongshu Layer + Data Layer”:
- Browser Layer:
lib/browser.mjs(zero-dependency CDP, reusing douyin-bridge) - Xiaohongshu Layer:
lib/xhs-host.js(XhsHost, independent port defaulting to 47891, independent profile located at$DSH_HOME/dsh-xhs/browser/) - Data Layer:
src/core.mjs(caching, rate limiting, assembly),src/parse.mjs(parsing notes/comments),src/draft.mjs(using the host LLM to compose a publishable note from search results)
Core Features¶
Connection & Login¶
In the “Settings → Xiaohongshu” card, click “Open Login Window.” The plugin will launch a dedicated Chrome instance with an independent profile. On the first login, scan the QR code once; the login session is persisted in the profile, and subsequent uses require no re-login.
Search Notes¶
- Search (fast): Retrieves only list data, including titles, covers, authors, likes, and tags.
- Search & Fetch Details/Comments: Fetches full details for the top N search results, including body text, images, and comments.
Generate Publish Draft¶
Enter a topic keyword and optional style/angle. The plugin will invoke the host LLM to organize search results into a Xiaohongshu-style note (title + body + topic hashtags) and attach reference notes.
Scheduled Search¶
Execute a one-time search for specified keywords at a pre-set time.
Callable by Other Plugins¶
Other plugins can obtain the interface object via ctx.get('xhs'), which includes methods such as search, listNotes, note, draft, status, and login. The plugin also registers a series of xhs_* tools.
Tool List¶
The plugin provides the following tools (listed by name for easy reference):
xhs_searchxhs_notexhs_draftxhs_loginxhs_status
Directory Structure¶
dsh-xhs/
lib/
index.js # Plugin entry: tool injection / routing / ctx.provide('xhs') / scheduling
xhs-host.js # XhsHost: launch Chrome + CDP to listen for Xiaohongshu API
browser.mjs # Zero-dependency CDP browser control
routes.mjs # /api/plugins/dsh-xhs/* routes
config-schema.mjs # Config (schemastery)
llm.mjs # Lightweight host LLM wrapper (for draft writing)
hostdeps.mjs # Retrieve z / defineTool from the host
client.js # Settings panel card (settings.section)
panel.css # Card styles
src/
parse.mjs # Parse note/comment responses
draft.mjs # Article prompt + draft assembly
core.mjs # Business core: cache/rate limiting/search/note/draft
test/syntax.mjs # Smoke test (node test/syntax.mjs)
cordis.patch.yml
package.json
Compliance Notes¶
This plugin is designed on the premise of low-frequency, single-account, and manually triggered usage. Comments are aggregated for display only; personally identifiable information is not retained, and no redistribution takes place. It is recommended to use an account unrelated to your primary account.
Use Cases & Cautions¶
Suitable for DSH agent developers who need stable access to Xiaohongshu content and draft generation. The plugin runs with the current DSH process privileges; review the source code and license before use. The community catalog has no official affiliation with DeepSeek / High-Flyer; this plugin is a community-maintained project.
Summary¶
This plugin uses a dedicated Chrome instance and CDP to intercept Xiaohongshu API responses, providing DSH with capabilities for connection, search, detail fetching, comment aggregation, and draft generation. It is well-suited for agent scenarios that require access to Xiaohongshu data.
Catalog & GitHub¶
- Catalog Page: https://www.skillhub.cn/plugins/N006Unnamed/dsh-xhs
- GitHub: https://github.com/N006Unnamed/dsh-xhs