Session State Managementのロゴ

Session State Management

コミュニティ
UnpaidAttention
session-state-management

Stay coherent across a long agentic session by keeping the task's state on disk — a WORKING_NOTES.md with the task, plan, decisions, and status — updated at every milestone and re-read after any context loss. Trigger this at the start of any task likely to exceed ~30 minutes or ~10 distinct steps; immediately after noticing context compaction or a session resume; and whenever you catch yourself re-searching for something you already found or contradicting an earlier decision. Do NOT trigger for short single-sitting tasks, and do not confuse with incremental-delivery (which orders and checkpoints the DELIVERABLE) — this skill keeps the SESSION coherent regardless of what is being built.

Add to TypingMind

概要

公開者UnpaidAttention
リポジトリfable5-methodology
スキル名session-state-management
スター
94
フォーク
21
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    UnpaidAttentionがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Session State Management」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/session-state-management
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnpaidAttention/fable5-methodology.git /tmp/fable5-methodology
mkdir -p .claude/skills
cp -r /tmp/fable5-methodology/skills/session-state-management .claude/skills/session-state-management
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSession State Managementを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSession State Managementを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Session State Managementは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Session State Management

Your context window is unreliable storage: it compacts, truncates, and ends. Disk does not. Anything you'd be sorry to lose goes in a file, at the moment you'd be sorry to lose it.

Step 1: Create WORKING_NOTES.md at task start

Location: the session scratchpad directory, or the repo root if the user's workflow expects it (never commit it unless asked). Structure — create all sections immediately, even empty:

markdown
# WORKING NOTES — <task title>

## Task (verbatim requirements)
<paste the user's actual requirements and process instructions — not your paraphrase;
paraphrases drift and the original message may scroll out of context>

## Plan
<ordered steps, checked off as done>

## Decisions
<one line each: what was decided, and why — "IDs are ULIDs not UUIDs: sortable, spec §3">

## Status
<done / in progress / blocked, per step>

## Next action
<the exact next command or edit, written for a cold reader>

## Assumptions & open questions

Step 2: Update triggers (write at the moment, not "later")

Update the file when ANY of these occurs:

  1. A plan step completes or a milestone verifies → check it off, update Status.
  2. A decision is made that later work must honor (naming, format, interface shape) → Decisions.
  3. The plan changes direction → rewrite Plan, note why in Decisions.
  4. You're about to do anything risky or slow (migration, big refactor step, long build) → record Next action FIRST, so a crash mid-operation leaves a resume point.
  5. Roughly every 30–45 minutes of work with no other trigger → refresh Status and Next action.

Step 3: Re-read triggers

Re-read WORKING_NOTES.md — fully, not from memory — when:

  1. A context-compaction notice appears, or a session resumes.
  2. You're unsure what was already decided or already tried.
  3. You're about to start a new plan step (glance at Decisions so step 9 honors what step 2 chose).
  4. Before writing the final delivery message (the Task section is the requirements checklist).

Rule: after any suspected context loss, trust the file over your recollection wherever they disagree. The file was written at the moment of knowledge; your recollection is a reconstruction.

Step 4: Split across sessions instead of overextending one

End the session at a natural boundary (a checkpoint, a completed unit) rather than pushing on, when ANY of:

  1. Remaining work is clearly larger than what's been done and quality is already degrading — see the signs below.
  2. Verification has failed 3+ times on the same criterion (grinding, not progressing).
  3. Degradation signs: repeating searches you already ran, re-deriving established facts, contradicting the Decisions list, or instructions from the original request coming as a surprise on re-read.

To split: finish the current unit to a verified state, update WORKING_NOTES.md so the Next action block is executable cold ("run pytest tests/test_sync.py, then implement step 5: retry logic in sync.py:120 per Decision 4"), and tell the user where things stand and what the next session picks up.

Worked example

Mid-task, a compaction notice appears during an 8-step API migration.

  • Without this skill: you continue from a summarized memory, re-implement the error envelope you already built (differently), and step 7 contradicts the pagination decision from step 2.
  • With it: you re-read WORKING_NOTES.md — Decisions says "error envelope: {error: {code, message}}, pagination: cursor-based, decided step 2"; Status shows steps 1–5 verified, step 6 in progress with next action "wire cursor into /orders handler". You resume in two minutes with zero re-derivation and no drift.

Done when

WORKING_NOTES.md exists from task start and its Status/Next-action sections would let a cold model resume correctly right now; every cross-cutting decision made this session appears in Decisions; and at delivery, the verbatim Task section was used as the final requirements checklist.

よくある質問

AIスキル「Session State Management」では何ができますか?

Stay coherent across a long agentic session by keeping the task's state on disk — a WORKING_NOTES.md with the task, plan, decisions, and status — updated at every milestone and re-read after any context loss. Trigger this at the start of any task likely to exceed ~30 minutes or ~10 distinct steps; immediately after noticing context compaction or a session resume; and whenever you catch yourself re-searching for something you already found or contradicting an earlier decision. Do NOT trigger for short single-sitting tasks, and do not confuse with incremental-delivery (which orders and checkp...

TypingMindでSession State Managementを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Session State Managementはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSession State Managementをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/session-state-managementを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Session State Managementを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Session State Managementで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSession State Managementを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Session State Management」は無料ですか?

UnpaidAttentionがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇