{
  "$schema": "https://bestaiskill.com/schemas/agent-install/2.json",
  "skill": "baoyu-compress-image",
  "built": "2026-10-26",
  "control_level": 4,
  "control_level_label": "L4 高权限",
  "capabilities": [
    "execute_command",
    "write_file"
  ],
  "required_controls": {
    "agent": [
      "sandbox_recommended",
      "graded_authorization"
    ],
    "admin": [
      "approval_process",
      "rollback_support",
      "full_audit"
    ]
  },
  "evidence": [
    {
      "file": "scripts/",
      "summary": "Executes local scripts or commands: scripts/main.ts (run via bun; spawns which / sips / cwebp / convert, dynamically imports sharp)"
    },
    {
      "file": "本地工作目录",
      "summary": "File I/O and artifact output: Outputs images (same directory with new extension or path specified by -o), temporary files <output>.tmp, renames original to {base}_original.{ext} when --keep is not enabled"
    }
  ],
  "verification": {
    "method": "第二遍独立重读 + 反查：① 目录只有 SKILL.md + scripts/main.ts 两个文件，无 package.json / 无 node_modules，坐实“依赖外部环境”；② 全文 token 扫描（http/curl/wget/fetch/dotenv/API_KEY/token/cookie/process.env）：零命中，确认无网络与凭证面；③ 逐段读 main.ts 核对四处压缩实现与探测逻辑，并核对错误分支（sips/cwebp/convert 失败抛错、sharp 的三种格式分支）；④ 复核写盘副作用顺序：processFile 里先压缩到 .tmp → 原图改名 _original → .tmp 改名到目标，确认默认行为是“保留但改名”而非删除——unlinkSync 虽被 import 但全文无调用点（已 grep 确认）；⑤ 核对 SKILL.md 选项表与脚本 parseArgs 默认值一致（webp / 80 / keep=false / recursive=false）。",
    "second_pass": [
      {
        "item": "无网络调用 / 无凭证读取",
        "status": "ok",
        "detail": "全文无 fetch/http/curl/API key/cookie/process.env 命中；唯一子进程是 which 与四个图像 CLI。"
      },
      {
        "item": "“默认覆盖原图”的初判修正",
        "status": "ok",
        "detail": "第一遍曾疑为删除原图；逐行读后确认为 renameSync(absInput, `${base}_original${ext}`)——原图被改名保留，结论已按此更正写进 risks。"
      },
      {
        "item": "sharp 依赖可解析性",
        "status": "ok",
        "detail": "skill 目录无 package.json；仓库根 dependencies 含 sharp ^0.34.5。非 workspace 环境需自行安装 sharp 或依赖 cwebp/convert/sips 分支。"
      },
      {
        "item": "四个压缩器的参数与退出码处理",
        "status": "ok",
        "detail": "sips 用 -s format/-s formatOptions/--out；cwebp 用 -q/-o；convert 用 [-quality]；sharp 走 pipeline.webp/png/jpeg。均检查 code!==0 并抛错。"
      },
      {
        "item": "批量容错与汇总",
        "status": "ok",
        "detail": "目录模式下 processFile 抛错被 catch 后仅 console.error 继续；--json 输出 files[] + summary(compressor/totals/ratio)。"
      },
      {
        "item": "meta 元数据",
        "status": "ok",
        "detail": "GitHub API：MIT、25926 stars、pushed_at 2026-09-10T15:13:43Z；本地 HEAD 与任务 pin 1567581c26ec… 一致。"
      }
    ],
    "level": 1,
    "level_label": "V1 已固定",
    "commit": "1567581c26ec29f4216c6e6835415bf30343b0e3",
    "sha256": "5c0a427092d204971663adfa7559c0dfd6ef21a3e66456a29976c14814221ca0",
    "reviewed_by": null,
    "reviewed_at": null
  },
  "assessed_at": "2026-10-25",
  "method_version": "2.0",
  "mirror": {
    "archive": "https://skillpub.pages.dev/r2/v/2026-09-15/baoyu-compress-image.tar.gz",
    "sha256": "5c0a427092d204971663adfa7559c0dfd6ef21a3e66456a29976c14814221ca0",
    "commit": "1567581c26ec29f4216c6e6835415bf30343b0e3"
  },
  "original": {
    "github": "https://github.com/JimLiu/baoyu-skills/tree/main/skills/baoyu-compress-image",
    "path": "skills/baoyu-compress-image",
    "commit": "1567581c26ec29f4216c6e6835415bf30343b0e3"
  }
}