Introduction¶
When developing agents with DeepSeek Harness (DSH), you often encounter scenarios that require direct interaction with third-party services (such as NetEase Cloud Music). Common approaches include asking the user to scan a QR code to log in or providing a Cookie — the former interrupts the workflow, while the latter writes sensitive credentials to disk, which fails to meet security requirements. This plugin reuses the login session of the local desktop client, allowing the agent to perform playlist CRUD operations and downloads in memory under the current user’s privileges via the NetEase Cloud Music API. When no client is present, it gracefully degrades to anonymous read-only access.
Overview¶
@chenhao6682108/dsh-skill-netease-playlist is a DSH skill plugin that registers the netease-playlist skill into Harness. It does not rely on browser automation, nor does it write Cookies to files. Instead, it leverages the encrypted SQLite storage and Windows DPAPI built into the NetEase Cloud Music desktop client’s embedded Chromium (CEF) to decrypt and reuse the login session within the current user’s process, and performs operations through the weapi endpoints.
The plugin runs on Windows with Node ≥ 22.5, is installed and registered via dsh plugin, and the agent invokes CLI subcommands to manage playlists and perform batch imports.
Core Capabilities¶
The plugin provides two operating modes:
- Client mode: The local NetEase Cloud Music client is logged in and running under the same user as dsh; both read and write operations are performed via the authenticated session.
- Anonymous read-only mode: When no client is present or the user is not logged in,
search/listfall back to public endpoints with consistent output formatting; write operations return exit code 2 with messages such as “not created / not written / simulated” — no false successes are reported.
Key commands:
ne env [--json] # Capability matrix: mode / client / credentials / read-write / anonymous accessibility
ne login # Verify login state, print nickname and uid
ne search <keyword> # Search tracks (falls back to anonymous search when no client)
ne create / rename / desc / privacy # Create playlist, edit name, description, privacy (public/private)
ne add / remove / list / delete # Add tracks (--order preserves given order), remove, list, delete playlist
ne download <id> # Download each track in a playlist as local mp3 (320k, resumable)
ne import-mbp [target] --groups a,b # Batch-import MusicBee .mbp playlists: parse → read tags → fuzzy match → create → add in order → verify; --sync aligns cloud playlist after local changes
Installation & Activation¶
Install the plugin (choose one of three):
dsh plugin --profile web add @chenhao6682108/dsh-skill-netease-playlist # npm (after publish)
dsh plugin --profile web add github:chenhao6682108/dsh-skill-netease-playlist # directly from repo
dsh plugin --profile web add . # install from local checkout
After installation, restart dsh web and the netease-playlist skill will appear in the skill directory. To uninstall, run:
dsh plugin --profile web remove @chenhao6682108/dsh-skill-netease-playlist
Typical Usage¶
- Verify login state:
ne login
- Search for tracks and create a playlist:
ne search "jazz"
ne create "Jazz Collection"
ne add <trackID1> <trackID2> --order
- Download a playlist:
ne download <playlistID>
- Batch-import a MusicBee playlist:
ne import-mbp "MusicBee Playlists" --groups a,b
In scenarios without a client (sandbox / evaluation / CI):
node scripts\ne.mjs env --json # mode=anon, writes=blocked
node scripts\ne.mjs search "keyword" # anonymous search, consistent output format
node scripts\ne.mjs create "name" # blocked: exit code 2 + explanation
Use Cases & Notes¶
This plugin is suitable for scenarios where you need to manage NetEase Cloud Music playlists directly from a DSH agent, especially when synchronization with a local MusicBee library is required. The plugin runs under the current user’s privileges; since DPAPI cannot decrypt across users, you must ensure that the NetEase Cloud Music desktop client and dsh run under the same Windows user account.
Notes:
- When adding tracks, the internal API processes them in batches of 25 in reverse order;
--orderalready applies the reversal at submission time, so the displayed order matches the given order. After editing a playlist, if you need to preserve the track order, it is recommended to “clear and rebuild.” - Write endpoints occasionally return 404; the CLI automatically retries 3 times with a 1.5-second interval between attempts.
- Renaming and privacy settings take effect only via the
/api/playlist/update/*endpoints. - Search results may include variants such as covers, remixes, and live recordings; during import, entries are scored by title/artist/duration and original recordings are never replaced.
- Downloads require
weapi/song/enhance/download/url/v1; streaming CDN URLs return 403. - The
.mbpfile prefix length varies per library; the parser probes offsets in the range of 40–120 and requires an exact match at the end of the file. - Without a client, read operations use anonymous public endpoints (with graceful fallback), and write operations are always blocked. See SKILL.md section “Zero·B” for details.
Conclusion¶
This plugin embeds NetEase Cloud Music playlist management directly into the DSH skill ecosystem, preserving the security of the current user’s login session while providing predictable anonymous read-only access when no client is available. It is well-suited for engineering use cases that require batch playlist operations at the agent level, synchronization with local players, or direct music downloads.
- Directory page: https://www.skillhub.cn/plugins/chenhao6682108/dsh-skill-netease-playlist
- Repository: https://github.com/chenhao6682108/dsh-skill-netease-playlist