collect-context

collect-context is a skill for Claude Code from shimo4228/claude-harness. It costs 31 tokens per session (4,058 once invoked), scanned B, original, MIT.

A research-material collection tool for gathering context from the current session, related past sessions, and project knowledge before writing an article. It creates a source-linked evidence record.

In plain words
What is it for?
Use it to collect article materials, build an evidence record, or prepare a sourced list of claims before drafting.
Why use it?
It keeps supporting material and its sources in one place, so fact-checkers can see which claims are backed by primary sources and which remain unverified.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it to collect article materials, build an evidence record, or prepare a sourced list of claims before drafting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shimo4228/claude-harness/collect-context
Install

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.

Any agent
npx skills add shimo4228/claude-harness --skill collect-context
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

Made for: Claude Code.

Wrote 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.

agentmods badge for collect-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/shimo4228/claude-harness/collect-context/github.svg)](https://agentmods.dev/skills/shimo4228/claude-harness/collect-context)
Your own site
<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.

agentmods 80×15 button for collect-context

Your own site · 80×15
<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>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,058 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 15d ago against content hash 2cf90f92265b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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'
skills/collect-context/SKILL.md · 279 lines

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: 現在のセッションから収集

現在の会話を分析し、以下を抽出する(各項目にソースを付す):

  1. やったこと — 実行した操作・コマンドの時系列リスト
  2. Before/After データ — 定量的な変化(数値、件数)+ 計測方法
  3. コード・コマンド例 — 実行した CLI コマンド、作成したスクリプト(抜粋 + path:line)
  4. 技術的発見 — 予想外の挙動、ハマりポイント、ワークアラウンド
  5. 判断記録 — セッション中に下された判断(ユーザー発言・外部レビューの verdict・ 確定した方針変更)を時系列で。判断の内容を記録するのであって、判断を下すのではない

Read the full file on GitHub · 279 lines

Changes

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.

  1. 15d ago Changed 2cf90f92265b
  2. 22d ago Changed · +6 lines cf70e2269b2f
  3. 29d ago Changed · +3 lines 58b4fdf46bd4
  4. 1mo ago Changed · -202 tokens per session 44a447b94aaa
  5. 2mo ago Changed d0e89299206d
  6. 3mo ago First seen · 270 lines · 233 tokens per session scan B c4537a24e111

Subscribe to this mod's changes

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.

Related

collect-context compared with skills from other repositories

collect-context next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
collect-contextshimo4228/claude-harnessSkill47d agoMITB31Claude Code
agent-adoption-triageshimo4228/agent-adoption-triageSkill21mo agoMITA143Claude Code
git-commitadongwanai/learn-workbuddySkill5631mo agoMITA0Claude Code, Codex
pi-triagesky-valley/piSkill94yesterdayMITA57Claude Code
pi-parity-reviewsky-valley/piSkill94yesterdayMITA54Claude Code
zodanivar/zod-skillSkill24yesterdayMITA217Claude Code, Codex
trailhead-chartToRvaLDz/trailheadSkill37yesterdayMITA138Claude Code