bilibili-to-ima-note
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "bilibili-to-ima-note":https://skillpi.com/zh/skills/deepskill-109cef0973d50c2a74a8942068c6b7d8347fc3b184a25153a73a013ca0a173f2。安装前核对上游来源和版本:https://skillhub.cn/skills/user_0e231422/bilibili-to-ima-note。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
当用户分享哔哩哔哩视频链接并希望生成结构化笔记并保存到 IMA 知识库时使用。本技能涵盖:从 URL 提取 BV 号、通过哔哩哔哩 API 获取视频信息/元数据、生成结构化 Markdown 笔记,并通过 OpenAPI 创建或更新 IMA 笔记,笔记中附带视频链接。也可由包含“记笔记”且带哔哩哔哩链接的请求触发。
介绍来源: third_party · user_0e231422 · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- This skill should be used when the user shares a Bilibili video URL (bilibili.com) and wants to generate structured notes, summaries, or study notes from the video, then save them to IMA (ima知识库) notes automatically. It covers: extracting BV ID from URL, fetching video info/metadata via Bilibili API, generating structured markdown notes, creating/updating IMA notes via OpenAPI, and appending the video link. Also triggered by requests like \"记笔记\" combined with a Bilibili link.
- 实测状态
- 未测试
文件浏览
Frontmatter
name: bilibili-to-ima-note
description: "This skill should be used when the user shares a Bilibili video URL (bilibili.com) and wants to generate structured notes, summaries, or study notes from the video, then save them to IMA (ima知识库) notes automatically. It covers: extracting BV ID from URL, fetching video info/metadata via Bilibili API, generating structured markdown notes, creating/updating IMA notes via OpenAPI, and appending the video link. Also triggered by requests like \"记笔记\" combined with a Bilibili link."Bilibili to IMA Note
Overview
Fetch Bilibili video metadata via official API, generate structured markdown notes, and save them to IMA (ima知识库) notes via the IMA OpenAPI. When a note already exists for the same video, append the new content and video link.
Prerequisites
IMA Credentials
IMA credentials must be stored at one of:
~/.config/ima/client_id— Client ID~/.config/ima/api_key— API Key
Or set as environment variables:
IMA_OPENAPI_CLIENTIDIMA_OPENAPI_APIKEY
IMA API Script
The IMA OpenAPI wrapper script is located at the pre-installed ima-skill:
~/.workbuddy/skills/skill_2053082144792322048/ima_api.cjs
Always use the full absolute path to this script. Do NOT rely on PATH.
Node.js Runtime
Use the managed Node.js binary:
C:\Users\枉凝眉\.workbuddy\binaries\node\versions\22.22.2\node.exe
Workflow
Step 1: Extract BV ID and Fetch Video Info
Given a Bilibili URL (e.g. https://www.bilibili.com/video/BV1ctjm67EiY/), extract the BV ID (the BV followed by alphanumeric characters in the URL path).
Fetch video metadata from the official Bilibili API:
https://api.bilibili.com/x/web-interface/view?bvid={BV_ID}
Key fields to extract from the response data object:
title— video titleowner.name— UP主 nameowner.mid— UP主 midduration— video duration in secondsdesc— video descriptionstat— stats (view, like, favorite, coin, share, reply)tid/tname— categorypubdate— publish timestamp (Unix)
Step 2: Generate Structured Notes
Generate markdown notes covering the following structure:
# {Title}
> **视频信息**
> - UP 主:{name}
> - 时长:{duration}秒({minutes}分{seconds}秒)
> - 来源:Bilibili({bvid})
> - 标签:{tags}
---
## 内容概要
[Generate a comprehensive summary of the video based on the title and description.
If description is limited, infer likely content from the title and category.]
---
## 关键知识点
[Organize key points from the video into structured sections with bullet points.]
---
## 总结
[1-2 paragraph summary of the key takeaways.]
Step 3: Save to IMA
Use the IMA OpenAPI to create a note:
node "{IMA_API_SCRIPT}" "openapi/note/v1/import_doc" '{"content_format": 1, "content": "{MARKDOWN_CONTENT_ESCAPED}"}' '{"clientId":"{CLIENT_ID}","apiKey":"{API_KEY}"}'
IMPORTANT — Proper escaping: The content field contains markdown with special characters. Use one of these approaches:
Approach A — Node.js script (preferred): Write a small .cjs script that reads the content from a file, constructs the JSON body programmatically, then calls imaApi by requiring ima_api.cjs directly.
Example:
const path = require('path');
const SKILL_DIR = 'C:/Users/枉凝眉/.workbuddy/skills/skill_2053082144792322048';
const { imaApi } = require(path.join(SKILL_DIR, 'ima_api.cjs'));
const opts = {
clientId: 'XXXX',
apiKey: 'XXXX'
};
(async () => {
const r = await imaApi('openapi/note/v1/import_doc', {
content_format: 1,
content: '... markdown ...'
}, opts);
console.log('RESULT:', r);
})().catch(e => console.error('ERR:', e.message || e.msg || e));
Approach B — Search then append (if note may already exist): Before creating, search for existing notes by title using search_note. If found, use append_doc instead of import_doc to add content to the existing note.
Search:
openapi/note/v1/search_note
Body: {"search_type": 0, "query_info": {"title": "关键词"}, "start": 0, "end": 5}
Append (if note exists):
openapi/note/v1/append_doc
Body: {"note_id": "EXISTING_NOTE_ID", "content_format": 1, "content": "\n\n---\n\n[追加的新内容]"}
Step 4: Append Video Link
After creating the note, append the video link at the end:
openapi/note/v1/append_doc
Body: {"note_id": "NOTE_ID", "content_format": 1, "content": "\n\n---\n\n> **视频链接**:[点击观看原视频]({VIDEO_URL})"}
Credential Handling
Credentials are read by ima_api.cjs automatically from:
- Options JSON passed as 3rd argument (highest priority)
- Environment variables
IMA_CLIENT_ID/IMA_API_KEY/IMA_OPENAPI_CLIENTID/IMA_OPENAPI_APIKEY - Files
~/.config/ima/client_idand~/.config/ima/api_key
When calling directly, pass credentials via the options JSON in the 3rd argument. When credentials are stored in the config files, the third argument can be '{}' or omitted entirely.
Error Handling
- Bilibili API fails: Try fetching again. If the API returns
code !== 0, report the error message to the user. - IMA API fails (
-100programmatic error): Check credentials first, then retry. - IMA API fails (
-200update available): Follow the update instruction to update the ima-skill, then retry. - Content too large: Split into multiple
append_doccalls. - PowerShell encoding: If running in PowerShell 5.1, the request body will be silently converted to GBK. Either use Git Bash, PowerShell 7+, or the UTF-8 byte array workaround. See the ima-skill SKILL.md for details.
Platform Notes
- Git Bash (Bash tool): Use forward slashes for paths. The managed node binary works with full paths.
- PowerShell: PowerShell 5.1 silently encodes request body as GBK. Use UTF-8 byte array mode or switch to Git Bash. Prefer Git Bash for IMA API calls.
- Python managed runtime: Available at
C:\Users\枉凝眉\.workbuddy\binaries\python\versions\3.13.12\python.exe - Node.js managed runtime: Available at
C:\Users\枉凝眉\.workbuddy\binaries\node\versions\22.22.2\node.exe
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决用户从 Bilibili 视频生成结构化学习笔记的实际需求
- 具备明确的场景定位和广泛的实用价值
亮点
- 触发词精准完整,覆盖多种用户表达变体
- 边界清晰,不易与其他 Skill 重叠
待提升项
-
缺少 When to Use 显式章节 原报告严重程度:轻微
文档结构完整但未显式标注 When to Use 章节
改进建议:建议在 Overview 后添加显式的 When to Use 章节以提升可读性
亮点
- Phase/步骤划分清晰,执行流程明确
- 包含完整的端到端示例和错误处理说明
亮点
- 工具来源明确,参数使用正确
- 覆盖主要异常场景并提供解决方案
- 对平台差异(PowerShell/Git Bash)有详细说明
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 13, 15, 17, 95, 109 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- api.bilibili.com
- www.bilibili.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。