oneworks-mem

Instructions for using the oneworks mem command-line tool to read and write persistent agent memory. The memory can be kept for an entity, channel, conversation, user, session, or the whole system.

In plain words
What is it for?
Use it to retrieve, append, replace, list, or filter stored context in supported memory scopes.
Why use it?
It helps an agent retain useful context between messages without manually managing memory files. It also defines when memory may be read, added, or changed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/oneworks-ai/app/oneworks-mem
Any agent
npx skills add oneworks-ai/app --skill oneworks-mem
Clone the repo
git clone --depth 1 https://github.com/oneworks-ai/app

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00045 $0.02063
Opus 5 $0.00023 $0.01032
Sonnet 5 $0.00009 $0.00413
Haiku 4.5 $0.00005 $0.00206

Measured 2d ago against content hash 6a973a34f74d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

oneworks-mem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/plugins/cli-skills/skills/oneworks-mem/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

当任务发生在 channel 会话里,或用户要求保存、读取、整理长期上下文时使用这个 skill。oneworks mem 是给 agent 在 shell 中调用的 CLI,不是发送到聊天频道里的文本命令。

在 channel 会话中,默认认为 oneworks mem 已经由环境注入可用。不要为了确认是否存在而先执行 which oneworksoneworks --helponeworks mem --help;直接按下面示例调用,只有命令失败、参数不确定且示例不足,或用户明确要求时才查询 help。

在 channel 会话中,不要让模型自己抄写平台 id。oneworks mem 会从环境变量和 server 写入的当前消息上下文文件读取 session id、channel id、群聊当前发送者 sender id 等元数据。群聊里多人轮流说话时,-s user 默认指向当前这条消息的发送者。

当前实体的 MEMORY_POLICY.md 定义“什么值得记、什么不应记、如何表述和何时淘汰”;entity.yamlmemory 段定义可写 scope、证据、有效期、敏感数据和每轮预算等硬边界。语义策略和硬边界都高于本 skill 的通用建议。命令拒绝写入时,不要改用别的文件路径绕过策略。

快速命令

  • oneworks mem get:读取当前默认记忆文件,等价于当前 channel id 下的 README.md
  • oneworks mem patch "内容":向当前默认记忆文件追加内容。
  • oneworks mem set "内容":覆盖当前默认记忆文件,只有明确要重写时使用。
  • oneworks mem list:列出当前 scope 下已有记忆文件;不传 -p 时列出全部路径。

所有 subcommand 都支持:

  • -p, --path <path>:指定或过滤 id 下的相对文件路径。get / set / patch 默认 README.mdlist 不传时不过滤路径。
  • -c, --channel <channel>:指定或过滤 channel,例如 wechat
  • -f, --filter <id>:指定或过滤平台相关 id。对 get / set / patch 是目标 id,对 list 是过滤条件。
  • -s, --scope <scope>:记忆维度,支持 entitychannelconversationusersessionglobal

Scope 选择

  • entity:用于当前实体跨 ChannelLink 复用的长期经验、操作约定和稳定判断。
  • channel:默认 scope。用于当前群聊、私聊、帖子或平台会话的长期上下文;适合频道主题、项目背景、群约定、常用配置、长期排障线索。
  • conversation:用于稳定对话线程的背景、决策和后续动作;新的物理 ChildSession 会继续加载。
  • user:用于当前发送者个人相关信息;适合姓名、称呼、职责、稳定偏好、常用工作方式。只在信息来自本人、被明确确认,或对任务持续有用时写入。群聊中不要手填 sender id,让 CLI 从当前消息上下文解析。
  • session:用于当前物理 ChildSession 的临时工作记忆;不会作为跨轮连续记忆自动加载。
  • global:用于跨频道也成立的通用事实或用户明确要求全局记住的规则;谨慎使用。

什么时候读取

优先在这些场景读取相关记忆:

  • 用户提到“之前”“上次”“按老配置”“记得我说过”“继续那个问题”等跨轮上下文。
  • 任务需要知道频道长期背景、平台 id、项目约定、常见故障、用户偏好或之前的决策。
  • 当前请求含糊,但已有记忆可能决定正确做法。
  • 在群聊或私聊中遇到不熟的人、昵称、群内梗、项目名、表情含义、图片语境或关系距离,且这些信息会影响回复语气或任务判断时,先读小本本,不要只靠猜。
  • 用户问“你知道 X 吗”“你还记得 X 吗”,或你准备吐槽/接梗但不确定上下文时,先 oneworks mem get / oneworks mem get -s user / oneworks mem list
  • 准备写入前,先 getlist,避免重复、冲突或把同一主题写到多个地方。

运行时加载结构化记忆时会先匹配可见性 group。orgs 必须命中;conversationTypesentitiesroomschannels 等维度在同一 group 内按 OR、不同 group 之间按 AND 组合。不要因为实体名相同,就假设另一个组织、群聊或会话中的记忆可见。候选选择和预算也会按 visibility group 分配,避免单一高频群聊挤占全部上下文。

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 107 lines · 45 tokens per session scan A 6a973a34f74d

Subscribe to this mod's changes

oneworks-mem is a skill published in the GitHub repository oneworks-ai/app (18 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 2,063 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mermaid-visualizer

Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.

breferrari/obsidian-mind · 57 tokens

spec-kitty-charter-doctrine

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…

Priivacy-ai/spec-kitty · 135 tokens

gcloud-usage

This skill should be used when user asks about "GCloud logs", "Cloud Logging queries", "Google Cloud metrics", "GCP observability", "trace analysis", or "debugging production issues on GCP".

fcakyon/claude-codex-settings · 49 tokens

spk-team-auth

Handle Spec Kitty team authentication, hosted credentials, account selection, and auth-related recovery.

Priivacy-ai/spec-kitty · 22 tokens

setup

This skill should be used when user encounters "Azure MCP error", "Azure authentication failed", "az login required", "Azure CLI not found", or needs help configuring Azure MCP integration.

fcakyon/claude-codex-settings · 39 tokens

neo4j-cypher-skill

Generates, optimizes, and validates Cypher 25 queries for Neo4j 2025.x and 2026.x. Use when writing new Cypher queries, optimizing slow queries, graph pattern matching, vector or fulltext search, subqueries, or batch writes. Covers MATCH, MERGE, CREATE, WITH, RETURN, CALL, UNWIND, FOREACH, LOAD CSV, SEARCH…

neo4j-contrib/neo4j-skills · 137 tokens