Session State Management logo

Session State Management

Community
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.

Overview

PublisherUnpaidAttention
Repositoryfable5-methodology
Skill namesession-state-management
Stars
94
Forks
21
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by UnpaidAttention on GitHub. Read the source before you install it.

Installation

Install the Session State Management AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/session-state-management
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Session State Management in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Session State Management on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Session State Management is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Session State Management AI skill do?

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

Why use Session State Management on TypingMind?

Because you install it once and use it with any model. Session State Management is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Session State Management in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/UnpaidAttention/fable5-methodology/tree/main/skills/session-state-management. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Session State Management?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Session State Management?

As many as you like. As long as a model supports skills, you can use Session State Management with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Session State Management AI skill free?

It is published on GitHub by UnpaidAttention. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇