| name | ima-notes |
| name_en | ima-notes |
| description | 统一的 IMA OpenAPI 技能,支持笔记管理和知识库操作。当用户提到知识库、资料库、笔记、备忘录、记事,或者想要上传文件、添加网页到知识库、搜索知识库内容、搜索/浏览/创建/编辑笔记时,使用此技能。 |
| description_en | Unified IMA OpenAPI skill for notes and knowledge base management. Supports creating notes, searching content, uploading files to knowledge base, and web clipping. Ideal for personal knowledge management and information organization. |
| version | 1.1.2 |
| homepage | https://ima.qq.com |
| author | 度量衡智库 |
| author_en | Duliangheng Think Tank |
| metadata | {"openclaw":{"emoji":"🔧","requires":{"env":"[Truncated]"},"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 — 每个模块传入完整路径: