Qoder Logo
加载中...
技能市场/

更新于 2026年05月19日
名称
描述

安装

一键安装到客户端
安装到 QoderWork 客户端(需版本 v0.3.7+)
安装到 Qoder 客户端(需版本 v0.12.2+)
Download and install a skill. Follow these steps EXACTLY. If any step fails, STOP and report the error. SKILL_NAME="undefined" DOWNLOAD_URL="undefined" ── STEP 1 — FIND SKILL DIRECTORY ── [ -d "$HOME/.agents/skills" ] && echo "USER: $HOME/.agents/skills" [ -d "$PWD/.agents/skills" ] && echo "PROJECT: $PWD/.agents/skills" for d in "$HOME"/.*/skills; do [ -d "$d" ] && echo "USER: $d"; done for d in "$PWD"/.*/skills; do [ -d "$d" ] && echo "PROJECT: $d"; done Decide based on output (deduplicate lines first): a) Only USER lines → INSTALL_DIR="<that dir>/$SKILL_NAME" b) Only PROJECT lines → INSTALL_DIR="<that dir>/$SKILL_NAME" c) Both USER and PROJECT → MUST ask the user to pick one: "Global install" — available in all projects, stored in your home directory. "Project install" — only this project, can be committed to git and shared with team. d) Nothing found → mkdir -p "$HOME/.agents/skills"; INSTALL_DIR="$HOME/.agents/skills/$SKILL_NAME" ── STEP 2 — PREPARE ── [ -f "$INSTALL_DIR/SKILL.md" ] && echo "EXISTS" || echo "NEW" # If EXISTS → ask user 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. ── 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. # ZIP may nest files in a wrapper folder. Find SKILL.md and copy its parent: SKILL_PATH=$(find "$TMPDIR/ext" -maxdepth 2 -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. Show listing to user. fi ── STEP 5 — VERIFY ── head -5 "$INSTALL_DIR/SKILL.md" # Confirm SKILL.md exists and is non-empty. Temp files in $TMPDIR are auto-cleaned by OS. ── DONE ── Read "$INSTALL_DIR/SKILL.md" and follow its instructions to finish the user's task.