agent-comms
SendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against the agent whitelist, or a…
Store reusable insights in semantic memory for vector-similarity recall. TRIGGER when: an agent discovers a pattern, decision, or gotcha worth retrieving later via embedding search. SKIP: searching/recalling memory (use semantic-memory-mcp); file-based memory writes (use
$ npx -y skills add komluk/scaffolding --skill semantic-memory-store --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/semantic-memory-storeContext preview
The summary Claude sees to decide when to auto-load this skill.
Store reusable insights in semantic memory for vector-similarity recall. TRIGGER when: an agent discovers a pattern, decision, or gotcha worth retrieving later via embedding search. SKIP: searching/recalling memory (use semantic-memory-mcp); file-based memory writes (use
name: semantic-memory-store description: "Store reusable insights in semantic memory for vector-similarity recall. TRIGGER when: an agent discovers a pattern, decision, or gotcha worth retrieving later via embedding search. SKIP: searching/recalling memory (use semantic-memory-mcp); file-based memory writes (use agent-memory)."
Store knowledge as vector-embedded entries in an optional semantic memory service. When the service is available, entries are automatically embedded and retrievable via cosine similarity search by any agent in future sessions.
This skill is **optional**. If no semantic memory service is configured, agents should degrade gracefully and rely on the file-based memory described in the `agent-memory` skill.
Before attempting to store or search, verify a semantic memory backend is reachable:
When a semantic memory backend is available, store an entry with the following fields. The backend embeds the content and persists it for similarity search.
| Parameter | Required | Description | |-----------|----------|-------------| | `content` | Yes | Text to embed and store (keep concise; long content may be truncated) | | `agent_name` | No | Agent that created this memory (e.g. `developer`, `debugger`) | | `content_type` | No | One of: `learning`, `error`, `pattern`, `decision` (default: `learning`) | | `tags` | No | List of string tags for filtering | | `task_id` | No | Source task ID if applicable | | `project_id` | No | Associated project ID | | `conversation_id` | No | Associated conversation ID |
| Type | Use When | |------|----------| | `learning` | General knowledge, best practices, how-to | | `error` | Root cause analysis, error resolution steps | | `pattern` | Confirmed code pattern, architecture pattern | | `decision` | Architecture or design decision with rationale |
Store an entry with:
Store an entry with:
When a semantic memory backend is available, stored memories are automatically recalled by the agent execution pipeline. When a task starts, the pipeline:
1. Embeds the task prompt using the same model 2. Performs cosine similarity search against stored memories 3. Returns top-K results within a distance threshold 4. Injects matching memories into the agent's context as `## Semantic Memory`
No manual retrieval is needed. Agents that want to search for specific memories can use the `semantic_search` MCP tool described in the `semantic-memory-mcp` skill.
Semantic memory requires an optional backend service. If your project does not configure one, this skill is inert and file-based memory remains fully functional. When a backend is configured, it typically requires:
Consult your project's setup documentation for the exact configuration. Absence of any of these means the skill degrades gracefully to file-based memory.
When supported by the backend, content is deduplicated by hash. Storing the same content twice updates the existing entry (merges tags, updates timestamp) instead of creating a duplicate.
**Search-before-store:** hash dedup only catches byte-identical content. Backends that distil input into atomic memories (e.g. mem0) split one store call into several entries, so a slightly reworded fact silently bloats the store. Before storing, run a similarity search first; if a near-duplicate already exists, update or skip rather than adding a paraphrase.
| System | Mechanism | Best For | |--------|-----------|----------| | File-based (agent-memory skill) | Markdown files in `.scaffolding/` | Structured, curated knowledge with manual organization | | Semantic memory (this skill) | Vector store with embedding search | Discoverable knowledge via natural language similarity |
Use both when available: file-based memory for well-organized reference material, semantic memory for fuzzy-match discoverable insights. When semantic memory is unavailable, file-based memory alone is sufficient.
Spec-driven multi-agent orchestration for Claude Code — pure markdown, zero backend, runs on the stock runtime. 13 agents, 36 skills, 19 commands, 15 hooks, per-phase model tiers, opt-in lifecycle hooks, optional cross-device semantic memory.
Repo: komluk/scaffolding
SendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against the agent whitelist, or a…
3-tier markdown memory protocol (shared/agent/conversation) for cross-session knowledge. TRIGGER when: reading or writing agent memory files, choosing which…
RESTful API design standards: resource naming, HTTP methods, status codes, pagination, versioning. TRIGGER when: designing new API endpoints, defining error…
Optimize Claude Code context-window usage for accuracy and cost. TRIGGER when: hitting context limits, structuring prompts for an agent, or trimming what gets…
Schema design, index strategy, migration safety, and query analysis. TRIGGER when: designing tables or indexes, writing a migration, or diagnosing a slow…