codex-harness: Skill for Claude Code

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

session-memory is a skill for Claude Code, Codex from Chachamaru127/codex-harness. It costs 52 tokens per session (2,405 once invoked), scanned B, original, MIT.

A session-memory system that stores selected work history, decisions, reusable patterns, and project context across coding sessions. A session is one period of work by the agent.

In plain words
What is it for?
Use it to review previous sessions, continue earlier work, record decisions and patterns, and manage session logs or project context.
Why use it?
It helps the agent continue from earlier work without losing important decisions or having to reconstruct the project context each time.

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.

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-memory/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-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/chachamaru127/codex-harness/session-memory.svg)](https://agentmods.dev/skills/chachamaru127/codex-harness/session-memory)
Your own site
<a href="https://agentmods.dev/skills/chachamaru127/codex-harness/session-memory"><img src="https://agentmods.dev/badge/skills/chachamaru127/codex-harness/session-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,405 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.00052 $0.02405
Opus 5 $0.00026 $0.01203
Sonnet 5 $0.00010 $0.00481
Haiku 4.5 $0.00005 $0.00241

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

Security

Grade B, and why

session-memory 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 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

tail -50 .claude/state/agent-trace.jsonl | jq -r '.files[].path' | sort -u
.codex/skills/session-memory/SKILL.md · 269 lines

How it starts

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

Session Memory Skill

セッション間の学習と記憶を管理するスキル。 過去の作業内容、決定事項、学んだパターンを記録・参照します。


トリガーフレーズ

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

  • 「前回何をした?」「前回の続きから」
  • 「履歴を見せて」「過去の作業」
  • 「このプロジェクトについて教えて」
  • "what did we do last time?", "continue from before"

概要

このスキルは .claude/memory/ に作業履歴を保存し、 セッション間での知識の継続を実現します。

あわせて、重要な情報は「どこに残すべきか」を明確にします(詳細: docs/MEMORY_POLICY.md)。


メモリ構造

.claude/
├── memory/
│   ├── session-log.md      # セッションごとのログ
│   ├── decisions.md        # 重要な決定事項
│   ├── patterns.md         # 学んだパターン
│   └── context.json        # プロジェクトコンテキスト
└── state/
    └── agent-trace.jsonl   # Agent Trace(ツール実行履歴)

推奨運用(SSOT/ローカル分離)

  • SSOT(共有推奨): decisions.md / patterns.md
    • 「決定(Why)」と「再利用できる解法(How)」を集約する
    • 各エントリは タイトル + タグ(例: #decision #db)を付け、先頭に Index を置く
  • ローカル推奨: session-log.md / context.json / .claude/state/
    • ノイズ/肥大化しやすいため、基本は Git 管理しない(必要なら個別に判断)

自動記録される情報

session-log.md

各セッション記録には ${CLAUDE_SESSION_ID} 環境変数を活用してセッションIDを付与します。 これにより、セッション間のトレーサビリティが向上します。

## セッション: 2024-01-15 14:30 (session: abc123def)

### 実行したタスク
- [x] ユーザー認証機能の実装
- [x] ログインページの作成

### 生成したファイル
- src/lib/auth.ts
- src/app/login/page.tsx

### 重要な決定
- 認証方式: Supabase Auth を採用

### 次回への引き継ぎ
- ログアウト機能が未実装
- パスワードリセットも必要

Note: ${CLAUDE_SESSION_ID} は Claude Code が自動設定する環境変数です。 セッションごとに一意のIDが割り当てられ、ログの追跡や問題調査に役立ちます。

decisions.md

## 技術選定

| 日付 | 決定事項 | 理由 |
|------|---------|------|
| 2024-01-15 | Supabase Auth | 無料枠あり、セットアップ簡単 |
| 2024-01-14 | Next.js App Router | 最新のベストプラクティス |

## アーキテクチャ

- コンポーネント: `src/components/`
- ユーティリティ: `src/lib/`
- 型定義: `src/types/`

patterns.md

## このプロジェクトのパターン

### コンポーネント命名
- PascalCase
- 例: `UserProfile.tsx`, `LoginForm.tsx`

### API エンドポイント
- `/api/v1/` プレフィックス
- RESTful 設計

### エラーハンドリング
- try-catch で囲む
- エラーメッセージは日本語

context.json

{
  "project_name": "my-blog",
  "created_at": "2024-01-14",
  "stack": {
    "frontend": "next.js",
    "backend": "next-api",
    "database": "supabase",
    "styling": "tailwind"
  },
  "current_phase": "フェーズ2: コア機能",
  "last_session": "2024-01-15T14:30:00Z"
}

Read the full file on GitHub · 269 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 · 269 lines · 52 tokens per session scan B 5f5d0a1615dd

Subscribe to this mod's changes

session-memory is a skill published in the GitHub repository Chachamaru127/codex-harness (2 stars, last pushed 6mo ago), licensed MIT. It adds 52 tokens to every session and 2,405 once invoked, about $0.0003 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

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens