| name | ima-skills |
| description | 统一的 IMA OpenAPI 技能,支持笔记管理和知识库操作。
当用户提到知识库、资料库、笔记、备忘录、记事,或者想要上传文件、添加网页到知识库、
搜索知识库内容、搜索/浏览/创建/编辑笔记时,使用此 skill。
即使用户没有明确说"知识库"或"笔记",只要意图涉及文件上传到知识库、网页收藏、
知识搜索、个人文档存取(如"帮我记一下"、"搜一下知识库里有没有XX"),也应触发此 skill。
|
| description_zh | ima笔记与知识库管理(读取、写入、检索、上传文件) |
| description_en | IMA notes & knowledge base management (read, write, search, upload) |
| version | 1.1.2 |
| homepage | https://ima.qq.com |
| metadata | {"openclaw":{"emoji":"🔧","requires":{"env":["IMA_OPENAPI_CLIENTID","IMA_OPENAPI_APIKEY"]},"primaryEnv":"IMA_OPENAPI_CLIENTID"},"security":{"credentials_usage":"This skill requires user-provisioned IMA OpenAPI credentials (Client ID and API Key)\nto authenticate with the official IMA API at https://ima.qq.com.\nCredentials are ONLY sent to the official IMA API endpoint (ima.qq.com) as HTTP headers.\nNo credentials are logged, stored in files, or transmitted to any other destination.\n","allowed_domains":["ima.qq.com"]}} |
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.
- 打开 https://ima.qq.com/agent-interface 获取 Client ID 和 API Key
- 存储凭证(二选一):
方式 A — 配置文件(推荐):
mkdir -p ~/.config/ima
echo "your_client_id" > ~/.config/ima/client_id
echo "your_api_key" > ~/.config/ima/api_key
方式 B — 环境变量:
export IMA_OPENAPI_CLIENTID="your_client_id"
export IMA_OPENAPI_APIKEY="your_api_key"
Agent 会按优先级依次尝试:环境变量 → 配置文件。
凭证预检
每次调用 API 前,先确认凭证可用。如果两个值都为空,停止操作并提示用户按 Setup 步骤配置。
IMA_CLIENT_ID="${IMA_OPENAPI_CLIENTID:-$(cat ~/.config/ima/client_id 2>/dev/null)}"
IMA_API_KEY="${IMA_OPENAPI_APIKEY:-$(cat ~/.config/ima/api_key 2>/dev/null)}"
if [ -z "$IMA_CLIENT_ID" ] || [ -z "$IMA_API_KEY" ]; then
echo "缺少 IMA 凭证,请按 Setup 步骤配置 Client ID 和 API Key"
exit 1
fi
API 调用模板
所有请求统一为 HTTP POST + JSON Body,仅发往官方 Base URL https://ima.qq.com。
定义辅助函数避免重复 header — 每个模块传入完整路径: