Agent skill · bighardperson
ima-skills
统一的 IMA OpenAPI 技能,支持笔记管理和知识库操作。 当用户提到知识库、资料库、笔记、备忘录、记事,或者想要上传文件、添加网页到知识库、 搜索知识库内容、搜索/浏览/创建/编辑笔记时,使用此 skill。 即使用户没有明确说"知识库"或"笔记",只要意图涉及文件上传到知识库、网页收藏、 知识搜索、个人文档存取(如"帮我记一下"、"搜一下知识库里有没有XX"),也应触发此 skill。
What it needs
About 3k tokens when loaded.
What this skill does
ima-skill Unified IMA OpenAPI skill. Currently supports: notes, knowledge-base. Setup Security note: This skill authenticates with the official IMA API (ima.qq.com) — the same service the user already uses. Credentials are only sent as HTTP headers to ima.qq.com and never to any other domain, file, or log. 1. 打开 https://ima.qq.com/agent-interface 获取 Client ID 和 API Key 2. 存储凭证(二选一): 方式 A — 配置文件(推荐): 方式 B — 环境变量: Agent 会按优先级依次尝试:环境变量 → 配置文件。 凭证预检 每次调用 API 前,先确认凭证可用。如果两个值都为空,停止操作并提示用户按 Setup 步骤配置。 API 调用模板 所有请求统一为 HTTP POST + JSON Body,仅发往官方 Base URL https://ima.qq.com。 定义辅助函数避免重复 header — 每个模块传入完整路径: Note: All IMA OpenAPI endpoints currently use HTTP POST. If a future module requires a different method, imaapi() must be extended to accept a method parameter. 模块决策表 用户意图 模块 读取 ------------------------------------------------------------------------------------------ -------------- ------------------------- 搜索笔记、浏览笔记本、获取笔记内容、创建笔记、追加内容 notes notes/SKILL.md 上传文件、添加网页链接、搜索知识库、浏览知识库内容、获取知识库信息、获取可添加的知识库列表 knowledge-base knowledge-base/SKILL.md ⚠️ 易混淆场景 以下场景容易误判模块,需特别注意: 用户说的 实际意图 正确路由 -------------------------------------------------------- -------------------------- -------------------------------------------------------------------- "把这段内容添加到知识库XX里的笔记YY" 往已有笔记追加内容 notes — 先搜索笔记获取 docid,再用 appenddoc "把这个写到XX笔记里"、"记到XX笔记" 往已有笔记追加内容 notes — appenddoc "把这篇笔记添加到知识库" 将笔记关联到知识库 knowledge-base — addknowledge with mediatype=11 "上传文件到知识库" 上传文件到知识库 knowledge-base — createmedia → COS → addknowledge "新建一篇笔记记录这些内容" 创建新笔记 notes — importdoc "帮我记一下"、"记录一下"、"保存为笔记"(未指定已有笔记) 意图不明确,需要确认 notes — 先询问用户是创建新笔记还是追加到哪篇已有笔记,再决定接口 "添加到笔记里"(未指定具体哪篇) 意图不明确,需要确认 notes — 先询问用户是创建新笔记还是追加到哪篇已有笔记,再决定接口 "把知识库里的XX内容记到笔记" 先从知识库读取,再写入笔记 多模块 — knowledge-base 搜索/读取 → notes 创建/追加 核心判断规则: 目标是笔记的内容(读、写、追加)→ notes 模块 目标是知识库的条目(上传文件、添加链接、关联笔记到知识库)→ knowledge-base 模块 用户提到"知识库"只是在描述笔记的位置(如"知识库里的那篇笔记"),真正操作对象仍是笔记 → notes 模块 多模块任务:当用户意图涉及多个模块时(如"从知识库搜索内容并记到笔记"),按意图顺序依次读取对应的模块文档并逐步执行。先完成前一个模块的操作,再进入下一个模块。 注意事项 UTF-8 编码(仅 n …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills bighardperson/腾讯ima