# Session state

> Session state is an open-source agent skill for developer tools. Validates and records session state transitions for a research harness workflow. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/main/skills/session-state
- **Repository:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **GitHub stars:** 42
- **License:** MIT
- **Skill name:** session-state
- **Collection:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This internal skill governs how a Claude Code research workflow moves a session between states. It follows the state machine described in the project's SESSION_ORCHESTRATION.md document, checking that each transition is valid before recording it. Transitions cover updates at /work phase boundaries, escalation when an error occurs, a stopped state at session end, and restoring an initialized state when a session resumes.

The skill is meant for the workflow's own orchestration rather than for end users. It declares Read and Bash as its allowed tools and points to a reference file holding the detailed transition rules. It ships no scripts of its own, and its folder holds only the instructions and that reference document.

To use it, the project's orchestration document needs to be present in the repository, since the transition rules are defined there and not inside the skill.

## When your agent uses it

> Manages session state transitions per SESSION_ORCHESTRATION.md. Controls state updates at /work phase boundaries, escalated transitions on error, and initialized restoration on session resume. Internal workflow use only. Do NOT load for: user session management, login state, app state handling.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/session-state)
- [Asks for: Read, Bash](https://github.com/maxwell2732/claudecode-research-harness-workflow/blob/HEAD/skills/session-state/SKILL.md)
- [License: MIT](https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/session-state)

## Features

- **State transition validation:** Checks that each requested change follows the state machine defined in the orchestration document.
- **Phase boundary updates:** Records state changes as a /work run moves from one phase to the next.
- **Error escalation:** Moves the session into an escalated state when an error occurs during work.
- **Session end handling:** Marks the session as stopped when the workflow finishes.
- **Resume restoration:** Restores the initialized state when a previous session is resumed.

## Good for

- Record progress when a /work phase finishes
- Escalate the session state after a workflow error
- Mark a research session as stopped at its end
- Restore session state when resuming earlier work

## Install

### Claude Code

This skill ships in the `claudecode-research-harness-workflow` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add maxwell2732/claudecode-research-harness-workflow
/plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow
```

Or copy only this skill to `~/.claude/skills/session-state`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/session-state &&
cp -R "$tmp/skills/session-state" ~/.claude/skills/session-state &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/session-state` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/session-state` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/session-state &&
cp -R "$tmp/skills/session-state" ~/.agents/skills/session-state &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/session-state` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/session-state` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/session-state &&
cp -R "$tmp/skills/session-state" ~/.cursor/skills/session-state &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/session-state` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/maxwell2732/claudecode-research-harness-workflow.git --path skills/session-state
```

Or copy the folder to `~/.gemini/skills/session-state` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/session-state`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/session-state &&
cp -R "$tmp/skills/session-state" ~/.copilot/skills/session-state &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/session-state` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git
```

Then copy `claudecode-research-harness-workflow/skills/session-state` into your agent's skills folder as `session-state`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Who is Session state meant for?

It is for internal workflow use only, and the skill notes that direct invocation by users is not intended.

### What tools does Session state use?

Its allowed tools are Read and Bash.

### Where are the transition rules defined?

The rules are defined in docs/SESSION_ORCHESTRATION.md and detailed in a reference file within the skill folder.

### Does it handle user login or app session state?

No. Its description says not to load it for user session management, login state or app state handling.

### How do I install Session state in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/session-state to use it in all your projects, or to .claude/skills/session-state in one project. Or install the claudecode-research-harness-workflow plugin, which includes it: /plugin marketplace add maxwell2732/claudecode-research-harness-workflow, then /plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow.

### Does Session state run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Session state?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Session state?

The closest alternatives to Session state are Session control, Session, Session init, Close session and Scan sessions and learn.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Session control](https://ai-powered.com/skills/session-control): Session control is an open-source agent skill for developer tools.
- [Session](https://ai-powered.com/skills/session-maxwell2732): Session is an open-source agent skill for developer tools.
- [Session init](https://ai-powered.com/skills/session-init): Session init is an open-source agent skill for developer tools.
- [Close session](https://ai-powered.com/skills/close-session): Close session is an open-source agent skill for knowledge and memory.
- [Scan sessions and learn](https://ai-powered.com/skills/scan-sessions-and-learn): Scan sessions and learn is an open-source agent skill for developer tools.
- [Session hardening](https://ai-powered.com/skills/session-hardening): Session hardening is an open-source agent skill for developer tools.
- [Dynamic workflow mode](https://ai-powered.com/skills/dynamic-workflow-mode): Dynamic workflow mode is an open-source agent skill for developer tools.
- [Ck](https://ai-powered.com/skills/ck): Ck is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/session-state
