Agent skill

Storage Design

by stello-agent in stello-agent/stello

存储接口的设计原则、SessionMeta 与 TopologyNode 解耦、上下文槽位、单一 SessionStorage 接口。触发条件:理解或实现 SessionStorage / SessionTree。

Apache-2.0Auto-check passed

Install Storage Design

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

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

GitHub CLI
$ gh skill install stello-agent/stello storage-design --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/storage-design .claude/skills/storage-design && 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
storage-design
GitHub stars
112
Token cost
~871 tokens
SKILL.md length
195 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

存储接口的设计原则、SessionMeta 与 TopologyNode 解耦、上下文槽位、单一 SessionStorage 接口。触发条件:理解或实现 SessionStorage / SessionTree。

  • SKILL.md covers 核心原则, 单一 SessionStorage 接口, SessionMeta 与 TopologyNode 解耦 and 上下文槽位, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Storage Design is an agent skill from stello-agent/stello. 存储接口的设计原则、SessionMeta 与 TopologyNode 解耦、上下文槽位、单一 SessionStorage 接口。触发条件:理解或实现 SessionStorage / SessionTree。

Its SKILL.md is about 870 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

  • “/storage-design”

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

Storage Design loads about 871 tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 195 words of instructions outside code blocks.

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

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). 195 words, ~871 tokens.

Download SKILL.mdSave it as .claude/skills/storage-design/SKILL.md (or your agent's skills folder).
name
storage-design
description
存储接口的设计原则、SessionMeta 与 TopologyNode 解耦、上下文槽位、单一 SessionStorage 接口。触发条件:理解或实现 SessionStorage / SessionTree。

核心原则

Session 是纯对话单元,不感知树结构。 数据职责切成两条独立的线:

  • SessionStorage — 单个 Session 的内容数据(消息、上下文槽位等),由 @stello-ai/session 定义
  • SessionTree — 拓扑结构(节点关系、固化配置),由 @stello-ai/core 定义

两者由应用层各自实现并注入;常见做法是共享同一份持久化后端,但接口分离让 Session 层(运行单条对话)和 Orchestrator 层(管理整棵森林)的职责互不耦合。


单一 SessionStorage 接口

所有 Session(含 root)共用同一个接口。Root 没有特权方法——它就是一个 parentId === null 的普通 Session。

职责:

  • Session 元数据 CRUD(getSession / putSession / listSessions)
  • L3 对话记录追加/查询/裁剪(appendRecord / listRecords / trimRecords)
  • 三个上下文槽位的读写(getSystemPrompt/putSystemPrompt / getInsight/putInsight/clearInsight / getMemory/putMemory)
  • 事务(transaction(fn))

批量收集由 StelloAgent.listSessionDigests() 提供——它在 orchestrator-facing SDK 上聚合 SessionTree.listAll() 与 SessionStorage.getMemory/getInsight,由应用层在 agent 顶层注入 storage: SessionStorage 来启用。


SessionMeta 与 TopologyNode 解耦

树状关系完全由 TopologyNode 维护,SessionMeta 不关心自己在树中的位置。

  • SessionMeta(在 SessionStorage):对话运行时数据(id、label、status、turnCount 等),无 parentId/children/depth
  • TopologyNode(在 SessionTree):纯树结构(id、parentId、children、refs、depth、index、label、sourceSessionId)

两种类型由两条独立接口提供。底层存储实现可以共享一张表/同一份 JSON,但消费侧(Session 层 vs 拓扑 / 前端)拿到的是经过职责裁剪的视图。

两个包的 SessionMeta

@stello-ai/session 和 @stello-ai/core 各有自己的 SessionMeta,字段集合不完全一致;持久化层(PG / FS)通常存超集,由各 adapter 按需投影。


上下文槽位

每个出现在 Session.send() 上下文中的元素都有对应的专用槽位(一对 get/put 方法),不复用通用键值:

槽位写入者send() 消费生命周期
systemPromptfork 合成链固化 / 应用层每次 send 注入持久
insight应用层(agent.putInsight)注入一次即 clear一次性 inbox
memory应用层(consolidate 写入 / agent.putMemory)不进入 send 上下文持久(供 orchestrator 反思)

memory 是外部视角的槽位——它是 orchestrator 层(应用层)用来对 Session 做综合反思的输入,但不会注入 Session 自身的 LLM 上下文。Session 的 LLM 看不到自己的 memory。


数据流向

Session.send()
  storage.getSystemPrompt → storage.getInsight → storage.listRecords → LLM → storage.appendRecord
                                  ↓
                            storage.clearInsight(若 insight 被消费)

Session.consolidate(fn)
  storage.listRecords + storage.getMemory → fn → storage.putMemory

Engine.forkSession(options)
  1. sessions.createSession({ parentId, label, sourceSessionId })  ← 拿到 ID
  2. sessions.putConfig(childId, serializable)                       ← 固化 systemPrompt + skills
  3. session.fork({ id: childId, context, prompt })                  ← 创建 Session 实例

应用层反思层(自行实现,每 N 分钟 / on demand)
  agent.listSessionDigests()    → 收集所有 Session 的 {id, label, memory, insight}
  → 任意 LLM → 派生 per-target insight
  → agent.putInsight(targetId, content)

SessionTree 接口要点

  • createSession({ parentId?, label?, sourceSessionId? }) —— 唯一节点创建入口;parentId 缺省即建 root(parentId === null),多 root 合法
  • listRoots() —— 列出所有 root,应用层据此显示森林
  • getTree() —— 返回 SessionTreeNode[] 森林视图
  • addRef(from, to) —— 跨树引用(非父子)
  • getConfig / putConfig —— 持久化 SerializableSessionConfig(只含 systemPrompt / skills)

应用层实现策略

后端推荐拆分
文件系统(NodeFS)SessionTreeImpl + InMemoryStorageAdapter(demo 用法)
PostgreSQL一个 PG schema,两个 wrapper 类(一个实现 SessionStorage,一个实现 SessionTree)
多租户 server同上,再加 space_id 维度

要点:两个接口的 id 必须语义一致(同一个 Session 的 SessionMeta.id === TopologyNode.id)。应用层在创建/删除 Session 时需保证两条线同步。

© 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/storage-design of stello-agent/stello.

Open the folder on GitHubat commit 3bc9493

Compare with similar skills

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

Storage Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Storage Design this skillstello-agent/stello112—~871Automated 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 2 days ago
    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 2 days ago
    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 5 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 12 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 Storage Design

What does Storage Design do?

存储接口的设计原则、SessionMeta 与 TopologyNode 解耦、上下文槽位、单一 SessionStorage 接口。触发条件:理解或实现 SessionStorage / SessionTree。. Storage Design is an agent skill from stello-agent/stello.

How do I install Storage Design in Claude Code?

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

How do I install Storage Design in Codex?

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

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

What does Storage Design need to run?

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

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

Storage Design 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 Storage Design use?

About 871 tokens (SKILL.md is roughly 3.5k 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 Storage Design?

Skills that share tags, products or a category with Storage Design: 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 Storage Design?

stello-agent (a GitHub organization) maintains it in stello-agent/stello, which has 112 GitHub stars. The repository holds 12 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.