session-management
Manages orchestration session state, tracking, and resumption
от josstei★ 493 звезды на GitHub
Установить session-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Session Management Skill
Activate this skill for all session state operations during Maestro orchestration. This skill defines the protocols for creating, updating, resuming, and archiving orchestration sessions.
State Access Protocol
When MCP state tools are available, prefer them for state operations:
- Preferred: MCP tools (
initialize_workspace,create_session,update_session,transition_phase,get_session_status,archive_session) — structured I/O, atomic operations. - Fallback:
write_file/replacedirectly on state files — when MCP tools are not in the available tool list. - Legacy:
node <runtime-script-root>/read-active-session.js(used by command shell blocks to inject state before the first turn) /read-state.js <relative-path>— not the recommended path.
Detection: check whether MCP state tools appear in your available tools. If they do, use them. If they do not, use write_file/replace.
Hook-Level Session State
Maestro hooks keep a separate, ephemeral per-session directory (${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/, holding only the active-agent file). The orchestrator never reads or writes it and interacts only with <MAESTRO_STATE_DIR> paths.
Session Creation Protocol
When to Create
For Standard workflow, create a new session at execution setup after the design document and implementation plan are approved and the execution mode gate has resolved. For Express workflow, create a session after the structured brief is approved (see EXPRESS WORKFLOW step 34 in orchestration-steps).
Session ID Format
YYYY-MM-DD-<topic-slug>
Where:
YYYY-MM-DDis the orchestration start date<topic-slug>is a lowercase, hyphenated summary matching the design document topic
File Location
<MAESTRO_STATE_DIR>/state/active-session.md
All state paths in this skill use <MAESTRO_STATE_DIR> as their base directory (default: docs/maestro). In procedural steps, <state_dir> represents the resolved value of this variable.
Initialization Steps
- Resolve state directory from
MAESTRO_STATE_DIR - Create
<state_dir>/state/directory if it does not exist (defense-in-depth fallback — workspace readiness startup check is the primary mechanism) - Verify no existing
active-session.md— if one exists, alert the user and offer to archive or resume - Generate session state from the
session-statetemplate (load it withget_skill_content(["session-state"])if not already loaded), settingworkflow_modetostandardorexpressandtask_complexityfrom the design document frontmatter - Initialize all phases as
pending - Set overall status to
in_progress - Set
current_phaseto 1 - Record design document and implementation plan paths
- Initialize empty token_usage, file manifests, downstream_context, and errors sections
State Update Protocol
Update Triggers
Update session state on every meaningful state change:
- Phase status transitions
- File manifest changes
- Downstream context extraction from completed phases
- Error occurrences
- Token usage increments
- Phase completion or failure
Update Rules
- Timestamp: Update
updatedfield on every state change - Phase Status: Transition phase status following valid transitions:
pending->in_progressin_progress->completedin_progress->failedfailed->in_progress(retry)pending->skipped(user decision only)
- Current Phase: Update
current_phaseto the ID of the currently executing phase - File Manifest: Append to
files_created,files_modified, orfiles_deletedas subagents report changes - Downstream Context: Persist parsed Handoff Report Part 2 fields into phase
downstream_context - Token Usage: Aggregate token counts from subagent responses into both
total_*andby_agentsections - Error Recording: Append to phase
errorsarray with complete metadata
Error Recording Format
errors:
- agent: "<agent-name>"
timestamp: "<ISO 8601>"
type: "<validation|timeout|file_conflict|runtime|dependency|recovery>"
message: "<full error description>"
resolution: "<what was done to resolve, or 'pending'>"
resolved: false
Retry Tracking
- Increment
retry_counton each retry attempt - Maximum
MAESTRO_MAX_RETRIESretries per phase (default2) before escalating to user — see execution → Retry Logic - Record each retry as a separate error entry with resolution details
Markdown Body Updates
After updating YAML frontmatter, append to the Markdown body:
## Phase N: <Phase Name> <status indicator>
### <Agent Name> Output
[Summary of agent output or full content]
### Files Changed
- Created: [list]
- Modified: [list]
- Deleted: [list]
### Downstream Context
- Key Interfaces Introduced: [list]
- Patterns Established: [list]
- Integration Points: [list]
- Assumptions: [list]
- Warnings: [li
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл session-management?
Manages orchestration session state, tracking, and resumption
Как установить скилл session-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…