session-state
Skill4 starsChanged 12 days agoMITView on GitHub
This skill should be used when the user asks to "save session", "resume session", "continue where I left off", "session history", or needs orchestrator session state persistence including save, load, resume, and history management.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- NickKostovny/marketing-playbookstheir own version, first seen Nov 8, 2026
- danielvm-git/bigpowerstheir own version, first seen Nov 6, 2026
- LazyIsEfficient/agentic-ostheir own version, first seen Oct 22, 2026
- itsmuskanagarwal/claude-packtheir own version, first seen Oct 11, 2026
- camunda/camundatheir own version, first seen Oct 8, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- camunda/camunda★ 4.4ksame name
- danielvm-git/bigpowers★ 288same name
- LazyIsEfficient/agentic-os★ 17same name
- itsmuskanagarwal/claude-pack★ 0same name
- NickKostovny/marketing-playbooks★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- system-architectSkill
- project-detectorSkill
- audit-routerSkill
- command-skill-token-efficiencySkill
- plugin-auditSkill
- sync-featuresSkill
- backend-designerSkill
- devops-helperSkill
- frontend-designerSkill
- git-workflowSkill
- dist-extrasSkill
- distribution-strategistSkill
- homebrew-formula-expertSkill
- homebrew-multi-formulaSkill
- homebrew-setup-wizardSkill
- homebrew-workflow-expertSkill
- architecture-decision-recordsSkill
- changelog-automationSkill
- claude-md-lifecycleSkill
- guard-auditSkill
- hooksSkill
- insights-applySkill
- mode-controllerSkill
- drive-engineSkill
- plan-orchestratorSkill
- repo-triageSkill
- task-analyzerSkill
- workflow-engineSkill
- orchestrator-resilienceSkill
- project-plannerSkill
- preflight-checkSkill
- releaseSkill
- test-generatorSkill
- test-strategistSkill
- adhd-workflowSkill
- brainstorm-insightsSkill
- brainstormSkill
- grillSkill
- prompt-refinerSkill
- background-task-managerSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 181
When user says continue:
- Distinctive: line 250
If session file is corrupted:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session State Manager
Handles persistent state for orchestrator sessions, enabling resume after disconnects.
Scope — Not to Be Confused With orchestrate:resume
"Resume" here means resuming orchestrator-v2 session state: reloading
.claude/orchestrator-session.json so an in-progress multi-agent orchestration can continue where
it left off (see Resume Flow below). This skill has no relationship to the orchestrate:resume
slash command, which was a separate, fictional 523-line command removed in #239. If a request seems
to want "bring back the old orchestrate:resume command," that is out of scope for this skill —
this skill only manages the session-state JSON files described below.
State File Location
.claude/orchestrator-session.json # Current session (project-local)
.claude/orchestrator-history/ # Session history (project-local)
└── 2025-12-27-abc123.json # Archived sessionsSession State Schema
{
"schema_version": "1.0",
"session_id": "2025-12-27-abc123",
"created": "2025-12-27T10:30:00Z",
"updated": "2025-12-27T11:45:00Z",
"project": {
"name": "my-project",
"path": "/path/to/my-project",
"git_branch": "dev"
},
"goal": "Add sensitivity analysis to RMediation::medci()",
"mode": "default",
"status": "in_progress",
"agents": [
{
"id": "arch-1",
"type": "arch",
"task": "Design sensitivity API",
"status": "complete",
"started": "2025-12-27T10:30:00Z",
"completed": "2025-12-27T10:32:00Z",
"result_summary": "3 methods proposed: bootstrap, delta, MCMC",
"context_tokens": 1500
},
{
"id": "code-1",
"type": "code",
"task": "Implement primary method",
"status": "in_progress",
"started": "2025-12-27T10:32:00Z",
"progress": 60,
"context_tokens": 3200
}
],
"completed_work": [
{
"task": "Architecture design",
"outcome": "3 methods proposed",
"files": ["R/sensitivity.R"]
}
],
"pending_tasks": [
"Complete code-1 implementation",
"Add unit tests",
"Update documentation"
],
"decisions_made": [
{
"decision": "Use bootstrap for confidence intervals",
"rationale": "Best balance of accuracy and performance",
"timestamp": "2025-12-27T10:31:00Z"
}
],
"context_usage": {
"estimated_tokens": 25000,
"percentage": 20,
"last_compression": null
},
"errors": []
}Operations
Save Session
Called automatically on:
- Agent completion
- User says
save - Before compression
- On abort
def save_session(state: dict) -> Path:
"""Save current session state."""
state["updated"] = datetime.now().isoformat()
session_file = Path(".claude/orchestrator-session.json")
session_file.parent.mkdir(exist_ok=True)
session_file.write_text(json.dumps(state, indent=2))
return session_fileLoad Session
Called when user says continue:
def load_session() -> Optional[dict]:
"""Load existing session if available."""
session_file = Path(".claude/orchestrator-session.json")
if not session_file.exists():
return None
state = json.loads(session_file.read_text())
# Validate schema version
if state.get("schema_version") != "1.0":
return None # Incompatible version
return stateArchive Session
Called on session completion or new session start:
def archive_session(state: dict) -> Path:
"""Move session to history."""
history_dir = Path(".claude/orchestrator-history")
history_dir.mkdir(exist_ok=True)
archive_file = history_dir / f"{state['session_id']}.json"
archive_file.write_text(json.dumps(state, indent=2))
# Remove current session file
Path(".claude/orchestrator-session.json").unlink(missing_ok=True)
return archive_fileList History
def list_history(limit: int = 10) -> list[dict]:
"""List recent sessions."""
history_dir = Path(".claude/orchestrator-history")
if not history_dir.exists():
return []
sessions = []
for f in sorted(history_dir.glob("*.json"), reverse=True)[:limit]:
state = json.loads(f.read_text())
sessions.append({
"id": state["session_id"],
"goal": state["goal"],
"status": state["status"],
"created": state["created"]
})
return sessionsResume Flow
When user says continue:
## 🔄 RESUMING SESSION
**Session ID**: 2025-12-27-abc123
**Goal**: Add sensitivity analysis to RMediation::medci()
**Started**: 2 hours ago
**Progress**: 60% complete
### Completed Work
- ✅ Architecture design (3 methods proposed)
- ✅ Test stubs created
### In Progress
- 🔄 code-1: Implement primary method (60%)
### Pending
1. Complete code-1 implementation
2. Add unit tests
3. Update documentation
### Context Budget
- Tokens used: ~25,000 (20%)
- Last compression: Never
**Resuming from code-1...**State Transitions
┌─────────────────────────────────────────────────────────┐
│ Session Lifecycle │
├─────────────────────────────────────────────────────────┤
│ │
│ [new task] ──► CREATED ──► IN_PROGRESS ──► COMPLETE │
│ │ │ │ │
│ │ │ ▼ │
│ │ │ [archive] │
│ │ │ │
│ │ ▼ │
│ │ PAUSED ◄── [disconnect] │
│ │ │ │
│ │ ▼ │
│ │ [continue] │
│ │ │ │
│ │ ▼ │
│ └────► IN_PROGRESS │
│ │
│ [abort] ──► ABORTED ──► [archive] │
│ │
└─────────────────────────────────────────────────────────┘Auto-Save Triggers
| Event | Action |
| Agent starts | Update state, save |
| Agent completes | Update result, save |
| Agent fails | Log error, save |
| Decision made | Log decision, save |
User says save | Force save |
| Compression | Save before compress |
| Session end | Archive |
Error Recovery
If session file is corrupted:
## ⚠️ SESSION RECOVERY
The previous session file appears corrupted.
**Options**:
1. **Start fresh**: Begin new session (old state lost)
2. **View history**: Check archived sessions
3. **Manual recovery**: I'll try to extract what I can
Which would you prefer?Integration with Orchestrator
The orchestrator calls session state operations at key points:
# On startup
if args == "continue":
state = load_session()
if state:
resume_from_state(state)
else:
print("No session to resume")
# On task analysis
state = create_new_session(goal, mode)
save_session(state)
# On agent completion
update_agent_status(state, agent_id, "complete", result)
save_session(state)
# On shutdown
if status == "complete":
archive_session(state)
else:
save_session(state) # Keep for resumeDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

