Files
dsh-acfun/skills/plugin-tool-acfun/SKILL.md
T
tamakyi f9bedde19e feat: AcFun tools plugin for DeepSeek Harness
Eight tools (search, video, comments, danmaku, rank, playurl, interact,
post_comment) over acfun.cn's public web API, a model-facing skill, a
bundle patch with a skill-filesystem row, and offline/live checks.

Reads are anonymous; writes require allowWriteActions plus a login cookie.
2026-10-27 11:26:51 +08:00

54 lines
3.0 KiB
Markdown

---
name: acfun
description: Use DeepSeek Harness's AcFun (A站, acfun.cn) tools to search videos, read video metadata, comment threads, danmaku, the day/week ranking, and playable m3u8 URLs; also like/unlike, tip bananas, favorite, follow, and post comments when the user has enabled AcFun write actions. Use when the user asks about AcFun / A 站 videos, wants a video's details, comments or 弹幕, the A 站 ranking, a playable/downloadable stream URL, or asks to interact on AcFun.
---
# AcFun tools
Eight tools talk to acfun.cn through the `dsh-plugin-acfun` bundle. Six are
anonymous reads; two can mutate the configured account and are disabled unless
the user opted in.
## Read workflow
1. `acfun_search` — keyword search. Pass `sort: "views"` only when the user wants
popular videos; AcFun returns at most its first 30 results and ignores paging,
so say so instead of retrying with `page`.
2. `acfun_video` — full metadata for one `acId`. Accepts `42588725`,
`ac42588725`, or `https://www.acfun.cn/v/ac42588725`.
3. `acfun_comments` — one comment page in floor order; pass
`page: previous.page + 1` while `hasMore` is true. Comment ids are usable as
`replyToCommentId`.
4. `acfun_danmaku` — one danmaku batch ordered by in-video position; pass
`cursor: previous.nextCursor` while it is non-empty.
5. `acfun_rank` — `period: "day" | "week"`, `channelId: 0` for all channels.
6. `acfun_playurl` — m3u8 ladder; name a `quality` such as `"720P"` or omit it
for the highest. URLs are time-limited, so do not cache them in prose.
## Interaction workflow
`acfun_interact` (`like`, `unlike`, `banana`, `favorite`, `unfavorite`,
`follow`, `unfollow`) and `acfun_post_comment` require
`allowWriteActions: true` plus a login cookie in the plugin config.
- Only act when the user explicitly asked for that interaction. Do not "helpfully"
like, follow, favorite, or comment on something you merely read.
- Before a mutating call, state what will happen and on which video/user. For
comments, show the exact text if the user did not already dictate it.
- Make the call at most once. If the result is ambiguous, re-read with
`acfun_video` / `acfun_comments` instead of repeating the mutation.
- `WRITE_DISABLED` means `allowWriteActions` is false; `LOGIN_REQUIRED` means the
cookie is missing or expired. Report the exact missing config key and stop —
do not retry the same call.
- `CAPTCHA_REQUIRED` means AcFun wants an interactive verification; ask the user
to complete it in a browser, then continue later.
## Citing and reporting
- When you use a video's content, cite its `url` as a markdown link.
- Prefer the compact tables/lists the tools render; do not dump raw JSON.
- Mention the limitations that affect the answer: search cannot paginate, bangumi
and article pages are unsupported, and play URLs expire.
- Never invent fields the tools did not return. Counts that AcFun only exposes as
formatted text (`likeCountText`, `commentCountText`) must be quoted as text.