运维安装
- 作者仓库星标 1,187
- 叉子 185
- 作者更新于 2026年6月14日 10:01
- 作者仓库 claude-code-skills
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @daymade · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 需要 · Vendor-specific
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: ima-copilot
description: > One-command installer, troubleshooter, and personalization layer for the official Tencent IMA…
category: 通用
runtime: 无特殊运行时
---
# ima-copilot 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Overview / Architectural principles (do not violate) / What this skill does”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Overview / Architectural principles (do not violate) / What this skill does”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、读取环境变量、会按任务需要访问外部网络、需要准备 Vendor-specific API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 Vendor-specific API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/tmp` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令、读取环境变量。
先用一个小任务确认它会围绕“Overview / Architectural principles (do not violate) / What this skill does”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: ima-copilot
description: > One-command installer, troubleshooter, and personalization layer for the official Tencent IMA…
category: 通用
source: daymade/claude-code-skills
---
# ima-copilot
## 什么时候使用
- ima-copilot 是一个通用扩展技能,按 SKILL 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;使用前要…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Overview / Architectural principles (do not violate) / What this skill does」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令、读取环境变量;会按任务需要访问外部网络;需要准备 Vendor-specific API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "ima-copilot" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Overview / Architectural principles (do not violate) / What this skill does
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令、读取环境变量 | 会按任务需要访问外部网络
安全层 -> 需要准备 Vendor-specific API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} IMA Copilot
One-command installer, troubleshooter, and personalization layer for the official Tencent IMA skill.
Overview
The official Tencent IMA skill (ima-skill) exposes a powerful OpenAPI for notes and knowledge base operations, but its installation flow is designed for a specific proprietary agent and recent releases have shipped submodule files that fail strict SKILL.md loaders. IMA Copilot solves both problems:
- Installs ima-skill to Claude Code, Codex, and OpenClaw in a single command via the vercel-labs/skills open installer.
- Walks the user through API key setup with a live validation call.
- Detects known upstream issues and — with explicit user consent — fixes them in place, without ever forking, vendoring, or mirroring any part of the upstream package.
- Provides a fan-out search strategy that respects user-configured knowledge base priorities and boosts, with awareness of the 100-result per-KB truncation limit.
Architectural principles (do not violate)
This skill is a wrapper layer around ima-skill. The wrapper contract is non-negotiable:
- Never vendor upstream files. This skill directory does not contain any copy, fork, or excerpt of ima-skill's own content. When ima-skill ships a new release, users get the new release without any interference from this wrapper.
- Repairs happen at runtime, not at ship time. If an upstream bug needs patching, this skill carries the instructions for how to patch, not the patched files. Running a repair is idempotent: rerunning after an upstream update re-detects and re-fixes anything that came back.
- Always ask before touching upstream files. Modifying
~/.claude/skills/ima-skill/**,~/.agents/skills/ima-skill/**, or any other upstream install directory requires explicit user consent via AskUserQuestion. No silent patching. - Teach rather than hide. When a fix is applied, show the user exactly what changed and where the backup was saved. This is how users learn to maintain their own installs.
What this skill does
| Capability | Entry point | Detail |
|---|---|---|
| 1. Install upstream ima-skill to 3 agents | scripts/install_ima_skill.sh |
See references/installation_flow.md |
| 2. Configure API credentials (XDG style) | Inline workflow below | See references/api_key_setup.md |
| 3. Diagnose and fix known upstream issues | scripts/diagnose.sh + workflow below |
See references/known_issues.md |
| 4. Fan-out search with priority boosting | scripts/search_fanout.py |
See references/search_best_practices.md |
Routing
When this skill is triggered, classify the user's intent and jump to the corresponding capability:
| User says something like… | Go to |
|---|---|
| "装 ima"、"install ima-skill"、"把 ima 装一下"、"我想用 ima" | Capability 1 |
| "配 ima 的 key"、"configure ima credentials"、"ima API key" | Capability 2 |
| "ima 报错"、"SKILL.md warning"、"frontmatter 错误"、"ima 加载失败" | Capability 3 |
| "搜 X"、"在 ima 里搜 X"、"跨知识库搜索"、"扇出搜 X" | Capability 4 |
| "帮我从头跑一遍 ima" | 1 → 2 → 3 → 4 in sequence |
When in doubt, start with Capability 3 (diagnose) — it surfaces exactly which capabilities are blocked and in what order.
Capability 1: Install upstream ima-skill
The installer downloads the latest official release from https://app-dl.ima.qq.com/skills/, stages it in a temp directory, and hands off to npx skills add <local-path> to distribute it across Claude Code, Codex, and OpenClaw.
To run it:
bash scripts/install_ima_skill.sh
The script auto-detects which of the three target agents are installed on the user's machine. For agents that are not present, it skips silently rather than installing anywhere the user hasn't opted in. For agents that are present, it installs globally (-g) in vercel skills' default symlink mode: the first detected agent's directory becomes the canonical copy, and the remaining agents are symlinked to it. This means a repair or an upgrade applied once propagates automatically to every agent — diagnose.sh detects this sharing and dedupes its reports so you don't see the same issue multiple times.
For a version override, detection logic, troubleshooting, and the full file-by-file layout produced by the installer, read references/installation_flow.md.
Capability 2: Configure API credentials
Credentials are stored in XDG style, decoupled from any agent's skill directory:
~/.config/ima/client_id(mode600)~/.config/ima/api_key(mode600)~/.config/ima/(mode700)
Environment variables IMA_OPENAPI_CLIENTID and IMA_OPENAPI_APIKEY act as fall-back overrides — the wrapper reads the environment first, then the config file.
Step through the setup with the user:
- Open
https://ima.qq.com/agent-interfaceand create a new Client ID and API Key. - Write both values into the XDG config path (or export the environment variables).
- Make a single liveness call against
https://ima.qq.com/openapi/wiki/v1/search_knowledge_basewith{"query": "", "cursor": "", "limit": 1}to confirm the credentials are accepted — acode: 0, msg: successresponse means ready.
The full script and the exact request/response schema lives in references/api_key_setup.md.
Capability 3: Diagnose and fix known issues
This is the reason this skill exists. The upstream package has real bugs that break loading on certain agents, and the fixes are well-understood but need user consent to apply. The diagnose/repair workflow is the core contract of this skill.
Step 1 — Run the read-only diagnosis
bash scripts/diagnose.sh
diagnose.sh never modifies any file. It prints a structured report with one line per check:
✅ upstream ima-skill installed (claude-code)
✅ upstream ima-skill installed (codex)
❌ upstream ima-skill NOT installed (openclaw)
✅ API credentials valid (search_knowledge_base returned 12 KBs)
⚠️ ISSUE-001: notes/SKILL.md missing YAML frontmatter (claude-code)
⚠️ ISSUE-001: knowledge-base/SKILL.md missing YAML frontmatter (claude-code)
⚠️ ISSUE-001: notes/SKILL.md missing YAML frontmatter (codex)
⚠️ ISSUE-001: knowledge-base/SKILL.md missing YAML frontmatter (codex)
Step 2 — Parse the report and ask the user
For each ⚠️ or ❌ line, look up the issue in references/known_issues.md. That file is the source of truth for:
- What the issue is (symptom, root cause)
- Which repair strategies exist (
A,B,skip) - The exact shell commands for each strategy
- What files each strategy touches
- Why the upstream maintainer probably hasn't fixed it yet
Step 3 — Ask for explicit consent before touching upstream files
Use AskUserQuestion for every issue that has more than one repair strategy. Frame it plainly — the user may not know what "YAML frontmatter" means. Describe what the bug does to them in user terms ("loader skips two files silently, so note-search and knowledge-base-search don't actually work"), then describe each strategy in terms of the outcome, not the mechanism.
Never offer a single "just fix it" option when multiple strategies exist. The user's pick may legitimately differ based on factors the skill cannot observe — e.g., they might prefer Strategy B (minimal diff) if they plan to manually compare with upstream.
Step 4 — Execute the chosen strategy
Every repair command in references/known_issues.md is written to be:
- Idempotent — rerunning after the fix is already applied does nothing harmful and prints a clear "already fixed" message.
- Backed up — the repair copies the original file to
/tmp/ima-copilot-backups/<timestamp>/<relative-path>before modifying anything, then tells the user the backup location. - Reversible — the user can restore from the backup with a single
cpcommand shown at the end.
Step 5 — Re-run diagnose to confirm
After the repair, run diagnose.sh a second time and show the user the diff. The issue should flip from ⚠️ to ✅. If it does not, stop and surface the raw before/after to the user instead of silently retrying — unexpected failures here usually mean upstream shipped an unforeseen change.
An important note about upstream updates
Every repair is temporary in the sense that ima-skill upgrades replace everything. This is by design: the skill does not fight upstream for persistent state. When the user upgrades ima-skill via Capability 1, Step 4 of diagnose will again flag the fixed issue, and the user can rerun the repair. This is a feature, not a bug — if upstream eventually fixes the issue, the repair becomes unnecessary and diagnose.sh will report ✅ with no prompt.
Capability 4: Personalized fan-out search
IMA's OpenAPI has three hard constraints that any serious search workflow must account for:
- No cross-knowledge-base endpoint.
search_knowledgerequires a singleknowledge_base_idper call. Cross-KB search is a client-side fan-out, not an API feature. - No relevance score in results.
info_listitems only carrymedia_id,title,parent_folder_id, andhighlight_content. Any ranking beyond insertion order must happen on the client. - Silent 100-result truncation.
search_knowledgereturns at most 100 hits per KB with nois_endornext_cursorfield in the response. High-frequency queries are silently capped.
scripts/search_fanout.py implements the full workaround:
python3 scripts/search_fanout.py "<query>"
The script reads ~/.config/ima/copilot.json for personalization (priority KBs, skip list, strategy), calls search_knowledge_base to enumerate KBs, fans out search_knowledge calls in parallel, detects truncation by exact-100 length match, and renders results grouped by KB with priority groups at the top.
The personalization file is per-user and private. This skill ships only a template — see config-template/copilot.json.example. A user with no config file gets a neutral default: fan out all accessible KBs, sort groups by hit count, no boosting.
For the full algorithm, truncation handling strategy, rendering format, and a walkthrough of the evidence-based decision to allow a "subset KB skip" (e.g., a curated KB that is a strict subset of a master KB can be safely skipped to reduce duplicate hits), read references/search_best_practices.md.
What this skill refuses to do
- Never vendor upstream content. This directory does not contain and will never contain a copy of
ima-skill/SKILL.md,ima-skill/notes/**,ima-skill/knowledge-base/**, or any other upstream file. Anyone adding such files to this skill should be rejected. - Never pin an upstream version in SKILL.md. The installer script carries a default version for fallback purposes, but SKILL.md itself is version-agnostic to survive upstream releases without requiring a skill bump.
- Never silently patch upstream files. Every modification path requires an explicit AskUserQuestion and the user's active choice.
- Never hardcode a user's knowledge base names. The
priority_kbsandskip_kbsfields incopilot.jsonare 100% user-configured. Example values inconfig-template/copilot.json.exampleare illustrative only. - Never skip the backup step when executing a repair, no matter how trivial the diff.
File layout
ima-copilot/
├── SKILL.md # This file — entry and routing
├── scripts/
│ ├── install_ima_skill.sh # Download → stage → npx skills add to 3 agents
│ ├── diagnose.sh # Read-only health report
│ └── search_fanout.py # Fan-out search with priority grouping
├── references/
│ ├── installation_flow.md # Capability 1 deep dive
│ ├── api_key_setup.md # Capability 2 deep dive
│ ├── known_issues.md # Issue registry — source of truth for repairs
│ └── search_best_practices.md # Capability 4 deep dive
└── config-template/
└── copilot.json.example # Template for ~/.config/ima/copilot.json
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核