Skip to content

公共安装器兼容:skills-cli一句装上 #47

Closed

Description

@FeatherHunter

Part of #45

Question

让 vercel skills-cli 认出本仓:一句 npx skills add FeatherHunter/ilife 把 skill 装进 OpenCode/Codex 并跑通一条命令(HELP现找→cmd_read→envelope→HTML)。含:发现规则确认(认什么布局)、导出层实现(不动现有布局)、-a/-g 行为、两家实测证据、文档。范围:只做兼容层,不自研安装器。

Activity

  1. FeatherHunter commented on Sep 7, 2026

    @FeatherHunter
    OwnerAuthor

    #47 终审返工执行回报(分支 feat/47-public-installer,不合入不关票)

    返工 commit:5ccb58a1c78c83e9e76c9b80dbb410d96a73f334(含本次 must 三件+should 小补)
    CI:https://github.com/FeatherHunter/ilife/actions/runs/34087800664

    1. 发现(npx skills@latest add D:/ilife-wt47 -l,[email protected],exit 0)

    o  Found 1 skill
    o  Available Skills
    |    skill-calorie
    |      卡路里一期饮食体重运动身体目标照片分析复盘,唯一出口 calorie-cmd-read(argv加JSON加exit)
    

    stderr 另有 5 行跳过(样板期预期,其余 4 行同构):

    ⚠ Skipped D:\ilife-wt47\packages\skill-bill\SKILL.md — missing required frontmatter field(s): name, description
    

    2. 两家安装+list --json(隔离目录 $env:TEMP/sk47fix-oc、sk47fix-cx,--copy -y,均 exit 0)

    OpenCode:

    { "name": "skill-calorie", "scope": "project", "agents": ["OpenCode"], "source": "D:/ilife-wt47", "sourceType": "local" }

    Codex:

    { "name": "skill-calorie", "scope": "project", "agents": ["Codex"], "source": "D:/ilife-wt47", "sourceType": "local" }

    3. 落点目录树(<项目>/.agents/skills/skill-calorie/)

    顶层:SKILL.md package.json src templates scripts test dist,头 4 行原文:

    ---
    name: skill-calorie
    description: "卡路里一期饮食体重运动身体目标照片分析复盘,唯一出口 calorie-cmd-read(argv加JSON加exit)"
    ---
    

    诚实注记:本地路径源会把工作区 dist/node_modules 一并拷走;线上 URL 装只含 git 内容、无 dist(dist 被 packages/*/dist ignore),运行时仍走 npm。

    4. 四条命令(SKILLS_DB_PATH 指向全新临时目录,真库零触碰;node 走本仓构建产物)

    calorie.help.lookup {"q":"看今日主页"}                      → exit 0,shape=list
    calorie.diet.add {"foodName":"鸡胸","calories":200,"protein":35} → exit 0,shape=receipt
    calorie.view.home {"date":"2026-09-07"}                     → exit 0,shape=stat
    calorie.view.home {"date":"2026-09-07"} --html <tmp>/home.html → exit 0,shape=stat
    

    5. home.html

    落盘 2488 字节,头标签原文:

    <section class="ilife-page" data-skill="calorie" data-slot="ilife:calorie" style="background:#16181d;color:#e6edf3;borde…
    

    6. 本次返工改动(对应双审终审 must/should)

    • 测试诚实化:test/skills-export-47.test.mjs 头注记仅静态导出头,不覆盖真跑/落点/端到端;docs 第 5 条同步注记。
    • 三处 @0.1.0 硬编码登记随 0.1.1 同步(SKILL.md/docs 新增「版本钉死登记」+测试注释)。
    • should:复制节 bin 口径补 memo-cmd-read 全称+skill-calorie-fetch 说明;配方 description 避冒号一句;skill-calorie description 已去冒号(见上文新全文)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions