kit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKit
套件
| Say | Do |
|---|---|
| Sync. Re-arm every app at the latest version, cloning the harness first if it is missing. Bare |
any of those followed by a source, such as | One source. |
| Fix. Something installed wrong, or two things collided. |
Never ask which. Sync is idempotent, so there is no separate Install mode to
pick wrong: running it where the harness already exists syncs it instead of
breaking it. Releasing this package is Repo-Dev work and is not a mode here.
Everything below the two modes is reference. Read one when the task names it.
One collection, one harness. records which skills this
machine carries. Kit fetches from GitHub and runs
its local script; it does not install package managers, runtimes, or shell
hooks. Source of truth for anything not here: the harness README.
collection.tomlharness-core| 输入指令 | 执行操作 |
|---|---|
| 同步。将所有应用更新至最新版本,如果harness缺失则先克隆它。在任何目录下直接输入 |
上述任一指令后跟源名称,例如 | 单一源同步。执行 |
| 修复。用于解决安装错误或组件冲突问题。 |
无需询问具体操作。同步是幂等操作,因此没有单独的安装模式会导致误操作:在已存在harness的环境中运行该指令只会进行同步,不会破坏现有环境。发布此包属于Repo-Dev的工作范畴,不在本操作模式内。
以下内容为参考信息,仅在执行对应任务时阅读。
一个技能集合对应一个harness。记录了本机搭载的所有技能。套件从GitHub获取并运行其本地脚本;它不会安装包管理器、运行时或shell钩子。本文档未覆盖内容的权威来源:harness README。
collection.tomlharness-coreReport it while it runs
运行过程中记录日志
Install and Sync fan out over every source and every app. That takes minutes.
Keep the whole log:
bash
set -o pipefail
git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py sync 2>&1 | tee /tmp/kit.logNever pipe it through or . That discards the failures and
replaces the harness exit code with the pager's, so a run that died a third of
the way through reads as a clean success.
tailheadIf it outruns your tool timeout, background it, say so in chat, and report
progress rather than going quiet. The harness prints one line per repo and ends
in a count, so is the position.
tail -1 /tmp/kit.log安装和同步操作会遍历所有源和应用,耗时数分钟。请保留完整日志:
bash
set -o pipefail
git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py sync 2>&1 | tee /tmp/kit.log切勿通过或管道处理日志。这会丢弃失败信息,并且将harness的退出码替换为分页工具的退出码,导致运行三分之一就失败的任务被误判为成功完成。
tailhead如果操作超时,请将其置于后台运行,在聊天中告知,并报告进度而非保持沉默。harness会为每个仓库打印一行日志,最后输出统计信息,因此可查看当前进度。
tail -1 /tmp/kit.logFetch and sync
获取并同步
bash
git clone --depth 1 https://github.com/yoshi-ortiz/harness-core.git ~/.harness-core 2>/dev/null \
|| git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py syncThe checkout must already have and Node/npm. is no longer needed:
the manifest is TOML and is standard library. Kit does not install
them or add a PATH shim. Use the same Git fetch from Git Bash or
PowerShell on Windows. Start a new agent session after syncing because skill
lists are read at session start.
gityqtomllibbash
git clone --depth 1 https://github.com/yoshi-ortiz/harness-core.git ~/.harness-core 2>/dev/null \
|| git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py sync执行此操作前需已安装和Node/npm。不再需要:清单采用TOML格式,为Python标准库。套件不会安装这些工具或添加PATH别名。在Windows系统的Git Bash或PowerShell中使用相同的Git获取命令。同步完成后请启动新的agent会话,因为技能列表在会话启动时读取。
gityqtomllibSync
同步
bash
git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py syncSync is the idempotent re-fetch. Pulling the checkout first refreshes
and the harness code, so a source added upstream arrives with
it. There is no separate installer upgrade path.
collection.tomlIt fans out over every source in . Naming one after
filters to sources whose name contains it, so re-fetching twenty-odd repos to
update the one that was asked for never happens; see the table above.
collection.tomlsyncpython3 ~/.harness-core/harness.py statusbash
git -C ~/.harness-core pull --ff-only
python3 ~/.harness-core/harness.py sync同步是幂等的重新获取操作。先拉取检出内容可刷新和harness代码,因此上游新增的源会同步到本地。没有单独的安装程序升级路径。
collection.toml它会遍历中的所有源。在后指定一个源名称会过滤出名称包含该字符串的源,避免为了更新一个指定源而重新获取二十多个仓库;详情见上方表格。
collection.tomlsyncpython3 ~/.harness-core/harness.py statusFix
修复
Every command above starts with the same literal text, , so one standing permission rule covers every mode. A path built from reads as a different command each time
and has to be approved again on every run. Relocate the checkout by cloning it
elsewhere and writing your own rule; the default path stays literal so the
common case is approved once.
python3 ~/.harness-core/harness.py$HARNESS_DIRStart with . It is read-only and answers the two questions that
matter first, which agents were detected and which categories are on.
harness status| Symptom | Cause | Do |
|---|---|---|
| A skill in the repo never arrives | Its manifest entry names a subset, so a skill added later is not in the list | Make the entry bare, or add the new name to the list |
| A whole category is absent | | |
| An app cannot see a new skill | Skill lists load at session start | Start a new chat |
| A skill behaves like an older version | A stale directory survived a rename; nothing deletes it | Remove it from that app's skills dir, then |
| A skill I just edited syncs without my edit | Sync clones the source from GitHub; an uncommitted or unpushed edit is not there yet | Commit and push, then sync. To test the edit itself, run it from the checkout |
| agy or Cursor sees nothing while Claude Code is fine | Those dirs are populated by | |
An edit to | Editing installs nothing | |
--dry-run上述所有命令都以相同的文本开头:,因此一条权限规则即可覆盖所有模式。基于构建的路径每次会被识别为不同的命令,每次运行都需要重新授权。可通过将检出内容克隆到其他位置并编写自定义规则来重新定位;默认路径保持固定,以便常见场景只需授权一次。
python3 ~/.harness-core/harness.py$HARNESS_DIR先执行。该命令为只读,可先回答两个关键问题:检测到哪些agent,以及启用了哪些分类。
harness status| 症状 | 原因 | 解决方法 |
|---|---|---|
| 仓库中的某个技能始终未出现 | 其清单条目指定了子集,因此后续添加的技能不在列表中 | 将条目改为无限制,或在列表中添加新技能名称 |
| 整个分类缺失 | | 执行 |
| 应用无法识别新技能 | 技能列表在会话启动时加载 | 启动新的聊天会话 |
| 技能表现为旧版本 | 重命名后残留了过期目录;没有自动删除机制 | 从该应用的技能目录中删除过期目录,然后执行 |
| 刚编辑的技能同步后未包含修改内容 | 同步操作从GitHub克隆源;未提交或未推送的修改不会被同步 | 提交并推送修改,然后执行同步。如需测试修改内容,请直接从检出目录运行 |
| agy或Cursor无任何内容,而Claude Code正常 | 这些目录由 | 执行 |
编辑 | 编辑操作不会自动安装内容 | 执行 |
在执行任何遍历操作前使用。切勿通过手动编辑应用的技能目录来修复问题,清单是权威来源,下一次同步会覆盖所有未记录的修改。
--dry-runAdd a skill
添加技能
harness add owner/repo [skill]--category <name>--no-saveName skills only for a subset. A list naming every skill in a repo behaves
like a bare entry and then rots, because the repo adds a skill and the list
silently stops handing it out. Check a repo's set with .
npx skills add <repo> -lNever pass to .
--allnpx skills addharness add owner/repo [skill]--category <name>--no-save仅在需要子集时指定技能名称。列出仓库中所有技能的条目会表现为无限制条目,随后会失效,因为仓库添加新技能后列表不会自动更新。使用查看仓库的技能集合。
npx skills add <repo> -l切勿向传递参数。
npx skills add--allWhere skills land
技能存储位置
npx skills add~/.agents/skills/skillsscripts/sync-skills.sh.harness-managednpx skills add~/.agents/skills/skillsscripts/sync-skills.sh.harness-managedRelease
发布
Tagging the harness is documented once, in
the harness README.
Copying it here is how the two drift.
harness的打标流程仅在harness README中有文档记录。在此处复制文档会导致两者内容不一致。