init-session

init-session is a skill for Claude Code, Codex from satoh-y-0323/claude-code-conductor. It costs 49 tokens per session (4,610 once invoked), scanned B, original, MIT.

A session-start procedure for restoring previous work state and checking project setup before coding begins. It can invoke a setup process when coding rules have not yet been configured.

In plain words
What is it for?
Use it at the beginning of a coding session to mark the run, restore prior state, check setup, and guide the user through configuring coding standards when needed.
Why use it?
It reduces repeated setup and helps prevent a new session from starting without the previous session's context, remaining tasks, or project rules.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/satoh-y-0323/claude-code-conductor/init-session
Any agent
npx skills add satoh-y-0323/claude-code-conductor --skill init-session
Clone the repo
git clone --depth 1 https://github.com/satoh-y-0323/claude-code-conductor

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 init-session

README.md
[![agentmods](https://agentmods.dev/badge/skills/satoh-y-0323/claude-code-conductor/init-session.svg)](https://agentmods.dev/skills/satoh-y-0323/claude-code-conductor/init-session)
Your own site
<a href="https://agentmods.dev/skills/satoh-y-0323/claude-code-conductor/init-session"><img src="https://agentmods.dev/badge/skills/satoh-y-0323/claude-code-conductor/init-session.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,610 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00049 $0.04610
Opus 5 $0.00024 $0.02305
Sonnet 5 $0.00010 $0.00922
Haiku 4.5 $0.00005 $0.00461

Measured today against content hash aebd1438d3dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

init-session 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 today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/session_guard.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

> `grep -m1 '^モード: ' .claude/memory/sessions/{YYYYMMDD}.tmp | c3 run .claude/skills/autonomous-mode/scripts/mode_line.py`
.claude/skills/init-session/SKILL.md · 243 lines

How it starts

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

init-session

セッションを初期化し、前回の作業状態を復元する。 セッション開始時に手動で実行する。

前提: SessionStart hook で .claude/hooks/session_start.py が自動実行され、 file-history クリア・sandbox 有効化・c3.db 初期化は完了している。 本 skill では前回セッションの読み込み以降のみを担当する。


最優先: 初回セットアップガードと実行マーカー(Step 1 より前に必ず実行)

G-1: init-session 実行マーカーを書く(ループガード)

/start からの再帰呼び出しを防ぐため、最初に現在のセッション ID を実行マーカーへ記録する:

c3 run .claude/skills/init-session/scripts/session_guard.py mark

G-2: setup 未実行なら /setup を自動実行

プロジェクトのコーディング規約が未設定なら、/setup を先に実行する。G-1 の mark が併せて出力する SETUP_DONE / SETUP_NEEDED で判定:

順序について: setup ガード(G-2)は Step 1(前回セッション復元)より前に置く。SETUP_NEEDED となるのは規約未設定=実質的に初回導入のケースであり、その場合 Step 1 で復元すべき前回セッションは通常存在しない(復元はほぼ no-op)ため、setup を先行させてもコンテキストへの実害はない。

  • SETUP_DONE → そのまま Step 1 へ進む。
  • SETUP_NEEDED → Skill ツールで setup を自動的に呼ぶ。ここでの「自動」はユーザーが /setup を打つ必要なく連鎖起動されるという意味で、setup 自体は言語・規約のヒアリング(AskUserQuestion 群)を行うためユーザー応答は必要(規約設定をスキップ・無人実行する意味ではない)。setup 完了後(.claude/rules/coding-standards.mdsetup_done.flag が生成される)に Step 1 へ進む。
    • ユーザーが setup のヒアリングを中断した場合、.claude/rules/coding-standards.mdsetup_done.flag のいずれも未生成なら次回の /init-session/start で再度 setup が起動される(再試行可能)。

mark が exit 0 以外で終了した(stdout が空で SETUP_DONE/SETUP_NEEDED いずれでもない)場合は、ディスクフル・権限エラー等の可能性がある。その場合は SETUP_NEEDED と同様に扱い(= /setup を起動するかエラーを確認してからセッションを続ける)、安全側に倒す。

G-3: from-start 引数の扱い

本スキルが from-start 引数付きで呼ばれた場合(/start のセッション初期化ガード経由)は、本ガード(G-1/G-2)と Step 1〜3(前回状態の復元・サマリ表示)まで実行したら、以下の対話プロンプトを全てスキップして本スキルを終了する(Skill 実行が完了すれば呼び出し元の /start が Step 0 以降を続行する):

  • Step 3 のサマリ提示後の「完了している可能性のあるタスク」確認 AskUserQuestion(Step 1.5 由来)
  • Step 4(作業の開始方法を選ぶ)
  • Step 5(選択に応じて分岐する)

引数が無い通常起動では従来どおり上記を全て実行する。

from-start ではユーザーは既に /start を選んでおり、開始方法・陳腐化タスクの確認で二重に問われると煩雑なため、復元サマリの提示のみに留める(陳腐化タスクの [x] 化が必要なら次回の通常 /init-session 起動時に確認される)。


Step 1: 前回セッションを読み込む

Glob で .claude/memory/sessions/*.tmp を検索し、ファイル名(YYYYMMDD)が最大のものを Read する。 ファイルが存在しない場合は「前回セッションなし」として Step 3 へ進む。

Read the full file on GitHub · 243 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today First seen · 243 lines · 49 tokens per session scan B aebd1438d3dc

Subscribe to this mod's changes

init-session is a skill published in the GitHub repository satoh-y-0323/claude-code-conductor (1 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 4,610 once invoked, about $0.0002 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-09-04.