oneworks-mem
说明 agent 如何用 oneworks mem CLI 在 channel、session、user、global 维度读写持久记忆,并判断什么时候应该读取、追加或更新记忆。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
说明 agent 如何用 oneworks mem CLI 在 channel、session、user、global 维度读写持久记忆,并判断什么时候应该读取、追加或更新记忆。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Configure OneWorks model services using built-in provider defaults, management portals, API base URLs, model lists, balance/status capabilities, and safe config-source writeback.
Control the current OneWorks session's internal browser tabs with semantic snapshots, reliable element refs, screenshots, waits, and page-safe concurrent workflows.
Drive native macOS apps through the Cua Driver tools. Use when a task asks to open, inspect, click, type, scroll, capture a final screenshot, or verify a real macOS app without stealing the user's focus.
Control a user-paired external browser through a Chrome extension, explicit typed targets, and semantic operations.
当用户想创建或改造 OneWorks plugin,实现界面入口、按钮、tab、launcher 搜索、server 命令、scoped API 或本地服务时,先理解目标效果;需求不明确时列出不确定点让用户确认,再转成 manifest、前端入口、server 入口和验证步骤。
Apply, review, and continuously evolve the OneWorks team's durable UI design standards. Use for any OneWorks task that changes or reviews layout, styling, theme, spacing, responsive behavior, component appearance, visual assets, or reference-image fidelity, and whenever user visual feedback may express a reusable team standard. Require a Visual Brief, conflict-aware project memory capture, a completed independent visual consistency session with real expected-behavior validation, and experience persistence before delivery; do not promote one-off pixel nudges into lasting rules.
| name | oneworks-mem |
| description | 说明 agent 如何用 oneworks mem CLI 在 channel、session、user、global 维度读写持久记忆,并判断什么时候应该读取、追加或更新记忆。 |
当任务发生在 channel 会话里,或用户要求保存、读取、整理长期上下文时使用这个 skill。oneworks mem 是给 agent 在 shell 中调用的 CLI,不是发送到聊天频道里的文本命令。
在 channel 会话中,默认认为 oneworks mem 已经由环境注入可用。不要为了确认是否存在而先执行 which oneworks、oneworks --help 或 oneworks mem --help;直接按下面示例调用,只有命令失败、参数不确定且示例不足,或用户明确要求时才查询 help。
在 channel 会话中,不要让模型自己抄写平台 id。oneworks mem 会从环境变量和 server 写入的当前消息上下文文件读取 session id、channel id、群聊当前发送者 sender id 等元数据。群聊里多人轮流说话时,-s user 默认指向当前这条消息的发送者。
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.md,list 不传时不过滤路径。-c, --channel <channel>:指定或过滤 channel,例如 wechat。-f, --filter <id>:指定或过滤平台相关 id。对 get / set / patch 是目标 id,对 list 是过滤条件。-s, --scope <scope>:记忆维度,支持 channel、user、session、global。channel:默认 scope。用于当前群聊、私聊、帖子或平台会话的长期上下文;适合频道主题、项目背景、群约定、常用配置、长期排障线索。user:用于当前发送者个人相关信息;适合姓名、称呼、职责、稳定偏好、常用工作方式。只在信息来自本人、被明确确认,或对任务持续有用时写入。群聊中不要手填 sender id,让 CLI 从当前消息上下文解析。session:用于当前 OneWorks session 的临时工作记忆;适合本次任务状态、排查步骤、未完成 TODO、刚形成但未必长期有效的结论。global:用于跨频道也成立的通用事实或用户明确要求全局记住的规则;谨慎使用。优先在这些场景读取相关记忆:
oneworks mem get / oneworks mem get -s user / oneworks mem list。get 或 list,避免重复、冲突或把同一主题写到多个地方。常用读取:
oneworks mem get
oneworks mem list
oneworks mem get -s user
oneworks mem get -s session
oneworks mem get -p ./reference/wechat.md
写入应服务于未来任务,不要把普通流水账塞进记忆。适合写入:
写入时尽量和当前聊天话题保持一致:同一主题聚合到同一个文件,摘要短而可执行,避免跨主题混写。
不要只在 Chat History 里写“我会记住”或“应该记录”;需要记忆时要真的调用 oneworks mem patch,让工具调用记录出现在过程里。
默认 README.md 适合放简短总览。复杂主题用 reference/<topic>.md 或 topics/<topic>.md:
oneworks mem patch "用户偏好:希望排查链路时先验证公网入口,再看服务日志。"
oneworks mem patch -s user "用户自我介绍:二姐,主要维护 WeChat channel 接入。"
oneworks mem patch -s session "本次排查:已确认 webhook secret 正确,下一步检查回调日志。"
oneworks mem patch -p ./reference/wechat.md "WechatApi 重连后需要重新注册 callback。"
对已有内容做结构化整理时,可以读取后再 set 覆盖,但只在你确信重写会提升质量时使用:
oneworks mem get -p ./reference/wechat.md
oneworks mem set -p ./reference/wechat.md "整理后的内容..."
oneworks mem uses the narrow permission key bash-oneworks-mem. Channel runtime allows this built-in narrow permission by default, without requiring .oo.config.json edits. This should not be treated as allowing arbitrary Bash.
如果命令失败,要让用户感知失败原因;不要假装记忆已经保存。