Agent skill

Sessions

by alsk1992 in alsk1992/CloddsBot

Session management, conversation history, and checkpoints. An agent skill from alsk1992/CloddsBot.

MITAuto-check passedBackend & APIs

Install Sessions

skills CLI
$ npx skills add alsk1992/CloddsBot --skill sessions -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alsk1992/CloddsBot sessions --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/bundled/sessions .claude/skills/sessions && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sessions
GitHub stars
2.9k
Token cost
~1.4k tokens
SKILL.md length
155 words
Files
2
Skills in repo
116
Repo updated
First seen
Licence
MIT

At a glance

Session management, conversation history, and checkpoints. An agent skill from alsk1992/CloddsBot.

  • Works in 5 steps: Choose appropriate scope —… → Use checkpoints — Before major changes… → Export regularly — Keep backups of… → …
  • Tasks that involve Authentication
  • SKILL.md covers Chat Commands, TypeScript API Reference, Session Scopes and Auto-Reset Behavior, plus 3 more sections
  • Runs TypeScript scripts from its folder; needs SESSION_KEY

What it does

Sessions is an agent skill from alsk1992/CloddsBot. Session management, conversation history, and checkpoints

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `index.ts`).

It sits in Backend & APIs, covering Authentication. The repository describes itself as: Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes… The licence is MIT.

When your agent uses it

  • Tasks that involve Authentication

Example prompts

  • “/sessions”

Requirements

  • Node.js
  • A credential in SESSION_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Choose appropriate scope — Per-channel-peer for multi-user
  2. Use checkpoints — Before major changes or experiments
  3. Export regularly — Keep backups of important conversations
  4. Set idle reset — Prevents stale context
  5. Enable encryption — For sensitive conversations

What it can do on your machine

Read from SKILL.md and the folder at commit c930628. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SESSION_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sessions loads about 1.4k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 155 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alsk1992/CloddsBot at commit c930628, republished under its MIT licence (© alsk1992). 155 words, ~1,430 tokens.

Download SKILL.mdSave it as .claude/skills/sessions/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sessions
description
Session management, conversation history, and checkpoints
emoji
💬

Sessions - Complete API Reference

Manage conversation sessions, history, checkpoints, and resets across channels.


Chat Commands

Session Control
/new                                        Start new conversation
/reset                                      Reset current session
/session                                    View session info
/session list                               List active sessions
Checkpoints
/checkpoint save "before refactor"          Save checkpoint
/checkpoint list                            List checkpoints
/checkpoint restore <id>                    Restore checkpoint
/checkpoint delete <id>                     Delete checkpoint
History
/history                                    View conversation history
/history export                             Export as markdown
/history clear                              Clear history (keeps session)
Settings
/session scope main                         Use main session
/session scope channel                      Per-channel sessions
/session scope peer                         Per-user sessions
/session reset-time 00:00                   Set daily reset time
/session idle-reset 30                      Reset after 30 min idle

TypeScript API Reference

Create Session Manager
typescript
import { createSessionManager } from 'clodds/sessions';

const sessions = createSessionManager({
  // Session scope
  scope: 'per-channel-peer',  // 'main' | 'per-peer' | 'per-channel-peer'

  // Auto-reset
  dailyResetHour: 0,  // Reset at midnight
  idleResetMinutes: 30,  // Reset after 30 min idle

  // Storage
  storage: 'sqlite',
  dbPath: './sessions.db',

  // Encryption
  encryptTranscripts: true,
  encryptionKey: process.env.SESSION_KEY,
});
Get or Create Session
typescript
const session = await sessions.getOrCreateSession({
  userId: 'user-123',
  channelId: 'telegram-456',
  peerId: 'peer-789',
});

console.log(`Session ID: ${session.id}`);
console.log(`Created: ${session.createdAt}`);
console.log(`Messages: ${session.messageCount}`);
console.log(`Last activity: ${session.lastActivityAt}`);
Add Message to History
typescript
// Add user message
await sessions.addMessage({
  sessionId: session.id,
  role: 'user',
  content: 'What is my portfolio value?',
});

// Add assistant message
await sessions.addMessage({
  sessionId: session.id,
  role: 'assistant',
  content: 'Your portfolio is worth $10,234.56',
  usage: {
    inputTokens: 500,
    outputTokens: 200,
  },
});
Get History
typescript
// Get conversation history
const history = await sessions.getHistory(session.id, {
  limit: 50,
  format: 'messages',  // 'messages' | 'markdown' | 'text'
});

for (const msg of history) {
  console.log(`[${msg.role}] ${msg.content}`);
}
Clear History
typescript
// Clear conversation but keep session
await sessions.clearHistory(session.id);
Reset Session
typescript
// Full reset (new session)
await sessions.reset({
  userId: 'user-123',
  channelId: 'telegram-456',
});
Checkpoints
typescript
// Save checkpoint
const checkpoint = await sessions.saveCheckpoint({
  sessionId: session.id,
  name: 'Before major change',
  description: 'Saving state before refactoring trading strategy',
});

console.log(`Checkpoint ID: ${checkpoint.id}`);
console.log(`Messages saved: ${checkpoint.messageCount}`);

// List checkpoints
const checkpoints = await sessions.listCheckpoints(session.id);

for (const cp of checkpoints) {
  console.log(`${cp.id}: ${cp.name} (${cp.messageCount} messages)`);
}

// Restore checkpoint
await sessions.restoreCheckpoint(checkpoint.id);

// Delete checkpoint
await sessions.deleteCheckpoint(checkpoint.id);
Export Session
typescript
// Export as markdown
const markdown = await sessions.export(session.id, {
  format: 'markdown',
  includeMetadata: true,
});

// Export as JSON
const json = await sessions.export(session.id, {
  format: 'json',
});
Session Cleanup
typescript
// Delete old sessions
await sessions.cleanup({
  olderThan: '30d',  // Delete sessions older than 30 days
  keepCheckpoints: true,
});

Session Scopes

ScopeDescriptionUse Case
mainSingle global sessionPersonal use
per-peerSession per userMulti-user, shared channels
per-channel-peerSession per user per channelFull isolation

Auto-Reset Behavior

TriggerBehavior
Daily resetNew session at configured hour
Idle resetNew session after inactivity
Manual resetUser runs /new or /reset

Encryption

When encryptTranscripts: true:

  • All messages encrypted with AES-256-GCM
  • Per-session encryption keys
  • Secure key derivation from master key

Context Window Management

typescript
// Get context-aware history (for LLM)
const context = await sessions.getContextHistory({
  sessionId: session.id,
  maxTokens: 100000,  // Fit in context window
  strategy: 'smart',  // 'recent' | 'smart' | 'summarize'
});

// 'smart' keeps system messages + recent + important messages
// 'summarize' compresses old messages into summaries

Best Practices

  1. Choose appropriate scope — Per-channel-peer for multi-user
  2. Use checkpoints — Before major changes or experiments
  3. Export regularly — Keep backups of important conversations
  4. Set idle reset — Prevents stale context
  5. Enable encryption — For sensitive conversations

© alsk1992, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in src/skills/bundled/sessions of alsk1992/CloddsBot.

  • SKILL.md
  • index.ts

Open the folder on GitHubat commit c930628

Compare with similar skills

Sessions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sessions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sessions this skillalsk1992/CloddsBot2.9k—~1.4kAutomated safety check: PassMIT
Fortify Developmentcoollabsio/coolify63k4 repos~1.9kAutomated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Better Auth Best Practiceslatitude-dev/latitude-llm4.7k7 repos~1.6kAutomated safety check: PassMIT
Supabasecurvenote/curvenote1695 repos~2.2kAutomated safety check: PassCustom licence
Gitnexus Exploringaws-samples/sample-kolya-br-proxy10611 repos~749Automated safety check: PassMIT-0

Similar skills

  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Better Auth Best Practices

    latitude-dev/latitude-llm

    Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables.

    4.7k GitHub starsUsed in 7 repos~1.6k tokens
    Backend & APIsAuto-check passed
  • Supabase

    curvenote/curvenote

    A skill your agent uses when doing ANY task involving Supabase.

    169 GitHub starsUsed in 5 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Gitnexus Exploring

    aws-samples/sample-kolya-br-proxy

    Official

    A skill your agent uses when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase.

    106 GitHub starsUsed in 11 repos~749 tokens
    Backend & APIsAuto-check passed
  • Agentic Wallet

    coinbase/agentic-wallet-skills

    Crypto wallet operations via the awal CLI — sign in, check balances, send USDC/ETH/POL/SOL, trade tokens, fund the wallet, and use the x402 payment protocol to discover paid services, pay for API…

    127 GitHub starsUsed in 3 repos~1k tokens
    Backend & APIsAuto-check passed

More from alsk1992/CloddsBot

All 116 skills in this repo
  • Qmd

    alsk1992/CloddsBot

    Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • Drift SDK

    alsk1992/CloddsBot

    Drift Protocol perpetual futures trading on Solana (direct SDK)

    2.9k GitHub starsUsed in 1 repo~625 tokens
    Auto-check passed
  • Edge

    alsk1992/CloddsBot

    Find mispriced markets by comparing to external models and data sources

    2.9k GitHub starsUsed in 1 repo~472 tokens
    Auto-check passed
  • Embeddings

    alsk1992/CloddsBot

    Vector embeddings configuration and semantic search. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • News

    alsk1992/CloddsBot

    Monitor news and correlate with prediction market movements. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 1 repo~462 tokens
    Auto-check passed
  • Opportunity

    alsk1992/CloddsBot

    Find and execute cross-platform arbitrage opportunities across prediction markets

    2.9k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Categories

Questions about Sessions

What does Sessions do?

Session management, conversation history, and checkpoints. An agent skill from alsk1992/CloddsBot. Sessions is an agent skill from alsk1992/CloddsBot.

When should I use Sessions?

Sessions fits situations like: tasks that involve Authentication.

How do I install Sessions in Claude Code?

Run `npx skills add alsk1992/CloddsBot --skill sessions -a claude-code`. Or copy the skill folder (src/skills/bundled/sessions in alsk1992/CloddsBot) into .claude/skills/sessions in your project. Claude Code loads it when a task matches its description.

How do I install Sessions in Codex?

Run `npx skills add alsk1992/CloddsBot --skill sessions -a codex`. Or copy the skill folder (src/skills/bundled/sessions in alsk1992/CloddsBot) into .agents/skills/sessions in your project. Codex loads it when a task matches its description.

Can I use Sessions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alsk1992/CloddsBot --skill sessions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sessions, .gemini/skills/sessions, .github/skills/sessions and .opencode/skills/sessions in your project.

What does Sessions need to run?

Going by SKILL.md and its folder, Sessions needs TypeScript for the scripts in its folder and credentials named SESSION_KEY. Our summary lists: Node.js; A credential in SESSION_KEY.

Does Sessions access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sessions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sessions use?

Sessions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sessions use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sessions?

Skills that share tags, products or a category with Sessions: Fortify Development (coollabsio/coolify, 63k stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars), Better Auth Best Practices (latitude-dev/latitude-llm, 4.7k stars) and Supabase (curvenote/curvenote, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sessions?

alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,903 GitHub stars. The repository holds 116 skills in this directory. The repository was last updated on October 2, 2026.

Source: alsk1992/CloddsBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.