Awareness Cloud Memory
You have access to persistent cloud memory. Memory persists across sessions, devices, and projects.
Privacy & Data
This skill communicates with an external API to provide memory functionality:
- - Before each prompt: Your prompt text is sent to the configured Awareness API endpoint (default:
awareness.market) to retrieve relevant past context via semantic search. - After each response: A brief session checkpoint (tool name, no full conversation) is sent to record activity.
- Credentials: API key and memory ID are stored in
~/.awareness/credentials.json (file permissions 0600). The setup script can optionally write environment variables to your shell profile. - Local mode: If you run a local daemon (
localhost:37800), all data stays on your machine — nothing is sent externally. - No secrets captured: The skill never reads, stores, or transmits file contents, environment variables, or credentials from your system beyond its own API key.
You can review the scripts in this skill folder before use. Source code: https://github.com/edwin-hao-ai/Awareness-SDK
Automatic Hooks (no action needed)
Hooks run automatically — you don't need to do anything:
- - Before each prompt: Past context is injected as
<awareness-memory> XML - After each response: A checkpoint is saved to memory
Manual Tools
When you need more control beyond automatic hooks, use these Bash commands. All scripts are at ${CLAUDE_SKILL_DIR}/scripts/.
1. Initialize Session
Load cross-session context (summaries, tasks, knowledge cards):
CODEBLOCK0
Call this ONCE at session start if the auto-recall didn't provide enough context.
2. Search Memory (awareness_recall)
Semantic + keyword hybrid search for past decisions, solutions, and knowledge:
CODEBLOCK1
Parameters:
- -
keyword_query — 2-5 precise terms (file names, function names, error codes) - INLINECODE6 — all (default), timeline, knowledge, insights
- INLINECODE7 — max results (default 6, max 30)
- INLINECODE8 — hybrid (default), precise, session, structured, auto
- INLINECODE9 — weight for semantic search (default 0.7)
- INLINECODE10 — weight for keyword search (default 0.3)
- INLINECODE11 — broader context across sessions
- INLINECODE12 — topic-based context expansion
- INLINECODE13 — summary (lightweight) or full (complete content)
- INLINECODE14 — expand specific items from a prior summary call
- INLINECODE15 — filter by user
Call BEFORE starting work to avoid re-solving solved problems.
3. Record to Memory (awareness_record)
Save decisions, implementations, and learnings:
CODEBLOCK2
Call AFTER every meaningful action. If you don't record it, it's lost.
4. Lookup Structured Data (awareness_lookup)
Fast DB queries without vector search (<50ms):
CODEBLOCK3
Use lookup instead of search when you know WHAT you want (type-based, not semantic).
5. Get Agent Prompt (sub-agent spawning)
Fetch the activation prompt for a specific agent role:
CODEBLOCK4
Use the returned prompt as the sub-agent's system prompt for memory isolation.
Workflow Checklist
Follow this workflow every session:
- 1. Session start: Auto-recall hook loads context. If insufficient, run
init.js manually. - Before work: Search memory for relevant past context with
search.js. - After each change: Record what you did and WHY with
record.js. - Handle insights: When you make decisions or identify risks, use
--with-insights to create searchable knowledge cards. - Session end: Auto-capture hook saves a checkpoint.
Setup
One-click setup (recommended)
Run this command — it opens your browser, you sign in, and everything is configured automatically:
CODEBLOCK5
The setup script will:
- 1. Open your browser to sign in / register
- You click "Authorize" — that's it
- Auto-create or select a memory
- Write
AWARENESS_API_KEY and AWARENESS_MEMORY_ID to your shell profile
Other setup commands:
CODEBLOCK6
Manual setup (alternative)
Set environment variables directly:
CODEBLOCK7
Local mode (privacy-first, no account needed)
CODEBLOCK8
Not configured?
If the auto-recall hook outputs nothing (no <awareness-memory> block appears), the skill is not configured. Run the setup script above or tell the user to run it.
感知云记忆
您可以访问持久化的云记忆。记忆会跨会话、设备和项目持续存在。
隐私与数据
此技能通过外部API提供记忆功能:
- - 每次提示前:您的提示文本会被发送到配置的感知API端点(默认:awareness.market),通过语义搜索检索相关的过往上下文。
- 每次响应后:会发送一个简短的会话检查点(工具名称,非完整对话)以记录活动。
- 凭证信息:API密钥和记忆ID存储在~/.awareness/credentials.json中(文件权限0600)。设置脚本可选择将环境变量写入您的shell配置文件。
- 本地模式:如果您运行本地守护进程(localhost:37800),所有数据将保留在您的机器上——不会向外部发送任何信息。
- 不捕获机密信息:该技能除自身API密钥外,从不读取、存储或传输您系统中的文件内容、环境变量或凭证。
您可以在使用前查看此技能文件夹中的脚本。源代码:https://github.com/edwin-hao-ai/Awareness-SDK
自动钩子(无需操作)
钩子会自动运行——您无需做任何操作:
- - 每次提示前:过往上下文会以 XML形式注入
- 每次响应后:检查点会保存到记忆中
手动工具
当您需要超越自动钩子的更多控制时,请使用以下Bash命令。所有脚本位于${CLAUDESKILLDIR}/scripts/。
1. 初始化会话
加载跨会话上下文(摘要、任务、知识卡片):
bash
node ${CLAUDESKILLDIR}/scripts/init.js [days=7] [maxcards=20] [maxtasks=20]
如果自动召回未提供足够上下文,请在会话开始时调用一次。
2. 搜索记忆(awareness_recall)
语义+关键词混合搜索过往决策、解决方案和知识:
bash
基本搜索
node ${CLAUDE
SKILLDIR}/scripts/search.js 认证是如何实现的?
带关键词增强
node ${CLAUDE
SKILLDIR}/scripts/search.js 认证实现 keyword_query=JWT HKDF
高级选项
node ${CLAUDE
SKILLDIR}/scripts/search.js 部署问题 \
scope=timeline limit=10 recall_mode=session \
multi
level=true clusterexpand=true
渐进式展示:先获取摘要,再展开具体项目
node ${CLAUDE
SKILLDIR}/scripts/search.js 认证 detail=summary
node ${CLAUDE
SKILLDIR}/scripts/search.js 认证 detail=full ids=id1,id2
参数说明:
- - keywordquery — 2-5个精确术语(文件名、函数名、错误码)
- scope — all(默认)、timeline、knowledge、insights
- limit — 最大结果数(默认6,最大30)
- recallmode — hybrid(默认)、precise、session、structured、auto
- vectorweight — 语义搜索权重(默认0.7)
- bm25weight — 关键词搜索权重(默认0.3)
- multilevel — 跨会话的更广泛上下文
- clusterexpand — 基于主题的上下文扩展
- detail — summary(轻量级)或full(完整内容)
- ids — 从之前的摘要调用中展开特定项目
- user_id — 按用户筛选
在开始工作前调用,以避免重复解决已解决的问题。
3. 记录到记忆(awareness_record)
保存决策、实现和学习成果:
bash
单个事件——始终包含推理过程,不仅记录做了什么,还要记录为什么
node ${CLAUDE
SKILLDIR}/scripts/record.js 使用HKDF密钥派生实现了JWT认证,因为NextAuth v5使用JWE A256CBC-HS512。修改的文件:jwt_verify.py, auth.ts
批量记录
echo {steps:[步骤1:分析认证流程,步骤2:实现JWT验证,步骤3:添加测试]} | node ${CLAUDE
SKILLDIR}/scripts/record.js --batch
带结构化洞察(知识卡片、任务、风险)
echo {content:认证重构完成,insights:{knowledge
cards:[{title:JWT认证,category:architecture,summary:为NextAuth v5的HKDF派生}],actionitems:[{title:添加速率限制,priority:high}]}} | node ${CLAUDE
SKILLDIR}/scripts/record.js --with-insights
更新任务状态
node ${CLAUDE
SKILLDIR}/scripts/record.js --update-task task_id=abc123 status=completed
在每次有意义的操作后调用。如果不记录,信息就会丢失。
4. 查询结构化数据(awareness_lookup)
无需向量搜索的快速数据库查询(<50ms):
bash
开放任务
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=tasks status=pending priority=high
知识卡片
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=knowledge query=auth category=architecture
风险
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=risks level=high
时间线
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=timeline limit=20
会话历史
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=session
history sessionid=xxx
交接上下文(用于代理切换)
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=handoff
项目规则
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=rules format=markdown
知识图谱
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=graph search=auth
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=graph entity
id=xxx maxhops=2
列出代理角色
node ${CLAUDE
SKILLDIR}/scripts/lookup.js type=agents
当您明确知道想要什么时(基于类型而非语义),请使用lookup代替search。
5. 获取代理提示(子代理生成)
获取特定代理角色的激活提示:
bash
node ${CLAUDESKILLDIR}/scripts/agent-prompt.js role=developer_agent
将返回的提示用作子代理的系统提示,以实现记忆隔离。
工作流程检查清单
每次会话请遵循以下工作流程:
- 1. 会话开始:自动召回钩子加载上下文。如果不足,手动运行init.js。
- 工作前:使用search.js搜索记忆中相关的过往上下文。
- 每次变更后:使用record.js记录您做了什么以及为什么。
- 处理洞察:当您做出决策或识别风险时,使用--with-insights创建可搜索的知识卡片。
- 会话结束:自动捕获钩子保存检查点。
设置
一键设置(推荐)
运行以下命令——它会打开您的浏览器,您登录后一切自动配置完成:
bash
node ${CLAUDESKILLDIR}/scripts/setup.js
设置脚本将:
- 1. 打开浏览器让您登录/注册
- 您点击授权——仅此而已
- 自动创建或选择记忆
- 将AWARENESSAPIKEY和AWARENESSMEMORYID写入您的shell配置文件
其他设置命令:
bash
node ${CLAUDESKILLDIR}/scripts/setup.js --status # 检查当前配置
node ${CLAUDESKILLDIR}/scripts/setup.js --logout # 清除凭证
手动设置(备选方案)
直接设置环境变量:
bash
export AWARENESSAPIKEY=aw_your-key
export AWARENESSMEMORYID=your-memory-uuid
本地模式(隐私优先,无需账户)
bash
export AWARENESSLOCALURL=http://localhost:37800
未配置?
如果自动召回钩子没有输出任何内容(没有出现块),说明该技能尚未配置。请运行上述设置脚本或告知用户运行它。