From rafayels-engineering
Persistent cross-session case-based memory for rafayels-engineering. Records successful patterns, failed attempts, user corrections, and review outcomes as cases in a local sqlite-vec database. Inject relevant past cases into workflows at runtime. Use when the user asks to remember something, recall prior context, review the case bank, or runs workflows that benefit from learned patterns.
npx claudepluginhub rafayelgardishyan/rafayels-marketplace --plugin rafayels-engineeringThis skill is limited to using the following tools:
Persistent cross-session memory for rafayels-engineering, implemented as
references/case-format.mdreferences/injection-guide.mdreferences/schema.mdreferences/signals.mdscripts/audit.pyscripts/capture.pyscripts/db.pyscripts/embed_daemon.pyscripts/embedder.pyscripts/memoryscripts/memory.pyscripts/migrations/001_initial.sqlscripts/requirements-dev.txtscripts/requirements.txtscripts/retrieve.pyscripts/tests/__init__.pyscripts/tests/conftest.pyscripts/tests/test_audit.pyscripts/tests/test_capture.pyscripts/tests/test_concurrency.pyGenerates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Persistent cross-session memory for rafayels-engineering, implemented as Case-Based Reasoning (CBR) with local vector retrieval. Inspired by Memento — agents stay frozen, improvement comes through retrieval of past cases, not by editing prompts.
# One-time setup
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory init
# Verify everything works
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory doctor
# Write a case
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory write \
--phase plan \
--query "How to structure marketplace sync" \
--plan "Use rsync -a --delete for mirroring" \
--outcome "Clean one-way sync, idempotent" \
--tags '["marketplace","sync"]'
# Retrieve relevant past cases for a phase
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory query \
"setting up marketplace sync" --phase plan --k 3
# Add a signal (success, failure, review outcome, etc.)
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory signal \
42 merge 1.0 --source "pr:#123"
This skill is model-invocable. It should auto-activate when:
/workflows:brainstorm, /workflows:plan, /workflows:work,
/workflows:review, /workflows:compound — these have explicit retrieve
and capture hooks/re:memory-review for audit┌─────────────────────────────────┐
│ memory CLI (one-shot) │
│ 18 subcommands, --json on all │
└─────────────────────────────────┘
│
├─(vector ops)─> embedder.py ─> embed_daemon.py (Unix socket)
│ fallback: in-process fastembed
│
└─(storage)──> db.py ─> sqlite-vec @ memory.db_path
(default: ~/.claude/plugins/
rafayels-engineering/memory.db;
override via project-config)
memory-proposer skill with human review required.reward * exp(-age_days/60) at retrieval time.| Command | Description |
|---|---|
memory init | Create DB and schema |
memory write --phase P --query Q ... | Write a new case (starts quarantined) |
memory seed --source docs/solutions/ | Bootstrap from existing solution docs |
memory import FILE | Import cases from JSONL export |
| Command | Description |
|---|---|
memory query "text" --phase P --k 3 | Semantic retrieve with MMR |
memory read <case_id> | Fetch a single case by ID |
memory list [--phase] [--status] [--limit] | Filter cases by metadata |
memory report --stats | Aggregate statistics |
memory report --stale --older-than 90 | Find prune candidates |
memory doctor | Self-diagnose readiness |
memory export [--output FILE] | Export all cases + signals as JSONL |
| Command | Description |
|---|---|
memory signal <id> <type> <value> | Append a signal (types: merge, ci, approval, review, regression) |
memory update <id> [--title] [--tags] [--outcome] | Update case metadata |
memory promote <id> | Pin a case as promoted (never auto-archived) |
memory link <id_a> <id_b> | Mark two cases as related |
| Command | Description |
|---|---|
memory prune [--reward-below 0.3] [--older-than 90] [--confirm] | Archive low-value cases (dry-run by default) |
memory delete <id> --confirm-token <token> | Hard-delete a case (requires two-step confirmation) |
memory daemon-stop | Stop the embedder daemon |
All commands accept --json for machine-readable output.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Not found |
| 2 | Validation error |
| 3 | Storage error |
| 75 | Memory unavailable (EX_TEMPFAIL — dependencies missing, workflows should tolerate) |
pip install -r ${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/requirements.txt
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory init
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory doctor
First invocation downloads the BGE-small model (~67MB) into
~/.cache/rafayels-memory/fastembed/. Subsequent runs use the cached model.
memory-proposer skill — Pattern detection and auto-PR generation/re:memory-review command — Interactive audit workflowcompound-docs skill — Documents solved problems (paired with memory seed)AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension'Cause: macOS system Python and pyenv-installed Python are built without the loadable SQLite extension API. sqlite-vec cannot load into these interpreters.
Fix: Invoke the bundled memory wrapper instead of python3 memory.py. The wrapper probes for an extension-capable interpreter (Homebrew python3.12, then python3.11, python3.10) and falls back with an actionable error message. Install dependencies into Homebrew Python 3.12 once:
brew install python@3.12
/opt/homebrew/bin/python3.12 -m pip install --break-system-packages \
-r ${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/requirements.txt
Then use the wrapper everywhere:
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory <subcommand>
Override the interpreter explicitly with RAFAYELS_MEMORY_PYTHON=/path/to/python.
Alternative: rebuild pyenv Python with extension support:
PYTHON_CONFIGURE_OPTS="--enable-loadable-sqlite-extensions" pyenv install 3.12.12
This is a macOS-specific platform limitation, not a memory layer bug. Linux distros typically ship Python with extension support enabled.
The memory layer requires Python 3.10–3.12. Python 3.13+ is not currently supported because fastembed==0.4.2 doesn't publish wheels for those versions. Pin yourself to 3.12 for now.
The --json flag is a top-level argparse option, so it must come before the subcommand:
# ✅ Correct
memory --json write --phase plan --query "..."
# ❌ Fails with "unrecognized arguments: --json"
memory write --phase plan --query "..." --json
memory doctor reports unavailableInstall dependencies:
pip install -r ${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/requirements.txt
Workflows skip memory injection silently
Check memory doctor --json. If status is degraded or unavailable, the
workflows are correctly degrading. Install missing deps to re-enable.
Queries return empty results
The cold-start threshold requires k*3 active cases per phase. Write more
cases (via normal workflow use) or run memory seed to bootstrap.
Daemon won't start
${CLAUDE_PLUGIN_ROOT}/skills/memory/scripts/memory daemon-stop
# Delete stale PID file if needed
rm -f /tmp/rafayels-memory-$(id -u)/embed.pid
# Next query will auto-spawn a fresh daemon
Cross-project learning not working
The DB path comes from project-config's memory.db_path key (default:
~/.claude/plugins/rafayels-engineering/memory.db) — user-scope and
shared across all projects. Verify the path with memory doctor --json
or project-config get memory.db_path.