serverpod-sessions
OfficialManage session lifecycle safely in Dart.
Software Engineering#debugging#sessions#websocket#lifecycle management#serverpod#internalSession#async cleanup
Authorserverpod
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Prevents session-related bugs by teaching how Serverpod sessions are created, used, and closed so you avoid leaked resources and “session closed” errors.
Core Features & Use Cases
- Session types and lifetimes: Understand which session is created for method calls, web routes, streams, WebSockets, future calls, and manual internal sessions.
- Safe manual session management: Learn how to close
InternalSessionreliably (including why unclosed sessions leak memory and logs). - Cleanup callbacks and correct timing: Use
addWillCloseListenercorrectly and avoid capturing request sessions for work that runs after the endpoint returns. - Use case: When debugging a “StateError: session already closed” caused by a delayed callback (like a timer), apply the guidance to refactor the work into a future call or a fresh internal session.
Quick Start
Ask the assistant to explain which session type you’re using and how to refactor your code so it never uses a session after the endpoint returns.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: serverpod-sessions Download link: https://github.com/serverpod/serverpod/archive/main.zip#serverpod-sessions Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.