trucontext-openclaw
Your persistent memory layer. All TC operations go through this skill.
Never call the trucontext CLI directly — use the tc-memory verbs below.
If tc-memory is not found, run: INLINECODE3
What this skill reads
- -
~/.trucontext/openclaw-state.json — agent config written by trucontext-openclaw install. Contains your root node ID, user root node ID, recipe, and workspace path. No secrets. - TruContext CLI auth (
~/.trucontext/credentials.json) — the trucontext CLI manages its own auth tokens. This skill calls the CLI; it does not read or store credentials directly. To authenticate, run: npx trucontext login.
Verbs
CODEBLOCK0
Node integrity rule
Always call node find before node create. If a match is returned with confidence > 0.8, use the existing node ID. Only create if no match found. This prevents duplicate nodes across sessions.
Session startup
At the start of every session, call:
tc-memory recall "active projects and entities relevant to my current work"
This gives you node IDs to anchor ingests during the session.
Ingest protocol — testify, don't summarize
TC's intelligence layer pattern-matches across ingests. Pre-digested conclusions starve it.
Before ingesting, ask: If TC's intelligence layer read only this, could it learn something the entity didn't explicitly say?
If yes — it's signal. Submit it.
If no — rewrite it. Find the friction. Find the turn. Find the moment before you knew the answer.
The three layers:
- 1. What happened (facts, outcome)
- How it happened (process, friction, pivots) ← most signal lives here
- What it revealed (character, pattern, relationship dynamic) ← what TC is hungry for
Write in first person, past tense, with friction.
Examples of good vs. bad ingests:
❌ Bad: INLINECODE11
✅ Good: INLINECODE12
Temporal vs. permanent
- -
--permanent for facts: events that happened, decisions made, entities created - Default (temporal) for: behavioral observations, inferences, preferences, patterns
Config (resolved from ~/.trucontext/openclaw-state.json)
Your root node, user root, recipe, and primary_about are pre-configured by trucontext-openclaw install.
You do not need to pass them on every call.
Source
- - Homepage: https://trucontext.ai
- Source: https://github.com/AlphaCollectiveLLC/trucontext-openclaw
- npm: https://www.npmjs.com/package/trucontext-openclaw
trucontext-openclaw
你的持久记忆层。所有TC操作都通过此技能进行。
切勿直接调用trucontext CLI——请使用下面的tc-memory动词。
如果找不到tc-memory,请运行:trucontext-openclaw install
此技能读取的内容
- - ~/.trucontext/openclaw-state.json——由trucontext-openclaw install写入的代理配置。包含你的根节点ID、用户根节点ID、配方和工作区路径。不包含机密信息。
- TruContext CLI认证(~/.trucontext/credentials.json)——trucontext CLI管理其自身的认证令牌。此技能调用CLI;它不直接读取或存储凭据。要进行认证,请运行:npx trucontext login。
动词
bash
记住重要内容(叙述性,而非摘要)
tc-memory ingest <叙述文本> [--permanent]
在决策或对话前检索相关上下文
tc-memory recall <查询> [--limit N]
向图谱提出自然语言问题
tc-memory query <问题> [--limit N]
TC在你的图谱中发现了哪些缺口?
tc-memory gaps
TC的情报层对你的配方对齐情况有何报告?
tc-memory health
在创建新节点前查找现有节点
tc-memory node find <名称>
创建新实体节点(仅在find未返回匹配项后)
tc-memory node create --type <类型> --id <短标识> --name <显示名称> [--permanent]
按ID查找节点
tc-memory node get
在两个节点之间创建显式边
tc-memory node link --rel <关系> --to
节点完整性规则
在node create之前始终调用node find。 如果返回的匹配项置信度 > 0.8,请使用现有节点ID。仅在未找到匹配项时才创建。这可以防止跨会话出现重复节点。
会话启动
在每个会话开始时,调用:
bash
tc-memory recall 与我当前工作相关的活跃项目和实体
这将为你提供节点ID,以便在会话期间锚定摄入内容。
摄入协议——见证,而非总结
TC的情报层会在摄入内容之间进行模式匹配。预先消化的结论会使其匮乏。
在摄入之前,问自己: 如果TC的情报层只读取此内容,它能学到实体未明确说明的东西吗?
如果是——这是信号。提交它。
如果否——重写它。找到摩擦点。找到转折点。找到你知晓答案之前的那个时刻。
三个层次:
- 1. 发生了什么(事实、结果)
- 如何发生的(过程、摩擦、转折)← 大部分信号在此
- 揭示了什么(性格、模式、关系动态)← TC渴望的内容
以第一人称、过去时态、带有摩擦地书写。
好与坏摄入示例:
❌ 糟糕:tc-memory ingest 修复了MCP服务器问题。使用了低级SDK。
✅ 良好:tc-memory ingest 高级SDK正在将taskSupport:forbidden注入工具架构中——Claude Desktop因此静默地过滤掉了这些工具。没有错误。只是缺失。花了三个小时在错误的地方寻找,然后拉取原始协议响应才发现问题。修复只用了十分钟。那三个小时都花在不知道应该问什么问题上。
临时与永久
- - --permanent用于事实:已发生的事件、已做出的决定、已创建的实体
- 默认(临时)用于:行为观察、推断、偏好、模式
配置(从~/.trucontext/openclaw-state.json解析)
你的根节点、用户根节点、配方和primary_about已由trucontext-openclaw install预配置。
你无需在每次调用时传递它们。
来源
- - 主页:https://trucontext.ai
- 源码:https://github.com/AlphaCollectiveLLC/trucontext-openclaw
- npm:https://www.npmjs.com/package/trucontext-openclaw