session-key-architecture

Explain session key mapping for message routing across chat platforms.

2|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/liuyu520/cc-connect-fork --skill session-key-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-key-architecture
Source: https://github.com/liuyu520/cc-connect-fork/tree/main/.claude/skills/session-key-architecture
Command: npx skills add https://github.com/liuyu520/cc-connect-fork --skill session-key-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Session keys are the backbone of routing messages to the correct conversation context, agent sessions, and project bindings across multiple platforms, enabling consistent routing and cross-thread continuity.

Core Features & Use Cases

  • Documents platform-specific session key formats (per-user, per-chat, channel-shared, and thread-isolated variants)
  • Describes BaseSessionKeyer as a fallback mechanism for cross-thread persistence
  • Provides guidance for debugging routing issues, project binding lookups, and platform integration decisions
  • Use Case: diagnosing why a /project switch does not persist when starting a new thread, and applying a base key to maintain binding
  • Use Case: designing a new platform integration with thread isolation and fallback keys

Quick Start

Describe how your platform derives session keys for a new integration and how to use the base key to maintain binding across threads.

Frequently Asked Questions about session-key-architecture

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

FAQPage Schema
How do session keys map incoming messages to conversations across multiple chat platforms?

Session keys map incoming messages to conversations by applying platform-specific key formats that route context to the correct agent session and project binding. BaseSessionKeyer acts as a fallback mechanism to maintain cross-thread persistence and routing continuity.

Why does a project switch not persist when starting a new thread?

Project switches do not persist across new threads because thread isolation generates unique keys. Applying a base session key via BaseSessionKeyer provides a fallback mechanism to maintain binding continuity and restore the active project context.

What is the best way to debug routing issues with project bindings and agent sessions?

Debugging routing issues requires verifying platform-specific session key formats and inspecting BaseSessionKeyer behavior. Check binding lookup and storage rules to identify mismatches between per-channel and per-user key strategies that break message routing.

Should I use per-channel or per-user binding strategies for multi-platform chat integrations?

Per-channel binding shares context across all users in a chat, while per-user binding isolates conversations to individuals. Choose per-channel for shared group routing and per-user for private interactions, using thread isolation to prevent context overlap.

How do I design a new platform integration with thread isolation and fallback keys?

Designing a new platform integration requires defining how the platform derives session keys and configuring BaseSessionKeyer as a fallback. This ensures thread isolation while maintaining project binding continuity across separate conversation threads.