collect-context

collect-context is a skill for Claude Code, Codex from shimo4228/claude-harness. It costs 233 tokens per session (4,019 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 CodeCodex

Written for Claude Code and Codex: user-invocable in frontmatter, but also reads ~/.codex or $CODEX_HOME. 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, Codex.

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 233 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,019 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.00233 $0.04019
Opus 5 $0.00117 $0.02010
Sonnet 5 $0.00047 $0.00804
Haiku 4.5 $0.00023 $0.00402

Measured 3d ago against content hash d0e89299206d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 3d 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 · 270 lines

How it starts

The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/collect-context — 記事コンテキスト収集

現在のセッション + 関連する過去セッションログ + プロジェクト知識から、記事執筆に必要な 証拠を一箇所に集約する。

責務宣言(このスキルは何をしないか)

collect-context は証拠を集めるだけ。 テーマ・方向性・タイトル・構成・読者想定・ 差別化戦略は決めない。誰が正本かは受け側 repo の rules のチャンネル表を引く (執筆 orchestrator は writing-ecosystem~/MyAI_Lab/zenn-content 常駐)。 特定 project の skill 名をここに列挙しない。

  • 出力に収集者の推薦・提案・方向性メモを書かない
  • 受け側 repo の既存記事を探索・目録化しない
  • セッション中にユーザーが下した判断は例外 — 「発生した事実」としてソース付きで 判断記録に残す(受け側は再判断してよい、と台帳側に明記する)
  • テーマ 引数は収集スコープ(何を集めるかの範囲指定)であって、記事のテーマではない

Usage

/collect-context [収集スコープ] [--out <path>]
  • 収集スコープ: 収集対象の範囲・キーワード(省略時はセッション内容から自動推定)
  • --out <path>: 出力先パス(省略時は呼び出し元 repo の drafts/article-context_<slug>_<date>.md で自動命名。 置き場所の規約は各 project の overlay が持つ — global な本 skill が特定 repo の絶対パスを既定にしない)
  • 同じ会話で session-theme-miningSelected Theme Packet が渡された場合、packet の collection_scope を収集スコープ、sources を必須確認対象として受け取る。packet 自体は 証拠にせず、著者がその問いを選んだ事実だけを本セッションの判断記録に残す

Source Provenance(全 Phase 共通の規律)

収集する全項目にソースを明記する。ソース無しの項目を出力しない。

ソース表記の形式(いずれか):

出元 表記例
コード・ドキュメント src/core/llm.py:49, docs/adr/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・コミット・セッションログ・計測コマンド出力・外部一次文献。そのまま記事に書ける
  • 要検証 — 会話・記憶・要約由来でまだ一次ソースに当たっていないもの。⚠ 未検証 を必ず付けて出力し、執筆前に一次ソースで確認するか「推測」と明示して書く

数値の再計測規律: 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 · 270 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. 3d ago Changed d0e89299206d
  2. 8d 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 (2 stars, last pushed 2d ago), licensed MIT. It adds 233 tokens to every session and 4,019 once invoked, about $0.0012 per session on Opus 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

Other skills, from other repositories

agent-adoption-triage

Five-question triage for routing AI work to the right architecture — script, algorithmic search, LLM workflow, or autonomous agentic loop — before any agent is built. Use when someone says "let's build an agent for X", when deciding whether a use case actually needs an autonomous agent, when reviewing an agent…

shimo4228/agent-adoption-triage · 143 tokens

job-description-skill

A job-description analysis skill that turns a vacancy listing and a candidate’s background into an HTML report about fit, gaps, interview topics, and application strategy.

yanliudesign/offer-toolkit-skill · 150 tokens

offer-compare-skill

A decision assistant for comparing two or more job offers across pay, growth, company strength, team risk, promotion, AI exposure, and lifestyle. Total compensation means the combined value of salary, bonuses, shares, and sign-on payments.

yanliudesign/offer-toolkit-skill · 231 tokens

offer-toolkit-skill

A set of job-search tools covering the path from finding a vacancy to accepting an offer. It includes separate tools for job searches, job-description analysis, tailored resumes, behavioral interviews, offer comparisons, and salary negotiation.

yanliudesign/offer-toolkit-skill · 168 tokens

bq-skill

A coaching workflow for building a reusable library of truthful stories for behavioral job interviews. It uses structures such as STAR—Situation, Task, Action, Result—and can connect stories to a job description and résumé.

yanliudesign/offer-toolkit-skill · 166 tokens

linkedin-job-search-skill

A job-search assistant that uses a sample job description and your resume to find and rank similar public LinkedIn Jobs listings. LinkedIn Jobs is LinkedIn’s section for advertised employment positions.

yanliudesign/offer-toolkit-skill · 136 tokens