session-context

Manage user session context across multi-turn interactions with sessionStorage and KV caching.

3|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/paolomoz/skills --skill session-context-paolomoz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-context
Source: https://github.com/paolomoz/skills/tree/main/skills/session-context
Command: npx skills add https://github.com/paolomoz/skills --skill session-context-paolomoz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining user context and conversation history across multiple page loads or interactions without relying on traditional, heavy backend session stores.

Core Features & Use Cases

  • Client-Side State Management: Utilizes sessionStorage for immediate, in-session context.
  • Server-Side Persistence: Leverages KV stores (like Cloudflare KV) for durable, cross-page context with TTL.
  • Context Propagation: Enables passing context via URL parameters (inline or ID-based).
  • Use Case: Building a personalized e-commerce experience where the system remembers a user's browsing stage, previously viewed products, and search queries across their entire visit, even if they navigate between different product pages or sections.

Quick Start

Initialize the session context by calling the initializeContext function with your KV store.

Frequently Asked Questions about session-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track user sessions across multiple page loads in a web application?

Track user sessions across page loads using a hybrid approach: client-side sessionStorage for immediate in-session context and server-side KV caching with Time-To-Live for durable cross-page state persistence.

What is the best way to maintain conversation context without heavy backend session stores?

Maintain conversation context without heavy backend stores by propagating context via URL parameters and leveraging Cloudflare Workers KV caching with TTL for ephemeral state persistence across multi-turn interactions.

How do I implement user journey tracking for an e-commerce site on Cloudflare Workers?

Implement user journey tracking on Cloudflare Workers by initializing the session context with your KV store, enabling the system to remember browsing stages, viewed products, and search queries across different sections.

Does Cloudflare KV support TTL for ephemeral session state management?

Cloudflare KV supports TTL for ephemeral session state management by acting as a server-side persistence layer, ensuring conversation context expires automatically after a specified time-to-live duration.

Can I pass session context between pages using URL parameters?

You can pass session context between pages using URL parameters through either inline context propagation or ID-based referencing, allowing multi-turn interaction state to survive navigation across different product pages.