Agent skill

Server Storage

by stello-agent in stello-agent/stello

@stello-ai/server 的 PG 持久化层设计决策和实现模式。触发条件:修改或引用 server 存储层. An agent skill from stello-agent/stello.

Apache-2.0Auto-check passed

Install Server Storage

skills CLI
$ npx skills add stello-agent/stello --skill server-storage -a claude-code

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

GitHub CLI
$ gh skill install stello-agent/stello server-storage --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/stello-agent/stello.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/server-storage .claude/skills/server-storage && 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
server-storage
GitHub stars
112
Token cost
~470 tokens
SKILL.md length
161 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
Apache-2.0

At a glance

@stello-ai/server 的 PG 持久化层设计决策和实现模式。触发条件:修改或引用 server 存储层. An agent skill from stello-agent/stello.

  • SKILL.md covers Schema 设计决策, 3 个 Storage Adapter and 关键实现模式
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Server Storage is an agent skill from stello-agent/stello. @stello-ai/server 的 PG 持久化层设计决策和实现模式。触发条件:修改或引用 server 存储层。

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

The repository describes itself as: Conversations aren't linear — why should AI chats be? The first open-source conversation topology engine. Auto-branching session trees, inherited memory, star-map visualization… The licence is Apache-2.0.

Example prompts

  • “/server-storage”

What it can do on your machine

Read from SKILL.md and the folder at commit 3bc9493. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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

Server Storage loads about 470 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 161 words of instructions outside code blocks.

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

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 stello-agent/stello at commit 3bc9493, republished under its Apache-2.0 licence (© stello-agent). 161 words, ~470 tokens.

Download SKILL.mdSave it as .claude/skills/server-storage/SKILL.md (or your agent's skills folder).
name
server-storage
description
@stello-ai/server 的 PG 持久化层设计决策和实现模式。触发条件:修改或引用 server 存储层。

Server Storage Layer — PG 持久化

相关 skill:storage-design(接口定义)、server-design(传输层)


Schema 设计决策

7 张表:users, spaces, sessions, records, session_data, session_refs, core_data

  • 不需要 topology_nodes 表 — TopologyNode 从 sessions 表派生(SELECT id, parent_id, label)
  • children/refs 不存列 — WHERE parent_id= 派生 children,JOIN session_refs 派生 refs
  • session_data 统一槽位 — 不同 key 存不同语义(system_prompt / insight / memory / scope / index),避免列爆炸
  • records 表共享 — session 包和 core 包各自投影字段(Message 无 metadata,TurnRecord 有)
  • CASCADE 删除 — sessions ON DELETE CASCADE 级联到 records、session_data、session_refs

3 个 Storage Adapter

Adapter实现接口职责
PgSessionStorageSessionStorage(@stello-ai/session)单个 Session 数据操作(含 root,所有 Session 同构)
PgSessionTreeSessionTree(@stello-ai/core)拓扑:createSession / listRoots / 树操作 / 固化配置
PgMemoryEngineMemoryEngine(@stello-ai/core)核心数据读写、递归上下文组装

批量 digest 收集由 StelloAgent.listSessionDigests() 在应用层组合 SessionTree.listAll() + SessionStorage.getMemory/getInsight 完成,存储层不需要提供专用方法。


关键实现模式

spaceId 隔离

所有 adapter 构造时绑定 spaceId,所有 SQL 查询 WHERE space_id = $1。多租户隔离在查询层保证。

Slot 统一存储

session_data (session_id, key) 表,UPSERT 模式 ON CONFLICT (session_id, key) DO UPDATE。

两种 SessionMeta 投影

PG 存 sessions 表超集。不同 adapter 投影为不同类型:

  • PgSessionStorage → @stello-ai/session 的 SessionMeta(id / label / status / createdAt / updatedAt)
  • PgSessionTree → @stello-ai/core 的 SessionMeta(含 scope / turnCount / lastActiveAt)+ TopologyNode(纯树结构)
递归 CTE

getAncestors、getAllDescendantIds、assembleContext 都用 WITH RECURSIVE 遍历树结构。

事务支持

PgSessionStorage.transaction() 通过类型判断区分 Pool 与 PoolClient。Pool 时获取独占 client 开事务,PoolClient 时直接执行。

© stello-agent, Apache-2.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 .agents/skills/server-storage of stello-agent/stello.

Open the folder on GitHubat commit 3bc9493

Compare with similar skills

Server Storage 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.

Server Storage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Server Storage this skillstello-agent/stello112—~470Automated safety check: PassApache-2.0
Object Storagesickn33/agentic-awesome-skills47k2 repos~2.6kAutomated safety check: PassMIT
Neon Object Storagesickn33/agentic-awesome-skills47k1 repos~2.9kAutomated safety check: NotesApache-2.0
Web Storagethedaviddias/Front-End-Checklist74k—~506Automated safety check: PassMIT
Token Storage Securitythedaviddias/Front-End-Checklist74k—~604Automated safety check: PassMIT
Django Storages for S3Jeffallan/claude-skills12k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Object Storage

    sickn33/agentic-awesome-skills

    Configure object storage with S3, GCS, and MinIO. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.6k tokens
    Backend & APIsAuto-check passed
  • Neon Object Storage

    sickn33/agentic-awesome-skills

    S3-compatible object storage that branches with your Neon project, so files and the database stay in sync across every branch.

    47k GitHub starsUsed in 1 repo~2.9k tokens
    Backend & APIsAuto-check: notes
  • Web Storage

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use Web Storage API safely.

    74k GitHub stars~506 tokensUpdated yesterday
    Auto-check passed
  • Token Storage Security

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing authentication implementation, setting up a new auth system, or evaluating whether the current token storage approach exposes the application to XSS-based…

    74k GitHub stars~604 tokensUpdated yesterday
    SecurityAuto-check passed
  • Django Storages for S3

    Jeffallan/claude-skills

    Sets up Django 4.2+ to keep static and media files on AWS S3 through django-storages, with public and private backends, presigned URLs and CloudFront.

    12k GitHub stars~1.9k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Gke Storage

    google/skills

    Official

    Manages GKE storage, including PVCs, PersistentVolumes, and Filestore.

    21k GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed

More from stello-agent/stello

All 13 skills in this repo
  • Fork Design

    stello-agent/stello

    Fork 机制完整说明。覆盖 ForkProfile 与 EngineForkOptions 的字段对齐、四层 fallback 合成链(sessionDefaults → parent → profile → forkOptions)、systemPrompt 合成三种模式、skills 三态语义、持久化边界(SerializableSessionConfig 只固化…

    112 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • LLM Call Sites

    stello-agent/stello

    Stello 框架内所有 LLM 调用位置的消息结构速查。覆盖 Session 对话、compress、consolidate;应用层 reflection 调用由 orchestrator 自行决定。

    112 GitHub stars~793 tokensUpdated 2 mo ago
    Auto-check passed
  • Session Usage

    stello-agent/stello

    Session 对话单元的设计理念、上下文组装规则、memory / insight 槽位语义、单一 Session 模型与跨 Session 通信模型。

    112 GitHub stars~763 tokensUpdated 2 mo ago
    Auto-check passed
  • Stello Agent Creation

    stello-agent/stello

    StelloAgent 创建配置教程。完整说明 createStelloAgent 的每个配置项,包含 sessionDefaults、storage、tools、skills、forkProfiles、session 层接入、orchestration 等。

    112 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Stello Agent Usage

    stello-agent/stello

    StelloAgent 运行时使用教程。覆盖 Session 生命周期、createSession、turn/stream 对话、fork 配置合成链、orchestrator-facing 数据 SDK、runtime 管理、热更新等运行时 API。

    112 GitHub stars~2.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Stello Usage

    stello-agent/stello

    Stello 仓库总览入口。快速理解各包的关系、推荐入口、编排模型、单一 Session 模型. An agent skill from stello-agent/stello.

    112 GitHub stars~547 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Server Storage

What does Server Storage do?

@stello-ai/server 的 PG 持久化层设计决策和实现模式。触发条件:修改或引用 server 存储层. An agent skill from stello-agent/stello. Server Storage is an agent skill from stello-agent/stello.

How do I install Server Storage in Claude Code?

Run `npx skills add stello-agent/stello --skill server-storage -a claude-code`. Or copy the skill folder (.agents/skills/server-storage in stello-agent/stello) into .claude/skills/server-storage in your project. Claude Code loads it when a task matches its description.

How do I install Server Storage in Codex?

Run `npx skills add stello-agent/stello --skill server-storage -a codex`. Or copy the skill folder (.agents/skills/server-storage in stello-agent/stello) into .agents/skills/server-storage in your project. Codex loads it when a task matches its description.

Can I use Server Storage 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 stello-agent/stello --skill server-storage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/server-storage, .gemini/skills/server-storage, .github/skills/server-storage and .opencode/skills/server-storage in your project.

What does Server Storage need to run?

SKILL.md names no scripts, command-line tools or credentials: Server Storage is instructions for the agent only.

Does Server Storage 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 Server Storage 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 Server Storage use?

Server Storage is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Server Storage use?

About 470 tokens (SKILL.md is roughly 1.9k 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 Server Storage?

Skills that share tags, products or a category with Server Storage: Object Storage (sickn33/agentic-awesome-skills, 47k stars), Neon Object Storage (sickn33/agentic-awesome-skills, 47k stars), Web Storage (thedaviddias/Front-End-Checklist, 74k stars) and Token Storage Security (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Server Storage?

stello-agent (a GitHub organization) maintains it in stello-agent/stello, which has 112 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on July 24, 2026.

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