agentleFS
cwinvestmentscwinvestments/memstack/skills/echo/SKILL.md

echo

Skill425 starsChanged 5 months agoMITView on GitHub

Use when the user references past sessions, asks 'what did we do', 'do you remember', 'last session', 'recall', or 'continue from'.

  • Reads credentials

7 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this skill activates, output:

    line 13
  2. Distinctive:

    If you're thinking any of these, STOP, you're about to skip the protocol:

    line 33
  3. Distinctive:

    If this returns results, present them with scores, dates, and source files.

    line 53
  4. Distinctive:

    Always run SQLite search to supplement vector results or as fallback if Step 1 fails:

    line 57
  5. Very specific:

    If both vector and SQLite return nothing, check memory/sessions/ and memory/projects/ for markdown files.

    line 72
  6. Very specific:

    Source attribution: Always show which source (vector/SQLite/markdown) each result came from

    line 79
  7. Distinctive:

    If nothing found across all sources, say clearly: "No session logs found for [topic].

    line 87
  8. Very specific:

    Use --force to re-embed all content (e.g., after changing embedding model):

    line 96

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

🔊 Echo: Searching the Archives...

Recall information from past CC sessions using semantic vector search.

Activation

When this skill activates, output:

🔊 Echo: Searching the archives...

Then execute the protocol below.

Context Guard

ContextStatusPriority
User says "recall", "remember", "last session", "what did we"ACTIVE: search memoryP1
User asks about past work explicitly ("did we build X?")ACTIVE: search memoryP1
User says "continue from" or "resume" a past topicACTIVE: search memoryP2
User is describing NEW work to do ("build X", "add Y")DORMANT, this is new work, not recallnone
User mentions "memory" in code context (RAM, variables)DORMANT, technical term, not MemStack recallnone
User mentions a project name in present tense ("work on X")DORMANT, forward-looking, not recallnone
User says "save" or "log" (Diary/Project territory)DORMANT, Diary or Project skill handles writingnone

Anti-Rationalization

If you're thinking any of these, STOP, you're about to skip the protocol:

You're thinking...Reality
"I remember this from earlier in the conversation"You don't persist. Earlier context may be compacted. Run the search.
"I can just summarize from what I know"You know nothing from prior sessions. The database does. Search it.
"The user probably doesn't need exact details"Users ask Echo for specifics: dates, decisions, file paths. Run all steps.
"Vector search seems slow, I'll skip to SQLite"Vector search returns the best results. Always try it first.
"I found one result, that's probably enough"Run ALL steps (vector + SQLite + insights). One source misses context another catches.
"The keywords are too vague to search"Search anyway. Vague queries still return useful semantic matches.

Protocol

Step 1: Semantic Vector Search (primary)

Try LanceDB vector search first for best-quality results:

python "$MEMSTACK_PATH/skills/echo/search.py" "<keywords>" --top-k 5

If this returns results, present them with scores, dates, and source files.

Step 2: SQLite Keyword Search (augment or fallback)

Always run SQLite search to supplement vector results or as fallback if Step 1 fails:

python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" search "<keywords>" --project <project>

Step 3: Recent Sessions and Insights

For additional context:

python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" get-sessions <project> --limit 5
python "${CLAUDE_PLUGIN_ROOT}/db/memstack-db.py" get-insights <project>

Step 4: Markdown Fallback

If both vector and SQLite return nothing, check memory/sessions/ and memory/projects/ for markdown files.

Step 5: Present Findings

Combine and deduplicate results from all sources:

  • Vector results: Show with similarity scores and section headings
  • SQLite results: Show with dates and accomplishment summaries
  • Source attribution: Always show which source (vector/SQLite/markdown) each result came from
  • Date and project name
  • What was accomplished
  • What was left pending
  • Key decisions and insights

Step 6: No Results

If nothing found across all sources, say clearly: "No session logs found for [topic]. Use Diary to save future sessions."

Indexing

To re-index sessions after new diary entries (normally done automatically):

python "$MEMSTACK_PATH/skills/echo/index-sessions.py"

Use --force to re-embed all content (e.g., after changing embedding model):

python "$MEMSTACK_PATH/skills/echo/index-sessions.py" --force

Embedding provider

Echo uses LOCAL embeddings by default: sentence-transformers (all-MiniLM-L6-v2, 384-dim). No API key is needed and nothing leaves the machine.

OpenAI embeddings (text-embedding-3-small, 1536-dim) are strictly OPT-IN. Enable them either way:

  • set MEMSTACK_EMBED_PROVIDER=openai in the environment (also requires an OPENAI_API_KEY to be set), or
  • pass --provider openai to the indexer.

A bare OPENAI_API_KEY in the environment does NOT switch Echo to OpenAI on its own; the opt-in above is required. An explicit OpenAI opt-in with no key present is a hard error, not a silent downgrade to local, so an index is never built with a provider you did not choose.

Switching providers requires a --force re-index, because the vector dimensions differ (local 384 vs OpenAI 1536) and the two cannot be mixed in one index. Search automatically matches whatever provider the current index was built with (recorded in metadata.json).

Inputs

  • Keywords from the user's prompt (project name, feature name, date range)
  • Vector DB: $MEMSTACK_PATH/memory\vectors\lancedb\ (via LanceDB)
  • Database: ~/.memstack/memstack.db (via memstack-db.py)
  • Fallback: $MEMSTACK_PATH/memory\ (legacy markdown files)

Outputs

  • Ranked results with semantic similarity scores
  • Source type attribution (vector, database, or markdown fallback)
  • Summary of relevant past session context

Example Usage

User: "Do you remember what we did on AdminStack last session?"

🔊 Echo: Searching the archives...

Vector search (top 3):
  [1] AdminStack: 2026-02-18 (session)
      Section: Accomplished
      Score: 0.912
      Built CC Monitor page with session cards, auto-refresh, notifications.
      Created /api/cc-sessions CRUD + public report endpoint.

  [2] AdminStack, 2026-02-17 (session)
      Section: Decisions
      Score: 0.847
      Used SWR for auto-refresh instead of polling. API key via HMAC-SHA256.

  [3] AdminStack: 2026-02-18 (session)
      Section: Next Steps
      Score: 0.791
      Deploy dashboard, add notification preferences, test mobile view.

SQLite insights (3):
  - [decision] Used SWR for auto-refresh instead of polling
  - [decision] API key validation via HMAC-SHA256
  - [pattern] Next.js App Router + SWR for all dashboard pages

Level History

  • Lv.1: Base: Session log search and recall. (Origin: MemStack v1.0, Feb 2026)
  • Lv.2: Enhanced: Added YAML frontmatter, context guard, activation message. (Origin: MemStack v2.0 MemoryCore merge, Feb 2026)
  • Lv.3: Advanced: SQLite backend as primary source, markdown as fallback, insight search. (Origin: MemStack v2.1 Accomplish-inspired upgrade, Feb 2026)
  • Lv.4: Native: CC rules integration (.claude/rules/echo.md), /memstack-search slash command, auto-indexed CLAUDE.md context. (Origin: MemStack v3.0-beta, Feb 2026)
  • Lv.5: Semantic: LanceDB vector-powered recall with sentence-transformers embeddings (OpenAI opt-in). Auto-indexes sessions/plans, semantic similarity across all logs, SQLite fallback. (Origin: MemStack v3.1, Feb 2026)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.