ima-skill
统一的 IMA OpenAPI 技能,支持笔记管理和知识库操作。 当用户提到知识库、资料库、笔记、备忘录、记事,或者想要上传文件、添加网页到知识库、 搜索知识库内容、搜索/浏览/创建/编辑笔记时,使用此 skill。 即使用户没有明确说"知识库"或"笔记",只要意图涉及文件上传到知识库、网页收藏、…
Skill by liuxie066
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/liuxie066-ima-skill
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/ima-skill
What's inside
- Skill name
ima-skill- Description
- 统一的 IMA OpenAPI 技能,支持笔记管理和知识库操作。 当用户提到知识库、资料库、笔记、备忘录、记事,或者想要上传文件、添加网页到知识库、 搜索知识库内容、搜索/浏览/创建/编辑笔记时,使用此 skill。 即使用户没有明确说"知识库"或"笔记",只要意图涉及文件上传到知识库、网页收藏、 知识搜索、个人文档存取(如"帮我记一下"、"搜一下知识库里有没有XX"),也应触发此 skill。
- License
- MIT
- Metadata
- homepage: https://ima.qq.com
- Instructions
- 256 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions read files in your home folder (~/.ssh, ~/.aws…)
Files (9)
- SKILL.md
- ima_api.cjs
- GUIDE.md · knowledge-base/
- api.md · knowledge-base/references/
- cos-upload.cjs · knowledge-base/scripts/
- preflight-check.cjs · knowledge-base/scripts/
- meta.json
- GUIDE.md · notes/
- api.md · notes/references/
SKILL.md (first lines)
# ima-skill
Unified IMA OpenAPI skill. Currently supports: **notes**, **knowledge-base**.
## ⛔ MANDATORY RULES — read before ANY operation
1. **UTF-8 encoding (notes writes only):** Before calling `import_doc` or `append_doc`, ALL string fields (`content`, `title`) MUST be validated as legal UTF-8. Non-UTF-8 content causes irreversible garbled text. See [Detailed Rules](#detailed-utf-8-encoding-rules) for platform-specific methods.
2. **File upload naming:** `title` MUST equal `file_name` (with extension). Never rename, shorten, translate, or modify the original filename.
3. **Unsupported file types:** Reject immediately with a clear message. Do NOT ask user "do you still want to try?" Video files, Bilibili/YouTube URLs, and `file://` URLs are not supported — tell user to use IMA desktop client.
4. **File upload integrity:** Keep file content as-is during upload. No encoding conversion for binary files (PDF, images, Excel, etc.).
5. **PowerShell 5.1 (all modules):** If running in PowerShell, detect version before first API call. PS 5.1 silently converts request Body to GBK — must use UTF-8 byte array mode. See [Detailed Rules](#powershell-51-environment-detection).
## 模块决策表
| 用户意图 | 模块 | 读取 |
| ------------------------------------------------------------------------------------------ | -------------- | ------------------------- |
| 搜索笔记、浏览笔记本、获取笔记内容、创建笔记、追加内容 | notes | `notes/GUIDE.md` |
| 上传文件、添加网页链接、搜索知识库、浏览知识库内容、获取知识库信息、获取可添加的知识库列表 | knowledge-base | `knowledge-base/GUIDE.md` |
| 查看原文、分析原文、导出原文(需要 media_id) | knowledge-base | `knowledge-base/GUIDE.md` |
### ⚠️ 易混淆场景
| 用户说的 | 实际意图 | 正确路由 |
| -------------------------------------------------------- | ------------------------ | ----------------------------------------------------------- |
| "把这段内容添加到知识库XX里的笔记YY" | 往已有**笔记**追加内容 | **notes** — 先搜索笔记获取 `note_id`,再用 `append_doc` |
| "把这个写到XX笔记里"、"记到XX笔记" | 往已有**笔记**追加内容 | **notes** — `append_doc` |
| "把这篇笔记添加到知识库" | 将笔记关联到**知识库** | **knowledge-base** — `add_knowledge` with `media_type=11` |
| "上传文件到知识库" | 上传**文件**到知识库 | **knowledge-base** — `create_media` → COS → `add_knowledge` |
| "新建一篇笔记记录这些内容" | **创建**新笔记 | **notes** — `import_doc` |
| "帮我记一下"、"记录一下"、"保存为笔记"(未指定已有笔记) | 意图不明确,**需要确认** | **notes** — 先询问用户是创建新笔记还是追加到哪篇已有笔记 |
| "添加到笔记里"(未指定具体哪篇) | 意图不明确,**需要确认** | **notes** — 先询问用户是创建新笔记还是追加到哪篇已有笔记 |
### ⚠️ 跨模块任务 — 必须读取两个子模块
某些意图跨越 notes 和 knowledge-base 两个模块。**不要只读取一个子模块就开始执行**,必须先读取两个模块的 GUIDE.md 再按顺序操作。
| 用户说的 | 实际流程 | 读取顺序 |
| ------------------------------------ | --------------------------------------------- | ------------------------------------------------------ |
| "把知识库里的XX内容记到笔记" | KB 搜索/读取 → Notes 创建/追加 | 先读 `knowledge-base/GUIDE.md` → 再读 `notes/GUIDE.md` |
| "查看原文"(知识库中的笔记类型媒体) | KB `get_media_info` → Notes `get_doc_content` | 先读 `knowledge-base/GUIDE.md` → 再读 `notes/GUIDE.md` |
| "把这篇笔记添加到知识库" | Notes 搜索获取 note_id → KB `add_knowledge` | 先读 `notes/GUIDE.md` → 再读 `knowledge-base/GUIDE.md` |
**规则**:如果用户意图同时涉及「笔记」和「知识库」,或者 API 响应揭示需要另一个模块(如 `media_type=11` 表示笔记类型),必须读取两个子模块再继续。
**核心判断规则**:
- 目标是**笔记的内容**(读、写、追加)→ notes 模块
- 目标是**知识库的条目**(上传文件、添加链接、关联笔记到知识库)→ knowledge-base 模块
- 目标是**获取知识库条目的原始内容**(查看原文、分析原文、导出原文)→ knowledge-base 模块(若原文是笔记,会跨模块到 notes `get_doc_content`)
- 用户提到"知识库"只是在**描述笔记的位置**(如"知识库里的那篇笔记"),真正操作对象仍是笔记 → notes 模块
## Credential Check
!`test -f ~/.config/ima/client_id && test -f ~/.config/ima/api_key && echo "✅ Credentials configured" || echo "⚠️ NO CREDENTIALS — setup required before any API call"`
**If ⚠️ NO CREDENTIALS:** Guide the user through setup BEFORE attempting any API call:
1. 打开 https://ima.qq.com/agent-interface 获取 **Client ID** 和 **API Key**
2. 存储凭证(二选一):
**方式 A — 配置文件(推荐):**
```bash
mkdir -p ~/.config/ima
echo "your_client_id" > ~/.config/ima/client_id
echo "your_api_key" > ~/.config/ima/api_key
```
**方式 B — 环境变量:**
```bash
export IMA_OPENAPI_CLIENTID="your_client_id"
export IMA_OPENAPI_APIKEY="your_api_key"
```
Agent 会按优先级依次尝试:环境变量 → 配置文件。缺少凭证时,`node ima_api.cjs ...` 会以程序错误退出(`code: -100`),并在 stderr 输出对应 `msg`。
> **Security note:** Credentials are only sent as HTTP headers to `ima.qq.com` and never to any other domain, file, or log.
> **Runtime dependencies:** Check `meta.json` → `required_binaries`
## API 调用模板
所有请求统一为 **HTTP POST + JSON Body**,仅发往官方 Base URL `https://ima.qq.com`。
`ima_api` 已抽离到脚本:`./ima_api.cjs`
```bash
# Example usage (cross-platform, pass credentials via options JSON)
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
OPTS=$(printf '{"clientId":"%s","apiKey":"%s"}' "$IMA_OPENAPI_CLIENTID" "$IMA_OPENAPI_APIKEY")
# stdout 返回正常响应;stderr 返回结构化错误 {"code":-100|-200,"msg":"..."}
if ! resp=$(node "$SKILL_DIR/ima_api.cjs" "openapi/list_docs" '{"limit":10}' "$OPTS" 2>/tmp/ima_err); then
err_json=$(cat /tmp/ima_err)
err_code=$(echo "$err_json" | jq -r '.code // empty' 2>/dev/null)
err_msg=$(echo "$err_json" | jq -r '.msg // empty' 2>/dev/null)
if [ "$err_code" = "-200" ]; then
# 有新版本,原请求未发送;stdout 中带有更新上下文 JSON(含 instruction)
echo "[update] $err_msg" >&2
else
# -100 或其他程序错误:msg 已包含可直接展示给用户的说明
echo "[error] $err_msg" >&2
fi
exit 1
fi
echo "$resp"
```
> **错误处理有两层,必须都检查:**
>
> **第一层 — 脚本执行错误**(进程非 0 退出,错误在 **stderr**):
>
> - `-100`:程序错误(缺少凭证、参数非法、网络错误等),`msg` 可直接展示给用户
> - `-200`:skill 需要更新,原请求未发送,stdout 中有更新上下文 JSON
>
> **第二层 — 后端业务错误**(进程正常退出,响应在 **stdout**):
>From liuxie066/liuxie-skills, MIT.
More from liuxie066/liuxie-skills
- 0.589score
devflow
liuxie066
研发工作流及五个可独立调用的节点:Brainstorm、Save Design、Improve Design、Impl、Review。支持从已有设计或改动进入;完整流程先建议简单或完整链路,由用户选择,两者都保留四路并行设计优化。仅研发,不含提交、发布或部署。
SkillAFreshness: A★ 1Claude Code +9 - 0.586score
delivery
liuxie066
独立的软件交付流程:提交推送、创建 PR、合并主分支、发布版本及升级运行环境。用户通过 $delivery 启动,按授权范围选择阶段,复用项目命令和有效研发证据,核验最终状态并处理失败恢复;不启动或扩展 Devflow。
SkillAFreshness: A★ 1Claude Code +9 - 0.549score
hithink-finance
liuxie066
当用户或 Agent 需要通过同花顺金融数据服务获取、查询、同步、分析或导出 A 股行情、财报、估值、指数、板块、公募基金、期货、期权、特色数据或本地 DuckDB 数据,或需要选择、安装、配置、诊断 REST API、MCP、hithink-finance CLI、Python SDK/marketdb 时使用。
SkillBFreshness: B★ 1Claude Code +9 - 0.548score
futuapi
Futu
富途 OpenAPI 交易与行情助手。查询行情、K线、报价、快照、买卖盘、逐笔成交、分时数据;搜索标的与资讯;解析期权代码、查询期权链/到期日/IV/行权概率;执行买入/卖出/下单/撤单/改单;查询持仓/资金/账户/订单;订阅实时推送;加密货币 (BTC/ETH) 行情与交易;预测市场(Event…
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
deepreview
liuxie066
用于对当前未合并 workspace changes、指定 GitHub Pull Request 或仓库全部代码做严格深度 code review;支持 `$deepreview`、`$deepreview 当前改动`、`$deepreview --base main`、`$deepreview --base…
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
gateflow
liuxie066
单个 work unit 的 gated 开发流程。用于 feature、issue、bug fix、migration、refactor、schema/public contract change 或 architecture-sensitive task;可选接收 design…
SkillBFreshness: B★ 1Claude Code +9 - 0.543score
diagram-design
liuxie066
Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart…
SkillBFreshness: B★ 1Claude Code +9 - 0.541score
dayu
liuxie066
使用本地 Dayu Agent 下载美股、A 股和港股财报,基于财报问答、生成公司分析报告并读取结果。用户提到 dayu、大愚,或要求利用本地财报库做公司研究时使用;普通行情查询、交易和持仓记账不适用。
SkillBFreshness: B★ 1Claude Code +9 - 0.537score
create-skill
liuxie066
按本机中央仓库约定创建、更新或从 GitHub 安装 Skill,复用 Codex 系统 skill-creator 和 skill-installer,并明确调用策略。通过 $create-skill 显式启动。
SkillBFreshness: B★ 1Claude Code +9 - 0.522score
find-skills
liuxie066
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express…
SkillBFreshness: B★ 1Claude Code +9 - 0.517score
grilling
liuxie066
Grill the user relentlessly about a plan, decision, or idea.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 9, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/liuxie066/liuxie-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from liuxie066
- 0.589score
devflow
liuxie066
研发工作流及五个可独立调用的节点:Brainstorm、Save Design、Improve Design、Impl、Review。支持从已有设计或改动进入;完整流程先建议简单或完整链路,由用户选择,两者都保留四路并行设计优化。仅研发,不含提交、发布或部署。
SkillAFreshness: A★ 1Claude Code +9 - 0.586score
delivery
liuxie066
独立的软件交付流程:提交推送、创建 PR、合并主分支、发布版本及升级运行环境。用户通过 $delivery 启动,按授权范围选择阶段,复用项目命令和有效研发证据,核验最终状态并处理失败恢复;不启动或扩展 Devflow。
SkillAFreshness: A★ 1Claude Code +9 - 0.549score
hithink-finance
liuxie066
当用户或 Agent 需要通过同花顺金融数据服务获取、查询、同步、分析或导出 A 股行情、财报、估值、指数、板块、公募基金、期货、期权、特色数据或本地 DuckDB 数据,或需要选择、安装、配置、诊断 REST API、MCP、hithink-finance CLI、Python SDK/marketdb 时使用。
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
deepreview
liuxie066
用于对当前未合并 workspace changes、指定 GitHub Pull Request 或仓库全部代码做严格深度 code review;支持 `$deepreview`、`$deepreview 当前改动`、`$deepreview --base main`、`$deepreview --base…
SkillBFreshness: B★ 1Claude Code +9 - 0.544score
gateflow
liuxie066
单个 work unit 的 gated 开发流程。用于 feature、issue、bug fix、migration、refactor、schema/public contract change 或 architecture-sensitive task;可选接收 design…
SkillBFreshness: B★ 1Claude Code +9 - 0.543score
diagram-design
liuxie066
Create branded architecture, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart…
SkillBFreshness: B★ 1Claude Code +9
Cite this page
ima-skill. Agent Mart. https://agentmart.dev/skills/liuxie066-ima-skill (last updated 2026-10-24)