Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add shimo4228/claude-harness --skill collect-contextgit clone --depth 1 https://github.com/shimo4228/claude-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/shimo4228/claude-harness/collect-context)<a href="https://agentmods.dev/skills/shimo4228/claude-harness/collect-context"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/collect-context/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/collect-context"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/collect-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.04058 |
| Opus 5.5 | $0.00012 | $0.01623 |
| Sonnet 5.5 | $0.00006 | $0.00812 |
| Haiku 4.5 | $0.00003 | $0.00406 |
Grade B, and why
collect-context scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find ~/.codex/sessions -name 'rollout-*.jsonl' How it starts
The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/collect-context — 記事コンテキスト収集
現在のセッション + 関連する過去セッションログ + プロジェクト知識から、記事執筆に必要な 証拠を一箇所に集約する。
責務
集めるのは証拠と、セッション中にユーザーが下した判断の記録だけ。テーマ・方向性・
タイトル・構成・読者想定・差別化は受け側 repo が決める(誰が正本かは受け側 repo の rules の
チャンネル表を引く)。ユーザーの判断は「発生した事実」としてソース付きで判断記録に残し、
受け側は再判断してよいと台帳側に明記する。収集元は Phase 1-3(本セッション・セッションログ・
repo の一次ソース)で、テーマ 引数は記事のテーマでなく収集スコープ(何を集めるかの範囲)。
執筆 repo 固有の skill・helper・agent(テーマ選定、ログ抽出、fact-check)は、受け側 repo の overlay が持つ。入っていれば使い、無ければ本 skill の手順だけで完結させる。
Usage
/collect-context [収集スコープ] [--out <path>]
収集スコープ: 収集対象の範囲・キーワード(省略時はセッション内容から自動推定)--out <path>: 出力先パス(省略時は呼び出し元 repo のdrafts/にarticle-context_<slug>_<date>.mdで自動命名。 置き場所の規約は各 project の overlay が持つ)- 同じ会話で執筆 repo のテーマ選定 skill から Selected Theme Packet が渡された場合、packet の
collection_scopeを収集スコープ、sourcesを必須確認対象として受け取る。packet 自体は 証拠にせず、著者がその問いを選んだ事実だけを本セッションの判断記録に残す
Source Provenance(全 Phase 共通の規律)
収集する全項目にソースを明記する。ソース無しの項目を出力しない。
ソース表記の形式(いずれか):
| 出元 | 表記例 |
|---|---|
| コード・ドキュメント | src/core/llm.py:49, docs/decision-history/0066-....md |
| コミット | abc1234 (repo 名も、対象 repo 外なら) |
| Claude セッションログ | ~/.claude/projects/<slug>/<session-id>.jsonl + 時刻 |
| Codex セッションログ | ~/.codex/sessions/<YYYY>/<MM>/<DD>/rollout-<id>.jsonl + 時刻 |
| 本セッションの会話 | 会話(本セッション <session-id 先頭8桁>, YYYY-MM-DD) |
| 計測コマンド出力 | 実行したコマンドそのもの + 実行日 |
| 外部 | URL |
Evidence tier を区別する:
- 一次 — コード・ADR・コミット・セッションログ・計測コマンド出力・外部一次文献。そのまま記事に書ける
- 要検証 — 会話・記憶・要約由来でまだ一次ソースに当たっていないもの。
⚠ 未検証を必ず付けて出力し、執筆前に一次ソースで確認するか「推測」と明示して書く - 著者の発言(いま) — 収集の後に受け側 repo のインタビューで著者が語ったこと(考え・解釈・方向)。末尾の
## インタビュー節にだけ現れる。記録の事実を裏付ける tier ではなく、確度と語の照合に使う
数値の再計測規律: Before/After 等の数値は「どのコマンドで・いつ計測したか」を併記する。既存ドキュメントからの引き写しは禁止(docs は drift する。live コマンド出力が正)。再計測できない過去の数値は出典のセッションログ/コミットを指す。
Process
Phase 1: 現在のセッションから収集
現在の会話を分析し、以下を抽出する(各項目にソースを付す):
- やったこと — 実行した操作・コマンドの時系列リスト
- Before/After データ — 定量的な変化(数値、件数)+ 計測方法
- コード・コマンド例 — 実行した CLI コマンド、作成したスクリプト(抜粋 +
path:line) - 技術的発見 — 予想外の挙動、ハマりポイント、ワークアラウンド
- 判断記録 — セッション中に下された判断(ユーザー発言・外部レビューの verdict・ 確定した方針変更)を時系列で。判断の内容を記録するのであって、判断を下すのではない
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 15d ago Changed 2cf90f92265b
- 22d ago Changed · +6 lines cf70e2269b2f
- 29d ago Changed · +3 lines 58b4fdf46bd4
- 1mo ago Changed · -202 tokens per session 44a447b94aaa
- 2mo ago Changed d0e89299206d
- 3mo ago First seen · 270 lines · 233 tokens per session scan B c4537a24e111
collect-context is a skill published in the GitHub repository shimo4228/claude-harness (4 stars, last pushed 7d ago), licensed MIT. It adds 31 tokens to every session and 4,058 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
collect-context compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| collect-contextshimo4228/claude-harness | Skill | 4 | 7d ago | MIT | B | 31 | Claude Code |
| agent-adoption-triageshimo4228/agent-adoption-triage | Skill | 2 | 1mo ago | MIT | A | 143 | Claude Code |
| git-commitadongwanai/learn-workbuddy | Skill | 563 | 1mo ago | MIT | A | 0 | Claude Code, Codex |
| pi-triagesky-valley/pi | Skill | 94 | yesterday | MIT | A | 57 | Claude Code |
| pi-parity-reviewsky-valley/pi | Skill | 94 | yesterday | MIT | A | 54 | Claude Code |
| zodanivar/zod-skill | Skill | 24 | yesterday | MIT | A | 217 | Claude Code, Codex |
| trailhead-chartToRvaLDz/trailhead | Skill | 37 | yesterday | MIT | A | 138 | Claude Code |