Skip to content
Agentmart
Submit a tool
This entry duplicates context-optimizer, which is the one we list in search.

context-optimizer

Use this skill to compress long conversation threads into a compact checkpoint summary.

Skill by gon9a

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gon9-context-optimizer-8b8a8a

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use this skill to compress long conversation threads into a compact checkpoint summary. Use when the session is getting long, the user says "チェックポイント作って", "これまでの内容まとめて", "context compaction", "セッションまとめて", or when important decisions and code changes risk being lost. Extracts decisions, code changes, TODOs, and learnings into a reusable Markdown document.

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
context-optimizer
Description
Use this skill to compress long conversation threads into a compact checkpoint summary. Use when the session is getting long, the user says "チェックポイント作って", "これまでの内容まとめて", "context compaction", "セッションまとめて", or when important decisions and code changes risk being lost. Extracts decisions, code changes, TODOs, and learnings into a reusable Markdown document.
License
MIT
Metadata
author: gon9a · version: 1.0
Instructions
90 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • files: referenced but missing: scripts/install.sh

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Context Optimizer Skill

長いチャットセッションから重要情報だけを抽出し、compact な Markdown チェックポイントを生成する。

## いつ使うか

- **コンテキスト使用率が約60%に達したとき**(auto-compact の自動発動を待たない — 自動圧縮はタスクの途中で発動し、否定指示・命名規則・過去の決定が失われやすい)
- **タスクの区切り**(PR マージ後、デバッグの原因特定後、調査→実装への切り替え前)
- 設計・方針決定が完了し、実装フェーズに移る前
- 作業を別のセッション・別のエージェントに引き継ぐとき
- 「今日やったこと」を記録に残したいとき

## ワークフロー

### Step 1: セッションを振り返る

現在のチャット履歴全体を走査し、以下のカテゴリに該当するものを特定する:

| カテゴリ | 内容 |
|---------|------|
| **決断 (Decisions)** | アーキテクチャ選択、方針決定、却下した代替案 |
| **コード変更 (Changes)** | 作成・修正・削除したファイルと変更内容の要約 |
| **未完了タスク (TODOs)** | 「次回やること」「後で確認」として残っているもの |
| **学び・発見 (Learnings)** | バグの原因、ハマりポイント、新しく分かったこと |
| **重要なコンテキスト (Context)** | 次のエージェントが知っておくべき前提・制約 |

### Step 2: チェックポイントを生成する

以下のテンプレートに従って出力する:

```markdown
# Checkpoint — <YYYY-MM-DD HH:MM>

## 作業概要
[1-3文でセッション全体の目的と達成内容]

## 決断・方針
- **[決断内容]**: [理由・背景]
- **[却下した選択肢]**: [却下理由]

## コード変更
- `path/to/file.py`: [変更内容の要約]
- `scripts/install.sh`: [変更内容の要約]

## 未完了タスク (TODO)
- [ ] [タスク1] — [優先度・理由]
- [ ] [タスク2]

## 制約・禁止事項
- [「〜を使うな」「〜は変更禁止」などの否定指示 — 圧縮で最も失われやすいため必ず明記]
- [命名規則・コーディング規約でセッション中に確立したもの]

## 学び・Gotchas
- [発見したこと / ハマりポイント]

## 重要なコンテキスト
[次のエージェントが最初に読むべき前提情報]
```

### Step 3: 保存先を決める

ユーザーに保存先を確認する:

1. **Obsidian vault** — `{OBSIDIAN_VAULT_DIR}/00_Inbox/checkpoint_<date>.md` に保存
2. **プロジェクト内** — `progress.md` or `docs/checkpoint.md` に追記
3. **表示のみ** — ファイル保存せずチャットに出力

## 出力の品質基準

- **< 200 行** を目標とする(200行を超えるとコンテキスト汚染・性能劣化の報告あり。超える場合はテーマごとに複数ファイルへ分割する)
- **コードスニペットは最小限** — 変更した行や関数名を記載し、全文は入れない
- **結論だけを書く** — 議論のプロセスは省略する
- **次のエージェントが読んでも理解できる** — 固有名詞・略称は展開する

### Step 4: /clear を提案する

チェックポイント保存後、ユーザーに次の流れを提案する:

1. `/clear` でセッションをリセットする
2. 新しいセッションで保存したチェックポイントを読み込んでから作業を再開する

会話履歴を持ち越すより、ドキュメント経由で文脈を引き継ぐ方が確実で低コスト(毎ターンの履歴再送がなくなり、圧縮による情報欠落も起きない)。

## Gotchas

- セッション内の「試行錯誤」は省略する。最終的に採用した方針だけを残す
- TODO は具体的に書く(「後で直す」ではなく「`update_index.py` の frontmatter 挿入ロジックを修正する」)
- このスキル自体のチェックポイントを作るときは再帰しない

From gon9/ore-skills, MIT.

More from gon9/ore-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 23, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from gon9a

Cite this page

context-optimizer skill. Agent Mart. https://agentmart.dev/skills/gon9-context-optimizer-8b8a8a (last updated 2026-10-24)