codex-harness: Skill for Claude Code

.codex/skills/session-init/SKILL.md

session-init is a skill for Claude Code, Codex from Chachamaru127/codex-harness. It costs 49 tokens per session (1,571 once invoked), scanned A, original, MIT.

A session-start workflow that checks the repository and summarizes the current task situation. It reviews Git status, Plans.md, AGENTS.md, and previous session notes, with optional checks for stored Claude-mem context.

In plain words
What is it for?
Use it at the start of a work session to inspect changes, find pending tasks, review project instructions, and see handoff information from the previous session.
Why use it?
It reduces the time spent reconstructing what changed and what remains to do when beginning work. It can also flag oversized planning or session-log files for cleanup.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also installed under .codex/. Also seen: reads .claude/ paths; mentions Claude Code; mentions AGENTS.md.

This is Chachamaru127/codex-harness's own configuration. It tells Claude Code and Codex how to work on codex-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codex-harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Chachamaru127/codex-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Chachamaru127/codex-harness/main/.codex/skills/session-init/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Chachamaru127/codex-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 session-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/chachamaru127/codex-harness/session-init.svg)](https://agentmods.dev/skills/chachamaru127/codex-harness/session-init)
Your own site
<a href="https://agentmods.dev/skills/chachamaru127/codex-harness/session-init"><img src="https://agentmods.dev/badge/skills/chachamaru127/codex-harness/session-init.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 1,571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.01571
Opus 5 $0.00024 $0.00785
Sonnet 5 $0.00010 $0.00314
Haiku 4.5 $0.00005 $0.00157

Measured 6d ago against content hash 5e34f7181089, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

session-init scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/session-init/SKILL.md · 195 lines

How it starts

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

Session Init Skill

セッション開始時の環境確認と現在のタスク状況把握を行うスキル。


トリガーフレーズ

このスキルは以下のフレーズで起動します:

  • 「セッション開始」
  • 「作業開始」
  • 「今日の作業を始める」
  • 「状況を確認して」
  • 「何をすればいい?」
  • "start session"
  • "what should I work on?"

概要

Session Init スキルは、Claude Code セッション開始時に自動的に以下を確認します:

  1. Git 状態: 現在のブランチ、未コミットの変更
  2. Plans.md: 進行中タスク、依頼されたタスク
  3. AGENTS.md: 役割分担、禁止事項の確認
  4. 前回セッション: 引き継ぎ事項の確認

実行手順

Step 0: ファイル状態チェック(自動整理)

セッション開始前にファイルサイズをチェック:

# Plans.md の行数チェック
if [ -f "Plans.md" ]; then
  lines=$(wc -l < Plans.md)
  if [ "$lines" -gt 200 ]; then
    echo "⚠️ Plans.md が ${lines} 行です。「整理して」で整理を推奨"
  fi
fi

# session-log.md の行数チェック
if [ -f ".claude/memory/session-log.md" ]; then
  lines=$(wc -l < .claude/memory/session-log.md)
  if [ "$lines" -gt 500 ]; then
    echo "⚠️ session-log.md が ${lines} 行です。「セッションログを整理して」で整理を推奨"
  fi
fi

整理が必要な場合は提案を表示(作業には影響しない)。

Step 0.5: Claude-mem 文脈確認(オプション)

Claude-mem が有効な場合、過去の文脈を自動表示:

# Claude-mem の状態チェック
if [ -f "$HOME/.claude-mem/settings.json" ]; then
  mode=$(cat ~/.claude-mem/settings.json | grep -o '"CLAUDE_MEM_MODE"[^,}]*' | cut -d'"' -f4)
  if [ "$mode" = "harness" ] || [ "$mode" = "harness--ja" ]; then
    echo "📚 Claude-mem (harness モード) が有効です"
  fi
fi

Claude-mem 有効時に表示する内容:

  1. 過去のガードレール発動:

    • mem-searchguard タイプの観測を検索
    • 「このプロジェクトでは過去 N 回テスト改ざんを防止」
  2. 直近の作業サマリー:

    • 最新のセッションサマリーを表示
    • 「前回: Feature X の設計完了」
  3. 継続タスクの提案:

    • Plans.md と組み合わせて次のアクションを提案
## 📚 過去の文脈(Claude-mem)

**ガードレール履歴**:
- テスト改ざん防止: 2回

**前回のセッション**:
- Feature X 設計完了
- RBAC 採用を決定

**💡 継続推奨**: Plans.md の「Feature X 実装」から開始

: Claude-mem が未設定の場合、このステップはスキップされます。

Step 1: 環境確認

以下を並列で実行:

# Git状態
git status -sb
git log --oneline -3
# Plans.md
cat Plans.md 2>/dev/null || echo "Plans.md not found"
# AGENTS.md の要点
head -50 AGENTS.md 2>/dev/null || echo "AGENTS.md not found"

Step 2: タスク状況の把握

Plans.md から以下を抽出:

  • cc:WIP - 前回から継続中のタスク
  • pm:依頼中 - PM から新規依頼されたタスク(互換: cursor:依頼中)
  • cc:TODO - 未着手だが割り当て済みのタスク

Read the full file on GitHub · 195 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. 6d ago First seen · 195 lines · 49 tokens per session scan A 5e34f7181089

Subscribe to this mod's changes

session-init is a skill published in the GitHub repository Chachamaru127/codex-harness (2 stars, last pushed 6mo ago), licensed MIT. It adds 49 tokens to every session and 1,571 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.