Skill 文档
安装到 AI 智能体 · 零代码开箱即用 · 自然语言驱动图谱查询
⚠️ 安装凭证包含专属密钥,禁止外传、截图;泄露前往【API Key】页面删除
安装方式
推荐方案一 · 智能体安装
▼复制指令粘贴至 AI 对话框,智能体自动完成部署校验
Download and install a skill. Follow these steps EXACTLY. If any step fails, STOP and report the error.
SKILL_NAME="medgraph"
DOWNLOAD_URL="/api/skills/public/medgraph.zip"
MEDGRAPH_BASE_URL=""
MEDGRAPH_API_KEY="<auto-generated-api-key>"
── STEP 1 — FIND SKILL DIRECTORY ──
Detect candidate skill directories and label them with client type:
[ -d "$PWD/.trae/skills" ] && echo "TRAE_PROJECT: $PWD/.trae/skills"
[ -d "$HOME/.trae-cn/skills" ] && echo "TRAE_USER: $HOME/.trae-cn/skills"
[ -d "$PWD/.claude/skills" ] && echo "CLAUDE_PROJECT: $PWD/.claude/skills"
[ -d "$HOME/.claude/skills" ] && echo "CLAUDE_USER: $HOME/.claude/skills"
[ -d "$PWD/.agents/skills" ] && echo "AGENTS_PROJECT: $PWD/.agents/skills"
[ -d "$HOME/.agents/skills" ] && echo "AGENTS_USER: $HOME/.agents/skills"
[ -d "$PWD/.qoderwork/skills" ] && echo "QODER_PROJECT: $PWD/.qoderwork/skills"
[ -d "$HOME/.qoderwork/skills" ] && echo "QODER_USER: $HOME/.qoderwork/skills"
[ -d "$HOME/.qoder-cn/skills" ] && echo "QODER_USER: $HOME/.qoder-cn/skills"
for d in "$HOME"/.*/skills; do [ -d "$d" ] && echo "OTHER_USER: $d"; done
for d in "$PWD"/.*/skills; do [ -d "$d" ] && echo "OTHER_PROJECT: $d"; done
Decide based on output, deduplicate lines first:
a) If exactly one client type has candidates, use that client type.
b) If multiple client types have candidates, MUST ask me which current AI client I am using:
"TRAE" / "Claude" / "Qoder" / "Agent Skills" / "Other".
c) After client type is chosen, if both PROJECT and USER directories exist for that client, MUST ask me to pick one:
"Global install" — available in all projects, stored in my home directory.
"Project install" — only this project, can be committed to git and shared with team.
d) If only one directory exists for the chosen client type, set INSTALL_DIR="<that dir>/$SKILL_NAME".
e) If no directory exists for the chosen client type:
- TRAE → mkdir -p "$PWD/.trae/skills"; INSTALL_DIR="$PWD/.trae/skills/$SKILL_NAME"
- Claude → mkdir -p "$PWD/.claude/skills"; INSTALL_DIR="$PWD/.claude/skills/$SKILL_NAME"
- Qoder → mkdir -p "$PWD/.qoderwork/skills"; INSTALL_DIR="$PWD/.qoderwork/skills/$SKILL_NAME"
- Agent Skills or Other → mkdir -p "$PWD/.agents/skills"; INSTALL_DIR="$PWD/.agents/skills/$SKILL_NAME"
Do not install into a different client's directory just because it is the only PROJECT directory. Always choose client type first, then choose scope.
── STEP 2 — PREPARE ──
[ -f "$INSTALL_DIR/SKILL.md" ] && echo "EXISTS" || echo "NEW"
If EXISTS → ask me whether to overwrite. If no → STOP.
mkdir -p "$INSTALL_DIR"
── STEP 3 — DOWNLOAD ──
TMPDIR=$(mktemp -d)
curl -fSL -o "$TMPDIR/skill.zip" "$DOWNLOAD_URL" 2>/dev/null || wget -q -O "$TMPDIR/skill.zip" "$DOWNLOAD_URL"
If both fail → STOP and report the error.
── STEP 4 — EXTRACT & INSTALL ──
unzip -o "$TMPDIR/skill.zip" -d "$TMPDIR/ext" 2>/dev/null || python3 -m zipfile -e "$TMPDIR/skill.zip" "$TMPDIR/ext"
If both fail → not a valid ZIP. STOP.
SKILL_PATH=$(find "$TMPDIR/ext" -maxdepth 3 -name "SKILL.md" -print | head -1)
if [ -n "$SKILL_PATH" ]; then
cp -R "$(dirname "$SKILL_PATH")"/. "$INSTALL_DIR"/
else
echo "FATAL: SKILL.md not found"
find "$TMPDIR/ext" -type f
STOP and show listing to me.
fi
── STEP 5 — CONFIGURE ──
mkdir -p "$HOME/.config/medgraph"
python3 - "$HOME/.config/medgraph/config.json" "$MEDGRAPH_API_KEY" "$MEDGRAPH_BASE_URL" <<'PY'
import json, os, stat, sys
path, api_key, base_url = sys.argv[1], sys.argv[2], sys.argv[3]
cfg = {}
if os.path.isfile(path):
try:
with open(path, "r", encoding="utf-8") as f:
loaded = json.load(f)
if isinstance(loaded, dict): cfg = loaded
except Exception:
cfg = {}
cfg["api_key"] = api_key
cfg["base_url"] = base_url
with open(path, "w", encoding="utf-8") as f:
json.dump(cfg, f, indent=2)
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR)
PY
── STEP 6 — VERIFY ──
head -5 "$INSTALL_DIR/SKILL.md"
python3 "$INSTALL_DIR/scripts/resolve.py" --type Gene --name TP53
── DONE ──
Read "$INSTALL_DIR/SKILL.md" and follow its instructions to finish future biomedical graph tasks.
备选方案二 · URL安装
▼链接仅下载 Skill 资源包,导入后仍需配置 API Key。部分 AI 客户端可用。
/api/skills/public/medgraph.zip
兜底方案三 · 手动安装
▼适用于自动安装失败的场景。下载压缩包,解压至 Skill 目录,配置 API Key 即可使用。
1
2
解压至 Skill 目录
将压缩包解压到你使用的 AI 工具的 skills 文件夹中
3
配置 API Key
在 AI 对话框中粘贴你的 API Key(在控制台创建),发送即可
看到「✓ 校验通过」即表示接入成功,可以开始使用了。
接入故障排查
密钥失效怎么办?
可能原因:密钥已被删除或积分已耗尽。如密钥被删除,请在控制台重新创建后,复制安装命令重新安装即可。
积分不足怎么办?
积分耗尽后 Skill 会暂时无法调用。充值后自动恢复,无需重新安装。建议在控制台关注用量变化,避免意外中断。
常见问题
安装 Skill 后会额外收费吗?
Skill 本身免费安装,使用时按底层 API 调用消耗 credits,计费规则与直接调用 API 完全一致。失败请求不扣费,5 分钟内相同查询命中缓存仅扣 1 credit。
API Key 如何配置?
安装 Skill 后,首次使用时需要输入你的 API Key。API Key 在控制台「API Keys」页面创建。Skill 包本身不包含密钥,确保安全隔离。