/attune-ai:memory-and-context <operation: store|retrieve|search|forget>from attune-ai
Stores, retrieves, searches, and forgets persistent memory across sessions with security classification. Useful for cross-agent pattern sharing and structured context management.
Ships in attune-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
IMPORTANT: Start your response with a context preamble.
Call help_lookup(topic="memory", mode="preamble") and
display the returned preamble text as a blockquote. Then
tell the user they can say "tell me more" for a step-by-step
guide, or answer the scoping questions below to proceed.
If the MCP call fails, fall back to:
Memory and Context — Stores and retrieves persistent context across sessions — notes, preferences, project state.
Before running, ask:
Open adapter memory-and-context with the selected operation and scoped
arguments. Present its widget or returned Markdown and collect its bound
action before calling the existing memory tool. Store and forget are external
writes and require explicit confirmation; retrieve and search remain
read-only. Publish the exact tool response as operation_result.
After a successful store or forget, follow the workspace's returned
memory_retrieve verification request and publish it as
verification_result. Store succeeds only when the same value and
classification are retrieved; forget succeeds only when the post-delete read
misses. Never render stored values—especially SENSITIVE values—in the
workspace. A failed backend call must say “did not complete.” Preserve these
decisions and verification receipts in compact text when the shared tools are
unavailable.
Based on the user's answer, call the appropriate MCP tool:
memory_store(key, value, classification)memory_retrieve(key)memory_search(query, pattern_type)memory_forget(key, scope)attune-ai's memory system sits ABOVE Anthropic's native memory features. It provides security-classified storage, cross-agent pattern sharing, and a structured pattern lifecycle that native memory does not offer. Use the decision table below to determine which system to use for a given task.
| Use Case | Use Anthropic Native | Use attune-ai |
|---|---|---|
| "Remember my code style" | CLAUDE.md | -- |
| "What did we do last session?" | Session Memory | -- |
| "Store this pattern for reuse across agents" | -- | memory_store (shared library) |
| "Classify this finding as SENSITIVE" | -- | Security pipeline |
| "Coordinate memory across 3 parallel agents" | -- | Redis pub/sub |
| "Promote this pattern after 5 successful uses" | -- | Pattern lifecycle |
| "Track what this project uses" | Auto Memory | -- |
The rule is simple: if Anthropic's native memory handles it, use that. If you need classification, cross-agent sharing, or pattern lifecycle management, use attune-ai.
MCP tools for memory management.
Store structured knowledge in attune-ai memory.
Parameters:
PUBLIC (default),
INTERNAL, or SENSITIVE. See Security
Classification below.When to use: Cross-agent patterns, security-classified data, structured knowledge that must persist beyond a single session or be shared across agents.
When NOT to use: Simple preferences belong in CLAUDE.md. Conversation history is handled by native Session Memory.
Example:
memory_store(
key="python-import-ordering",
value="stdlib first, then third-party, then local. Enforce with isort.",
classification="PUBLIC",
pattern_type="coding-convention"
)
Retrieve data by key or pattern ID.
Parameters:
Returns: The stored value, or null if not found.
Search memory for patterns matching a query.
Parameters:
Returns: A list of matching memory entries, ranked by relevance.
Remove data from memory.
Parameters:
"session" -- Short-term session storage only."persistent" -- Long-term persistent storage only."all" -- Both layers. This is the default.Session-scoped key-value store for transient state. Context values are discarded when the session ends. Use these for temporary coordination data that does not need to persist.
Get a session context value.
Parameters:
Returns: The stored value, or null if not set.
Set a session context value.
Parameters:
Example:
context_set(key="current_review_file", value="src/attune/workflows/base.py")
file = context_get(key="current_review_file")
When storing data with memory_store, choose the
appropriate classification level.
Choose the minimum classification that meets your needs. Over-classifying creates unnecessary overhead.
Example -- storing a security finding:
memory_store(
key="vuln-2026-02-cve-1234",
value={"severity": "HIGH", "file": "src/auth.py", "line": 42, "description": "Hardcoded credential"},
classification="SENSITIVE",
pattern_type="security-finding"
)
Patterns progress through three stages:
memory_store call with a
pattern_type.The system handles lifecycle transitions automatically based on confidence thresholds and usage frequency. You do not need to manually promote patterns in most cases.
Creating a staged pattern:
memory_store(
key="error-handling-api-calls",
value="Always wrap external API calls in try/except with specific exceptions. Log before re-raising.",
pattern_type="coding-convention"
)
This pattern starts as Staged. After it is retrieved or matched 5+ times with positive outcomes, the system promotes it to Validated, then eventually to Promoted.
By default, attune-ai uses in-memory storage. All features described in this skill work without Redis.
What Redis adds:
Upgrade:
# Redis client libraries ship with attune-ai core — nothing extra to
# install; you only need a running Redis / Agent Memory Server.
pip install attune-ai
Zero configuration needed -- connects to
localhost:6379 by default. For custom configuration,
set the ATTUNE_REDIS_URL environment variable:
export ATTUNE_REDIS_URL="redis://custom-host:6380/0"
If Redis disconnects mid-session, the system falls back to in-memory storage gracefully. No data loss occurs for the current session; cross-agent coordination pauses until reconnection.
memory_store for simple preferences --
use CLAUDE.md instead.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub smart-ai-memory/attune-ai --plugin attune-ai28 skills in this plugin
/attune-hubDeveloper workflow hub — routes to the right skill based on what you need. Triggers on: attune, what can attune do, what can you do, capabilities, where do I start, get started./author-featureAuthor a single-source feature page — a code-verified master that projects to .help kinds + docs pages, no API credits. Triggers on: author a feature page, single-source doc, new feature master, draft docs without an api./bug-predictPredict likely bug locations from code patterns and complexity. Triggers on: predict bugs, find bugs, risky code, code risk, what might break, likely bugs, bug hotspots./bulkBatch API processing for 50% cost savings on non-urgent bulk analysis. Triggers on: batch, bulk process, batch API, cheap bulk, process many, overnight analysis, 50% savings./catalogEnumerate everything attune offers — every workflow, wizard, and tool, read live from the registries. Triggers on: catalog, list capabilities, browse, show all, what can attune do, list workflows, list wizards, what tools are there./coachProgressive help for any topic. Repeat to go deeper: concept -> procedural -> reference. Triggers on: coach, learn, explain, teach me, tell me more, how does, what is, go deeper.Other plugins' skills for the same job