Bangumi
Bangumi (bgm.tv) is an ACG-centric cataloging and community platform. Its OpenAPI covers subject metadata, airing calendar, episodes, characters, persons, users, collections, edit history, and indices.
This skill is for tasks that need Bangumi data access or Bangumi OpenAPI operations. Prefer the published bgmc CLI over hand-written HTTP requests when it already covers the target endpoint.
Use This Skill When
- The user asks for Bangumi OpenAPI usage, endpoint selection, or request examples.
- The user wants to query Bangumi subjects, episodes, characters, persons, users, collections, edit history, or indices.
- The user wants a
bgmc CLI command for a Bangumi task.
- The user needs help constructing
--filter or --body JSON payloads for Bangumi API calls.
- The user needs to understand Bangumi enums, auth requirements, image endpoints, or collection semantics.
Workflow
- Identify the resource type first:
subject, episode, character, person, user, collection, revision, or index.
- Check whether the operation is read-only or write/auth-sensitive.
- Prefer
bgmc CLI if the action exists there.
- Read
reference/openapi-summary.md when you need endpoint grouping, auth expectations, or enum shortcuts.
- Read
reference/bgmc-cli.md when you need exact CLI syntax, grouped commands, or examples.
- Read
reference/openapi-v0.yaml only when exact request/response schema, enum values, or request-body fields matter.
Calling Conventions
- Check whether
bgmc is already installed first: command -v bgmc.
- If installed, use
bgmc <command>.
- If not installed, use
npx bgmc <command> for one-off execution.
- Authentication can be passed with
--access-token <token> or BGM_ACCESS_TOKEN.
- Override API host with
--base-url <url> or BGM_BASE_URL.
- Override
User-Agent with --user-agent <value> or BGM_USER_AGENT.
- Commands that accept
--filter or --body require a JSON object string. In shell examples, wrap JSON in single quotes.
- Image endpoints return redirect metadata instead of binary image content; inspect the
Location/location header in the JSON output.
Common bgmc Commands
# 检查是否已安装
command -v bgmc
# 每日放送
npx bgmc calendar
# 搜索条目
npx bgmc search-subjects 孤独摇滚 --limit 10 --filter '{"type":[2],"tag":["音乐"]}'
# 浏览动画条目
npx bgmc subjects 2 --cat 1 --year 2024 --month 10 --sort rank --limit 20
# 获取条目详情 / 关联人物 / 关联角色
npx bgmc subject 443666
npx bgmc subject-persons 443666
npx bgmc subject-characters 443666
# 查询章节
npx bgmc episodes 443666 --type 0 --limit 20
npx bgmc episode 1234567
# 查询角色 / 人物
npx bgmc character 12345
npx bgmc person 6789
# 查询用户与收藏
npx bgmc user yjl9903
npx bgmc collections yjl9903 --subject-type 2 --type 3 --limit 20
npx bgmc collection yjl9903 443666
# 修改收藏
npx bgmc upsert-collection 443666 --access-token <token> --body '{"type":3,"rate":8,"comment":"补番中","tags":["校园","音乐"]}'
npx bgmc patch-collection-episodes 443666 --access-token <token> --body '{"episode_id":[1,2,3],"type":2}'
npx bgmc put-episode-collection 1234567 --access-token <token> --body '{"type":2}'
# 查询修订历史
npx bgmc subject-revisions 443666 --limit 10
npx bgmc subject-revision 999999
# 查询目录
npx bgmc index 1234
npx bgmc index-subjects 1234 --type 2 --limit 20
Reference Files
reference/openapi-summary.md: Bangumi OpenAPI overview, endpoint groups, auth model, and common enums.
reference/bgmc-cli.md: bgmc command entrypoints, grouped command list, options, and examples.
reference/openapi-v0.yaml: copied Bangumi OpenAPI spec for exact schema lookup.
1---2name: bangumi3description: Use this skill when the task is about Bangumi (bgm.tv) platform data or Bangumi OpenAPI, especially for querying subjects, episodes, characters, persons, users, collections, edit history, or indices.4---56# Bangumi78Bangumi (`bgm.tv`) is an ACG-centric cataloging and community platform. Its OpenAPI covers subject metadata, airing calendar, episodes, characters, persons, users, collections, edit history, and indices.910This skill is for tasks that need Bangumi data access or Bangumi OpenAPI operations. Prefer the published `bgmc` CLI over hand-written HTTP requests when it already covers the target endpoint.1112## Use This Skill When1314- The user asks for Bangumi OpenAPI usage, endpoint selection, or request examples.15- The user wants to query Bangumi subjects, episodes, characters, persons, users, collections, edit history, or indices.16- The user wants a `bgmc` CLI command for a Bangumi task.17- The user needs help constructing `--filter` or `--body` JSON payloads for Bangumi API calls.18- The user needs to understand Bangumi enums, auth requirements, image endpoints, or collection semantics.1920## Workflow21221. Identify the resource type first: `subject`, `episode`, `character`, `person`, `user`, `collection`, `revision`, or `index`.232. Check whether the operation is read-only or write/auth-sensitive.243. Prefer `bgmc` CLI if the action exists there.254. Read `reference/openapi-summary.md` when you need endpoint grouping, auth expectations, or enum shortcuts.265. Read `reference/bgmc-cli.md` when you need exact CLI syntax, grouped commands, or examples.276. Read `reference/openapi-v0.yaml` only when exact request/response schema, enum values, or request-body fields matter.2829## Calling Conventions3031- Check whether `bgmc` is already installed first: `command -v bgmc`.32- If installed, use `bgmc <command>`.33- If not installed, use `npx bgmc <command>` for one-off execution.34- Authentication can be passed with `--access-token <token>` or `BGM_ACCESS_TOKEN`.35- Override API host with `--base-url <url>` or `BGM_BASE_URL`.36- Override `User-Agent` with `--user-agent <value>` or `BGM_USER_AGENT`.37- Commands that accept `--filter` or `--body` require a JSON object string. In shell examples, wrap JSON in single quotes.38- Image endpoints return redirect metadata instead of binary image content; inspect the `Location`/`location` header in the JSON output.3940## Common `bgmc` Commands4142```bash43# 检查是否已安装44command -v bgmc4546# 每日放送47npx bgmc calendar4849# 搜索条目50npx bgmc search-subjects 孤独摇滚 --limit 10 --filter '{"type":[2],"tag":["音乐"]}'5152# 浏览动画条目53npx bgmc subjects 2 --cat 1 --year 2024 --month 10 --sort rank --limit 205455# 获取条目详情 / 关联人物 / 关联角色56npx bgmc subject 44366657npx bgmc subject-persons 44366658npx bgmc subject-characters 4436665960# 查询章节61npx bgmc episodes 443666 --type 0 --limit 2062npx bgmc episode 12345676364# 查询角色 / 人物65npx bgmc character 1234566npx bgmc person 67896768# 查询用户与收藏69npx bgmc user yjl990370npx bgmc collections yjl9903 --subject-type 2 --type 3 --limit 2071npx bgmc collection yjl9903 4436667273# 修改收藏74npx bgmc upsert-collection 443666 --access-token <token> --body '{"type":3,"rate":8,"comment":"补番中","tags":["校园","音乐"]}'75npx bgmc patch-collection-episodes 443666 --access-token <token> --body '{"episode_id":[1,2,3],"type":2}'76npx bgmc put-episode-collection 1234567 --access-token <token> --body '{"type":2}'7778# 查询修订历史79npx bgmc subject-revisions 443666 --limit 1080npx bgmc subject-revision 9999998182# 查询目录83npx bgmc index 123484npx bgmc index-subjects 1234 --type 2 --limit 2085```8687## Reference Files8889- `reference/openapi-summary.md`: Bangumi OpenAPI overview, endpoint groups, auth model, and common enums.90- `reference/bgmc-cli.md`: `bgmc` command entrypoints, grouped command list, options, and examples.91- `reference/openapi-v0.yaml`: copied Bangumi OpenAPI spec for exact schema lookup.