session-state_skill

This skill verifies and executes session state transitions according to internal rules to ensure reliable workflow progression.
  • Shell

212

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill chachamaru127/claude-code-harness --skill session-state

  • SKILL.md1.4 KB

Overview

This skill manages session state transitions for an internal orchestration engine. It validates and executes state changes according to the defined session state machine and is intended for use only within the runtime harness. Do not use this skill for user-facing session management, login state, or general application state handling.

How this skill works

The skill inspects incoming transition requests and checks them against the session orchestration rules to determine validity. When valid, it applies the transition, updates the session record, and emits the appropriate lifecycle events; when invalid, it rejects the change and returns diagnostics. It also supports special transitions for error escalation, stop, and resume flows.

When to use it

  • At phase boundaries in the internal work orchestration pipeline (e.g., before/after executing a work unit).
  • When an internal error requires escalating the session state to an error-handling workflow.
  • When terminating a session to ensure a clean 'stopped' state and resource release.
  • When resuming a paused session and needing to restore the 'initialized' or prior state.
  • When enforcing invariant checks on state transitions as part of automated coordination.

Best practices

  • Only invoke this skill from trusted internal components; avoid exposing it to external clients.
  • Always query the current session state before requesting a transition to prevent races.
  • Handle rejected transitions gracefully by logging diagnostics and triggering fallback logic.
  • Use emitted lifecycle events to drive side effects (metrics, cleanup, notifications) instead of embedding them here.
  • Keep transition requests idempotent where possible to tolerate retries.

Example use cases

  • Orchestrator triggers a transition from 'planning' to 'working' at the start of a work cycle.
  • Automatic escalation to an 'escalated' state when a worker encounters a non-recoverable error.
  • Graceful shutdown sequence switching sessions to 'stopped' and releasing allocated resources.
  • Resuming a suspended session by validating and moving it back to 'initialized' for review.

FAQ

No. This skill is designed strictly for internal session orchestration and not for user authentication or general application state management.

What happens if a requested transition is invalid?

The skill rejects the transition, returns diagnostic information, and emits an event so calling components can log, retry, or trigger fallback behavior.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
session-state skill by chachamaru127/claude-code-harness | VeilStrat