You have access to persistent cloud memory. Memory persists across sessions, devices, and projects.
This skill communicates with an external API to provide memory functionality:
awareness.market) to retrieve relevant past context via semantic search.~/.awareness/credentials.json (file permissions 0600). The setup script can optionally write environment variables to your shell profile.localhost:37800), all data stays on your machine — nothing is sent externally.You can review the scripts in this skill folder before use. Source code: https://github.com/edwin-hao-ai/Awareness-SDK
Hooks run automatically — you don't need to do anything:
XMLWhen you need more control beyond automatic hooks, use these Bash commands. All scripts are at ${CLAUDE_SKILL_DIR}/scripts/.
Load cross-session context (summaries, tasks, knowledge cards):
node ${CLAUDE_SKILL_DIR}/scripts/init.js [days=7] [max_cards=20] [max_tasks=20]
Call this ONCE at session start if the auto-recall didn't provide enough context.
Semantic + keyword hybrid search for past decisions, solutions, and knowledge:
# Basic search
node ${CLAUDE_SKILL_DIR}/scripts/search.js "how was auth implemented?"
# With keyword boost
node ${CLAUDE_SKILL_DIR}/scripts/search.js "auth implementation" keyword_query="JWT HKDF"
# Advanced options
node ${CLAUDE_SKILL_DIR}/scripts/search.js "deployment issues" \
scope=timeline limit=10 recall_mode=session \
multi_level=true cluster_expand=true
# Progressive disclosure: get summaries first, then expand specific items
node ${CLAUDE_SKILL_DIR}/scripts/search.js "auth" detail=summary
node ${CLAUDE_SKILL_DIR}/scripts/search.js "auth" detail=full ids=id1,id2
Parameters:
keyword_query — 2-5 precise terms (file names, function names, error codes)scope — all (default), timeline, knowledge, insightslimit — max results (default 6, max 30)recall_mode — hybrid (default), precise, session, structured, autovector_weight — weight for semantic search (default 0.7)bm25_weight — weight for keyword search (default 0.3)multi_level — broader context across sessionscluster_expand — topic-based context expansiondetail — summary (lightweight) or full (complete content)ids — expand specific items from a prior summary calluser_id — filter by userCall BEFORE starting work to avoid re-solving solved problems.
Save decisions, implementations, and learnings:
# Single event — ALWAYS include reasoning, not just what but WHY
node ${CLAUDE_SKILL_DIR}/scripts/record.js "Implemented JWT auth with HKDF key derivation because NextAuth v5 uses JWE A256CBC-HS512. Files changed: jwt_verify.py, auth.ts"
# Batch recording
echo '{"steps":["Step 1: analyzed auth flow","Step 2: implemented JWT verify","Step 3: added tests"]}' | node ${CLAUDE_SKILL_DIR}/scripts/record.js --batch
# With structured insights (knowledge cards + skills)
echo '{"content":"Auth refactor complete","insights":{"knowledge_cards":[{"title":"JWT auth via HKDF","category":"decision","summary":"Chose JWT over session for NextAuth v5 compatibility. HKDF key derivation matches JWE A256CBC-HS512 spec. Trade-off: cannot force single-point logout, mitigated via 15-min exp + refresh token.","novelty_score":0.85,"durability_score":0.9,"specificity_score":0.9}]}}' | node ${CLAUDE_SKILL_DIR}/scripts/record.js --with-insights
# Update task status
node ${CLAUDE_SKILL_DIR}/scripts/record.js --update-task task_id=abc123 status=completed
Call AFTER every meaningful action. If you don't record it, it's lost.
Below is the F-056 shared prompt — same guidance every Awareness Memory
surface uses. Keeps record quality consistent across Claude Code, ClawHub,
OpenClaw, and the cloud backend.
When to extract (emit a card):
When NOT to extract (return empty):
Sender (untrusted metadata), turn_brief, [Operational context metadata ...], [Subagent Context], or wrapped
inside Request: / Result: / Send: envelopes that only carry such metadata.
Strip those wrappers mentally and judge what remains.
of awareness_record / awareness_recall themselves). A bug fix in those tools IS worth
extracting as problem_solution; a raw "let me test if recall works" turn is not.
The single question to ask: **"If I start a fresh project 6 months from now, will being
reminded of this content materially help me?"** If not, do not emit a card.
Returning "knowledge_cards": [] is a first-class answer — prefer it over fabricating
a card from low-signal content.
Per-card required scores:
Every card you emit MUST carry three LLM self-assessed scores (0.0-1.0):
novelty_score: how new is this vs known facts & existing cards?(restating an existing card = 0.1; a fresh decision = 0.9)
durability_score: will this still matter in 6 months? (transient debug state = 0.1;architectural decision or user preference = 0.9)
specificity_score: is there concrete substance — file paths, commands, error strings,version numbers, exact function names? (vague platitude = 0.1; reproducible recipe = 0.9)
The daemon will discard any card where novelty_score < 0.4 OR durability_score < 0.4.
This is intentional — score honestly. Under-extraction is much better than noise.
Structural gate the daemon enforces (rejects below floor):
Drop the card rather than submit if it would fail any of these:
summary ≥ 80 chars (technical: decision / problem_solution/ workflow / pitfall / insight / key_point); ≥ 40 chars (personal:
personal_preference / important_detail / plan_intention /
activity_preference / health_info / career_info / custom_misc).
summary not byte-identical to title.title nor summary starts with Request:, Result:, Send:, Sender (untrusted metadata),
[Operational context metadata, or [Subagent Context].
summary has no TODO, FIXME, lorem ipsum, example.com, or literal placeholder.
inline code / bold. Soft.
Recall-friendliness — without these, a card is "accepted but
invisible" at retrieval time:
for — product (pgvector), file (daemon.mjs), error, version,
function (_submitInsights), project noun. Vague titles ("Decision
made", "Bug fixed", "决定") score ~30 % precision@3.
❌ "Bug fixed" ✅ "Fix pgvector dim 1536→1024 mismatch".
noun/product/concept. Never general, note, misc, fix,
project, tech. ❌ ["general","note"] ✅ ["pgvector","vector-db","cost"].
CJK names → include BOTH in the summary at least once. Example:
"用 pgvector 做向量数据库存储" matches queries in either language.
Rejected cards return in response.cards_skipped[]. R6-R8 are
warnings, not blocks — use them to self-critique before submitting.
Skill extraction (emit under insights.skills[]):
A skill is a reusable procedure the user will invoke again (e.g. "publish
SDK to npm", "regenerate golden snapshots after schema change"). Skills go in
insights.skills[], NOT insights.knowledge_cards[].
Emit a skill when ALL three hold:
the same steps, or the user explicitly says "this is our workflow for X").
someone reach for this skill.
commands, flags, verification signals. "Do it carefully" fails this bar.
Skip (return empty skills: []) for:
problem_solution card instead.important_detail card instead.Required shape per skill:
{
"name": "3-8 words, action-oriented (\"Publish SDK to npm\")",
"summary": "200-500 chars of second-person imperative — pasteable into an agent prompt. Include WHY in one clause so the agent knows when to deviate.",
"methods": [{"step": 1, "description": "≥20 chars, names a file/command/flag — no vague verbs"}],
"pitfalls": ["One-line known failure mode + how to avoid it (e.g. 'npm mirror rejects publish — always pass --registry=https://registry.npmjs.org/')"],
"verification": ["One-line post-run check (e.g. 'Run `npm view <pkg> version` — should match the bumped version')"],
"trigger_conditions": [{"pattern": "When publishing @awareness-sdk/*", "weight": 0.9}],
"tags": ["npm", "publish", "release"],
"reusability_score": 0.0,
"durability_score": 0.0,
"specificity_score": 0.0
}
MANDATORY content bars (daemon scores on 8 dims; skills below 28/40 are
hidden from active_skills[]):
exists, HTTP 200, etc.) — NOT "check that it worked"
version number, or URL. "Update the config" fails; "Edit foo.json and
bump version field" passes.
Discard if these cannot be satisfied — emitting a vague skill pollutes the
TOC that future agents pick from.
Fast DB queries without vector search (<50ms):
# Open tasks
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=tasks status=pending priority=high
# Knowledge cards
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=knowledge query=auth category=architecture
# Risks
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=risks level=high
# Timeline
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=timeline limit=20
# Session history
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=session_history session_id=xxx
# Handoff context (for agent transitions)
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=handoff
# Project rules
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=rules format=markdown
# Knowledge graph
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=graph search=auth
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=graph entity_id=xxx max_hops=2
# List agent roles
node ${CLAUDE_SKILL_DIR}/scripts/lookup.js type=agents
Use lookup instead of search when you know WHAT you want (type-based, not semantic).
Fetch the activation prompt for a specific agent role:
node ${CLAUDE_SKILL_DIR}/scripts/agent-prompt.js role=developer_agent
Use the returned prompt as the sub-agent's system prompt for memory isolation.
Follow this workflow every session:
init.js manually.search.js.record.js.--with-insights to create searchable knowledge cards.Run this command — it opens your browser, you sign in, and everything is configured automatically:
node ${CLAUDE_SKILL_DIR}/scripts/setup.js
The setup script will:
AWARENESS_API_KEY and AWARENESS_MEMORY_ID to your shell profileOther setup commands:
node ${CLAUDE_SKILL_DIR}/scripts/setup.js --status # Check current config
node ${CLAUDE_SKILL_DIR}/scripts/setup.js --logout # Clear credentials
Set environment variables directly:
export AWARENESS_API_KEY="aw_your-key"
export AWARENESS_MEMORY_ID="your-memory-uuid"
export AWARENESS_LOCAL_URL="http://localhost:37800"
If the auto-recall hook outputs nothing (no block appears), the skill is not configured. Run the setup script above or tell the user to run it.
共 1 个版本