claudecode/skills/save/SKILL.md
Save current session progress to Awareness memory as a batch of structured steps.
npx skillsauth add edwin-hao-ai/awareness-sdk saveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Save current session progress to Awareness Memory.
Focus (optional): $ARGUMENTS
Try MCP tools first (awareness_init, awareness_recall, awareness_record, awareness_lookup).
If MCP tools are NOT available, use Bash to call the local daemon HTTP API directly:
# awareness_record (single)
curl -s -X POST http://localhost:37800/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"awareness_record","arguments":{"action":"remember","content":"...","insights":{"knowledge_cards":[...],"action_items":[...],"risks":[...]}}}}'
# awareness_record (batch)
curl -s -X POST http://localhost:37800/mcp -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"awareness_record","arguments":{"action":"remember_batch","items":[{"content":"step 1..."},{"content":"step 2..."}],"insights":{"knowledge_cards":[...],"action_items":[...],"risks":[...]}}}}'
The response is JSON-RPC: result.content[0].text contains the tool output as JSON string.
Gather context about what happened in this session.
Extract structured insights from the session — salience-aware, not greedy:
Philosophy (distilled essence, not raw logs): your job is NOT "generate a card for every turn" — it is "identify what's worth recalling in 6 months on a fresh project". Returning empty arrays for knowledge_cards is a first-class answer when the session was just tool testing, chatter, or framework metadata.
- **When NOT to extract:**
<!-- SHARED:extraction-when-not-to-extract BEGIN -->
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.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 scores the daemon enforces:**
<!-- SHARED:extraction-scoring BEGIN -->
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 quality gate (rejects if violated):**
<!-- SHARED:extraction-quality-gate BEGIN -->
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:
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".general, note, misc, fix,
project, tech. ❌ ["general","note"] ✅ ["pgvector","vector-db","cost"].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.
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:
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[]):
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.
<!-- SHARED:skill-extraction END -->Call awareness_record with:
Confirm what was saved.
Rules:
testing
Setup Awareness Memory — check local daemon, authenticate via browser, and configure credentials.
tools
Initialize memory session, load project context, and create a session_id for tracking.
testing
Search Awareness memory for past implementations, decisions, or relevant context.
tools
End the current Awareness memory session and save final progress.