Agent skill

Slm Session

by qualixar in qualixar/superlocalmemory

Manage SuperLocalMemory session lifecycle — call sessioninit once at the start of every fresh session to load relevant project context and get a sessionid; call closesession when work is…

AGPL-3.0Auto-check: notesAgent Workflows

Install Slm Session

skills CLI
$ npx skills add qualixar/superlocalmemory --skill slm-session -a claude-code

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

GitHub CLI
$ gh skill install qualixar/superlocalmemory slm-session --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/qualixar/superlocalmemory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/slm-session .claude/skills/slm-session && 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
slm-session
GitHub stars
227
Token cost
~2.5k tokens
SKILL.md length
1,028 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Manage SuperLocalMemory session lifecycle — call sessioninit once at the start of every fresh session to load relevant project context and get a sessionid; call closesession when work is…

  • Works in 6 steps: Derives a search query from project_path… → Runs a 2-tier recall: full daemon… → Merges any pinned "core memory" facts… → …
  • Agent Workflows work in your project
  • SKILL.md covers The lifecycle in one diagram, session_init — call once per…, close_session — call when work… and Why this matters, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Slm Session is an agent skill from qualixar/superlocalmemory. Manage SuperLocalMemory session lifecycle — call sessioninit once at the start of every fresh session to load relevant project context and get a sessionid; call closesession when work is meaningfully complete to commit temporal summaries. Correct lifecycle hygiene is what makes SLM's learning loop work.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. It works with Model Context Protocol. The repository describes itself as: Open-source governed, local-first memory control plane for AI agents and teams. arXiv:2608.08253. The licence is AGPL-3.0.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/slm-session”

Requirements

  • Pre-approved tools (allowed-tools): session_init, close_session, Bash

Workflow steps

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

  1. Derives a search query from project_path (or uses your explicit query).
  2. Runs a 2-tier recall: full daemon retrieval (primary) or FTS5 BM25
  3. Merges any pinned "core memory" facts with the recall results.
  4. Applies an age gate — memories older than max_age_days are suppressed
  5. Returns a pre-formatted context block and a structured memories array
  6. Generates a stable session_id (slm-YYYYMMDD-<8hex>) and returns it.

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • session_init
    • close_session
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json and bash).

    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 no API keys, tokens, secrets or passwords.

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

Context cost

Slm Session loads about 2.5k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 1,028 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: session_init, close_session, Bash

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 qualixar/superlocalmemory at commit ce2d7a9, republished under its AGPL-3.0 licence (© qualixar). 1,028 words, ~2,502 tokens.

Download SKILL.mdSave it as .claude/skills/slm-session/SKILL.md (or your agent's skills folder).
name
slm-session
description
Manage SuperLocalMemory session lifecycle — call session_init once at the start of every fresh session to load relevant project context and get a session_id; call close_session when work is meaningfully complete to commit temporal summaries. Correct lifecycle hygiene is what makes SLM's learning loop work.
allowed-tools
session_init, close_session, Bash
when_to_use
- At the start of every session (auto-trigger on first user message in a project context) - When the user says "start a new session" or "initialize memory"…

slm-session — Session Lifecycle Hygiene

Session lifecycle is the mechanism that makes SuperLocalMemory's learning loop work. Without it, recall signals are not attributed and temporal summaries are not written. This is not optional housekeeping — it is load-bearing.


The lifecycle in one diagram

Session starts
     |
     v
session_init(project_path, query)
     |--- returns session_id, context, memories
     |
     v
Use session_id in every recall() and remember() call
     |
     v
Work completes
     |
     v
close_session(session_id)
     |--- writes temporal summaries to DB

session_init — call once per fresh session

When to call

Call session_init exactly once at the start of every fresh session, before any recall or remember. Never call it twice in a session — the second call would generate a new session_id and break signal attribution for any prior recalls or remembers in that session.

Signature
session_init(
  project_path: str = "",  # working directory path, e.g. "~/projects/foo"
  query: str = "",         # topic override; if omitted, derived from project_path
  max_results: int = 10,   # max memories to return (default: 10)
  max_age_days: int = 30,  # suppress memories older than N days unless score >= 0.7
                           # set to 0 to disable the age gate entirely
)
What it does
  1. Derives a search query from project_path (or uses your explicit query).
  2. Runs a 2-tier recall: full daemon retrieval (primary) or FTS5 BM25 (emergency fallback if daemon is unreachable).
  3. Merges any pinned "core memory" facts with the recall results.
  4. Applies an age gate — memories older than max_age_days are suppressed unless their relevance score is 0.70 or above (architectural decisions that remain permanently relevant still surface).
  5. Returns a pre-formatted context block and a structured memories array for your session.
  6. Generates a stable session_id (slm-YYYYMMDD-<8hex>) and returns it.
Real response shape
json
{
  "success": true,
  "session_id": "slm-20260616-a3f8c1d2",
  "context": "# Relevant Memory Context\n\n- JWT tokens use 1h expiry ...",
  "memories": [
    {
      "fact_id": "f8a2bc91",
      "content": "JWT tokens use 1h expiry for API auth (2026-06-10)",
      "score": 0.87,
      "is_core": false
    }
  ],
  "memory_count": 3,
  "core_memory": [],
  "degraded_mode": false,
  "retrieval_mode": "full_6_channel",
  "calibration_status": "uncalibrated",
  "calibration_id": null,
  "answer_confidence": null,
  "abstained": false,
  "abstention_reason": null,
  "learning": {
    "feedback_signals": 37,
    "phase": 1,
    "status": "collecting"
  }
}

Check degraded_mode. When true, the daemon was unreachable and only FTS5 BM25 was used — semantic, graph, temporal, and structural channels were unavailable. The context is still usable; note the degradation if relevant.

Check abstained. If true, the memories returned in context and memories do not answer the query that seeded this session — say so, or ask, rather than presenting them as settled fact. This is most relevant when you passed an explicit query; the default project-context query rarely has a single "right answer" for a judge to evaluate. answer_confidence is a measurement, not a guarantee. calibration_status: "uncalibrated" means no judge is configured, and abstained then only reflects the older "nothing found" signal. See slm-recall for the full rule, which applies identically here.

Check learning.phase:

  • Phase 1 (< 50 signals): collecting baseline feedback
  • Phase 2 (50–199 signals): active learning
  • Phase 3 (≥ 200 signals): full ML-driven ranking
How to use the returned session_id

Store it and thread it into every recall and remember call in this session:

session_id = "<value from session_init>"

recall(query="auth strategy", session_id=session_id, limit=10)
remember(content="...", session_id=session_id, tags="auth,decision", project="myapp")

This attribution is what allows the ranker to learn which recalls led to useful outcomes for this project. It also gives the session a small working set, so successive recalls in one conversation build on what the earlier ones surfaced instead of each starting cold.

Do not synthesise a session id. An id beginning http:, mcp:, cli: or probe: is read as a synthetic per-request label rather than a conversation and is deliberately excluded from that working set. Use the one session_init returned, unchanged, for the whole session.


close_session — call when work is meaningfully complete

When to call

Call close_session when a meaningful unit of work is done — end of a coding session, after shipping a feature, after a design review. You do not need to call it after every small interaction. The signal is "this session's work is committed and should be summarised."

Do not call it at the start of a new session as a cleanup step — session_init is the correct opener and it does not require a prior close.

Signature
close_session(
  session_id: str = "",  # the session_id from session_init; if omitted,
                         # the system queries the DB for the most recent session
)
What it does

Aggregates facts written during the session into per-entity temporal summary events. These summaries enable future queries like "what happened during session X?" and contribute to the temporal channel in retrieval.

Real response shape
json
{
  "success": true,
  "session_id": "slm-20260616-a3f8c1d2",
  "summary_events_created": 4
}

summary_events_created: 0 is normal for short sessions where no new facts were written. It is not an error.


Show full SKILL.md (445 more words)Show less

Why this matters

Every recall call with a session_id enqueues engagement signals — which results were shown, which were acted on. The learning ranker processes these signals to gradually up-weight channels and facts that prove useful for your project. Without session_id, signals land on a fallback identifier and are never attributed to a project or agent. Over many sessions this compounds: projects where lifecycle is respected have measurably better retrieval quality than projects where session_init is skipped.

Within a single session it compounds faster. The session's working set holds the memories its recalls have already surfaced, and later recalls rank those higher, so a long conversation converges on the material it is actually about.

Closing the loop explicitly

Engagement signals say a memory was shown. report_outcome says it was right:

report_outcome(memory_ids="<ids you actually used>", outcome="success")

Send it when a recalled memory changed what you did, and send failure when a confidently-returned memory turned out to be wrong — that is the only signal that stops a stale memory from being promoted. See the slm-recall skill.


CLI fallback (when MCP is unavailable)

There are no direct session_init or close_session CLI subcommands. When MCP is unavailable, use slm status to check system health and slm recall / slm remember directly. Session attribution will not be available in degraded CLI-only mode.

bash
slm status [--json]    # check mode, profile, DB size, fact count
slm doctor [--json]    # preflight check including daemon and embedding worker

Common mistakes

MistakeConsequenceFix
Calling session_init twice in one sessionTwo session IDs; signals split across themCall once; store the returned ID
Omitting session_id from recall / rememberNo learning attribution, and every turn starts coldAlways pass the stored session_id
Inventing a session_id such as mcp:agent or http:1234Read as synthetic, excluded from the working setUse the id session_init returned
Never reporting an outcomeRanking cannot tell a useful memory from a merely returned onereport_outcome after a recall that changed what you did
Never calling close_sessionTemporal summaries not writtenCall at end of each meaningful work unit
Calling close_session without a session_id when no prior writes existReturns error "No session_id found"Pass the explicit session_id from session_init

Profile context (v3.8.0+)

session_init operates on the currently active profile. If you need to start a session on a different workspace, call switch_profile (requires code, full, or power MCP profile) before session_init, then call session_init for that workspace. See slm-profile for workspace switching.

The returned memories array reflects facts stored in the active profile only. To also surface shared or global facts in the initial context, pass the query explicitly and call recall with include_global/include_shared after session_init. See slm-scope for the sharing model.


  • slm-recall — multi-channel retrieval during the session
  • slm-remember — store durable facts during the session
  • slm-profile — workspace isolation and profile switching
  • slm-scope — multi-scope sharing model

SuperLocalMemory v4.1.21 · Qualixar · AGPL-3.0-or-later

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

Files

Just SKILL.md in plugin/skills/slm-session of qualixar/superlocalmemory.

Open the folder on GitHubat commit ce2d7a9

Compare with similar skills

Slm Session 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.

Slm Session compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Slm Session this skillqualixar/superlocalmemory227—~2.5kAutomated safety check: NotesAGPL-3.0
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Fastmcp Client CLIPrefectHQ/fastmcp28k1 repos~823Automated safety check: PassApache-2.0
MemPalace Memory SearchMemPalace/mempalace59k—~1.4kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Agent WorkflowsAuto-check passed
  • MemPalace Memory Search

    MemPalace/mempalace

    Mines project files and conversation exports into a local, searchable memory palace and recalls past work by semantic search through the mempalace CLI.

    59k GitHub stars~1.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from qualixar/superlocalmemory

All 13 skills in this repo
  • Superlocalmemory

    qualixar/superlocalmemory

    AI agent memory with mathematical foundations. An agent skill from qualixar/superlocalmemory.

    227 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Slm Graph

    qualixar/superlocalmemory

    Index and query a codebase as a structural graph — build the code graph, trace blast radius of a change, find callers/callees/inheritors, semantic code search by meaning, assemble PR review context…

    227 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • Slm Loop

    qualixar/superlocalmemory

    Run gate-verified bounded loops with SuperLocalMemory as the durable ledger.

    227 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Slm Recall

    qualixar/superlocalmemory

    Search and retrieve facts, decisions, and past context from SuperLocalMemory.

    227 GitHub stars~3.3k tokensUpdated today
    Auto-check: notes
  • Slm Remember

    qualixar/superlocalmemory

    Capture durable facts, decisions, constraints, and gotchas into SuperLocalMemory.

    227 GitHub stars~2.3k tokensUpdated today
    Auto-check: notes
  • Slm Scope

    qualixar/superlocalmemory

    Controls memory visibility across profiles — personal (private, default), shared (selected profiles), or global (all profiles on this machine).

    227 GitHub stars~1.4k tokensUpdated today
    Auto-check: notes

Categories

Questions about Slm Session

What does Slm Session do?

Manage SuperLocalMemory session lifecycle — call sessioninit once at the start of every fresh session to load relevant project context and get a sessionid; call closesession when work is…. Slm Session is an agent skill from qualixar/superlocalmemory. Manage SuperLocalMemory session lifecycle — call sessioninit once at the start of every fresh session to load relevant project context and get a sessionid; call closesession when work is meaningfully complete to commit temporal summaries.

When should I use Slm Session?

Slm Session fits situations like: agent Workflows work in your project.

How do I install Slm Session in Claude Code?

Run `npx skills add qualixar/superlocalmemory --skill slm-session -a claude-code`. Or copy the skill folder (plugin/skills/slm-session in qualixar/superlocalmemory) into .claude/skills/slm-session in your project. Claude Code loads it when a task matches its description.

How do I install Slm Session in Codex?

Run `npx skills add qualixar/superlocalmemory --skill slm-session -a codex`. Or copy the skill folder (plugin/skills/slm-session in qualixar/superlocalmemory) into .agents/skills/slm-session in your project. Codex loads it when a task matches its description.

Can I use Slm Session 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 qualixar/superlocalmemory --skill slm-session -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/slm-session, .gemini/skills/slm-session, .github/skills/slm-session and .opencode/skills/slm-session in your project.

What does Slm Session need to run?

SKILL.md names no scripts, command-line tools or credentials: Slm Session is instructions for the agent only. Its frontmatter pre-approves these tools: session_init, close_session, Bash.

Does Slm Session 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 Slm Session safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Slm Session use?

Slm Session is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Slm Session use?

About 2.5k tokens (SKILL.md is roughly 10k 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 Slm Session?

Skills that share tags, products or a category with Slm Session: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Fastmcp Client CLI (PrefectHQ/fastmcp, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Slm Session?

qualixar (a GitHub organization) maintains it in qualixar/superlocalmemory, which has 227 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 8, 2026.

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