Claude harness refs update
Skill ystk-kai/claude-harness/skills/claude-harness-refs-update
Claude Code の個人グローバルハーネス (skills / CLAUDE.md 常時ルール) を一元管理して各環境に展開する
npx -y skills add ystk-kai/claude-harness --skill claude-harness-refs-updateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
claude-harness の参照資料 (蒸留版 skills/*/references/*.md と原典 clone ~/.claude/references/ の 2 層) の鮮度チェックと更新を実行する。check-freshness → BEHIND を git pull → STALE を DISTILLING.md の手順で再蒸留。明示起動専用 (/claude-harness-refs-update で呼ぶ)。
SKILL.md
7.5 KB, ~2.6k tokens by cl100k_base, as published. Nobody here has run it
claude-harness-refs-update: 参照資料の鮮度チェックと更新
claude-harness の参照資料は 2 層 — 蒸留版 (skills/*/references/*.md。harness-design と ui-design が持つ) と原典 clone (~/.claude/references/<repo>/)。このスキルは鮮度チェックから再蒸留までを 1 コマンドで回す。参照資料の更新機構はこのスキルが一元所有する: scripts/check-freshness.sh が検出、DISTILLING.md が更新レシピと再蒸留プロンプト雛形、scripts/frontmatter.sh が install.sh と共用のパーサ。参照スキル側 (harness-design / ui-design) は蒸留版を持つだけで、判定も規約も持たない。更新の入口はこのスキルだけ (スラッシュコマンドを増やさない)。
引数: repo 名 (例 12-factor-agents) を渡すとその repo だけを対象にする。--check で鮮度チェックのみ (更新に進まない)。無引数なら全 repo を対象に更新まで進む。
Process (run in order)
-
前提を解決する。
- 当日日付を控える:
date +%F。distilled_atに使う。サブエージェントは当日日付を知らないので、後で必ずプロンプトに埋める。 - このスキルの実体パスを解決する:
SELF="$(readlink -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/claude-harness-refs-update")"。以降$SELF/scripts/check-freshness.sh/$SELF/DISTILLING.mdを使う (skills/ は symlink なので実体パスを取るためreadlink -f)。 - claude-harness リポジトリのルートを解決する:
ROOT="$(dirname "$(dirname "$SELF")")"。蒸留版はharness-designとui-designの各スキル配下にあるので、出力先は$ROOT/skills/<skill>/references/<repo>.mdになる (どのスキルかは手順1の STALE 行に併記される)。 - 原典ルート:
REFS="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/references"。clone は$REFS/<repo>。
- 当日日付を控える:
-
鮮度チェック —
bash "$SELF/scripts/check-freshness.sh"を実行 (fetch あり = 最新 upstream を反映)。行頭タグOK/BEHIND/STALE/MISS/ERR/SKIP/NOTEを読む。引数に repo 名があれば、その repo の行だけを対象にする (スクリプトに絞り込み機能はないので出力からフィルタ)。引数が--checkなら結果を提示してここで終了。全OKなら「更新不要」と伝えて終了。 -
MISS / ERR を処理 —
MISS(clone がない/壊れ) はinstall.sh --with-referencesを案内して中断する (clone がないと更新できない)。ERR(distilled_commitが履歴にない等) は各行に併記された復旧コマンドに従う。 -
BEHIND を解消 — 各該当 clone を
git -C "$REFS/<repo>" pull --ff-only。pull で新コミットが来ると STALE に変わるので、pull 後にcheck-freshness.shを取り直して STALE を再評価する (順序を守る — 古い HEAD で蒸留しないため)。 -
STALE を再蒸留 — STALE の各リポジトリを
general-purposeサブエージェントに並列委譲する (Agenttool。蒸留版を Write するので Explore 不可)。各プロンプトは$SELF/DISTILLING.mdの「再蒸留プロンプト雛形」に次を埋めて作る:- 原典 clone パス
$REFS/<repo>と owner/repo - 出力ファイル
$ROOT/<STALE 行に併記された蒸留版パス>(例skills/ui-design/references/hallmark.md)。どのスキルの蒸留版かを取り違えないため、パスは推測せず STALE 行の記載を使う - 重点領域 — 既存蒸留版の索引が扱っている範囲を引き継ぐ
- 差分 —
git -C "$REFS/<repo>" log --oneline <distilled_commit>..HEADの内容 (何が変わったか。蒸留版に影響する変更だけ本文へ反映する判断材料) - 当日日付 (手順0の
date +%F) をdistilled_atとして明示 - 構成規約は
DISTILLING.mdに従うこと (frontmatter 3 キー /## Contents/## まず押さえる/ 索引テーブル /## 蒸留の範囲外/ 250 行以内 / 実際に Read した事実だけ・推測で書かない)
各サブエージェントは蒸留版 1 ファイルを Write し、frontmatter の
distilled_commitを clone の新 HEAD・distilled_atを当日に更新、最後に行数・使った SHA・内容の 3 行要約を返す。 - 原典 clone パス
-
集約と確認 — 更新したファイル一覧と各 3 行要約を提示する。
bash "$SELF/scripts/check-freshness.sh" --offlineを再実行し、対象がOKに戻ったことを確認する。ここまでの変更は作業ツリーに残す。 -
commit (ユーザーが望むときのみ) — 変更内容と、各リポジトリの差分 3 行要約を含む commit message 案を提示して承認を得てから commit する。SHA だけの無言 bump をしない (内容への影響なしと判断して SHA だけ進める場合も、その理由を message に書く)。承認がなければ diff を残して終了。個人リポジトリなので main への直接 commit でよい。
Gotchas
- サブエージェントは当日日付を知らない → 手順0の
date +%Fを必ずプロンプトに埋める (distilled_atの正確性)。 - BEHIND を pull してから STALE を再評価する。順序を逆にすると古い HEAD で蒸留してしまう。
- 出力先は symlink 越しでなく
readlink -fで解決した実体パスを使う。蒸留版が属するスキルは repo ごとに違う (harness-design/ui-design) ので、STALE 行のパスをそのまま使い、harness-design決め打ちにしない。 check-freshness.shに repo 絞り込みはない → 特定 repo 指定時は全走査の出力からフィルタする。- 再蒸留は必ず
DISTILLING.mdの構成規約をプロンプトに渡す (250 行以内 / 索引駆動 / 推測で書かない)。規約をサブエージェントの記憶任せにしない。 - 新規リポジトリの追加は別作業 (
DISTILLING.md「新規リポジトリの追加」)。このスキルは既存蒸留版の更新に使う。
Quick checklist
-
date +%Fを控え、サブエージェントにdistilled_atとして渡した -
MISS/ERRを先に解消した (clone 未取得ならinstall.sh --with-references) - BEHIND を
git pull --ff-onlyしてから STALE を再評価した - 各再蒸留が
DISTILLING.mdの規約 (frontmatter 3 キー / 250 行以内 / 推測で書かない) に従った -
distilled_commitを clone の新 HEAD に、distilled_atを当日に更新した -
check-freshness.shが対象をOKに戻した - commit する場合、message に差分 3 行要約を含めた (SHA だけの無言 bump をしない)
Gives 0 of the 12 instructions most context ai engineering skills give in ~2.6k tokens
Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-06
- dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
- dispatch final reviewer after all tasksin 37 of 1193, across 11 files
- provide full task text to the subagentin 31 of 1193, across 10 files
- review spec compliance before code qualityin 27 of 1193, across 10 files
- make the hook script executablein 26 of 1193, across 8 files
- re-snapshot after navigation or DOM changesin 25 of 1193, across 17 files
- answer subagent questions before proceedingin 22 of 1193, across 7 files
- mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
- merge hook into existing settingsin 21 of 1193, across 3 files
- read files before editing themin 21 of 1193, across 9 files
- ask if installation is global or projectin 20 of 1193, across 2 files
- copy the hook script to target locationin 20 of 1193, across 2 files
Said here and by no other author read
- record the current date for distilled_at
- resolve skill paths using readlink -f
- run the freshness check script
- handle missing or errored repositories before proceeding
- pull behind repositories with git pull --ff-only
- re-run the freshness check after pulling
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.