You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SKILL.md
+22-11Lines changed: 22 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: bilibili-cli
3
-
description: CLI skill for Bilibili (哔哩哔哩, B站) to browse videos, users, search, trending, dynamics, favorites, and interactions from the terminal
3
+
description: CLI skill for Bilibili (哔哩哔哩, B站) with token-efficient YAML output for AI agents to browse videos, users, search, trending, dynamics, favorites, and interactions from the terminal
4
4
author: jackwener
5
5
version: "1.0.0"
6
6
tags:
@@ -16,6 +16,15 @@ tags:
16
16
17
17
A CLI tool for interacting with Bilibili (哔哩哔哩). Use it to fetch video info, search content, browse user profiles, and perform interactions like liking or triple-clicking.
18
18
19
+
## Agent Defaults
20
+
21
+
When you need machine-readable output:
22
+
23
+
1. Prefer `--yaml` first because it is usually more token-efficient than pretty JSON.
24
+
2. Use `--json` only when downstream tooling strictly requires JSON.
25
+
3. Keep result sets small with `--max`, `--page`, or `--offset`.
26
+
4. Prefer specific commands over broad ones. Example: use `bili user-videos 946974 --max 3 --yaml` instead of fetching large timelines.
27
+
19
28
## Prerequisites
20
29
21
30
```bash
@@ -53,6 +62,7 @@ bili video BV1ABcsztEcY --subtitle # Show subtitles (AI or uploaded)
53
62
bili video BV1ABcsztEcY --ai # Show B站 AI summary
54
63
bili video BV1ABcsztEcY --comments # Show top comments
55
64
bili video BV1ABcsztEcY --related # Show related videos
65
+
bili video BV1ABcsztEcY --yaml # Token-efficient YAML output
56
66
bili video BV1ABcsztEcY --json # Raw JSON output
57
67
```
58
68
@@ -65,7 +75,7 @@ bili user "影视飓风"
65
75
66
76
# List user's videos
67
77
bili user-videos 946974 --max 20
68
-
bili user-videos "影视飓风" --json
78
+
bili user-videos "影视飓风" --yaml
69
79
```
70
80
71
81
### Search
@@ -134,19 +144,20 @@ bili unfollow 946974 # Unfollow by UID
134
144
```bash
135
145
bili status # Quick login check
136
146
bili whoami # Detailed profile info
147
+
bili whoami --yaml # Profile as YAML
137
148
bili whoami --json # Profile as JSON
138
149
bili login # QR code login
139
150
bili logout# Clear credentials
140
151
```
141
152
142
-
## JSON Output
153
+
## Structured Output
143
154
144
-
Major query commands support `--json` for machine-readable output:
155
+
Major query commands support both `--yaml` and `--json` for machine-readable output. Prefer YAML for agent use:
145
156
146
157
```bash
147
-
bili video BV1ABcsztEcY --json | jq '.stat.view'# Get view count
148
-
bili hot --json | jq '.list[0].title'# First trending title
149
-
bili user 946974 --json | jq '.user_info.name'# Username
158
+
bili video BV1ABcsztEcY --yaml # Preferred for AI agents
159
+
bili hot --max 5 --yaml # Smaller, token-efficient payload
160
+
bili user 946974 --json | jq '.user_info.name'# JSON when jq is needed
150
161
```
151
162
152
163
## Debugging
@@ -171,14 +182,14 @@ bili video BV1ABcsztEcY --comments
171
182
# Segments are saved to /tmp/bilibili-cli/{title}/seg_000.wav, seg_001.wav, ...
0 commit comments