Agent skill

memex-search

Search, filter, and retrieve Opencode history via memex CLI. Use for context resumption, finding past code/decisions, and self-correction based on history.

Stars 74
Forks 7

Install this agent skill to your Project

npx add-skill https://github.com/nicosuave/memex/tree/main/skills/opencode/memex-search

SKILL.md

Memex for Opencode

memex is the primary memory retrieval tool. Use it to access historical sessions and indexed code interactions.

Usage Patterns

  • Context Retrieval: "What did we discuss in the last session regarding the API?"
    • memex search "API discussion" --sort ts --limit 10
  • Code Discovery: "Find the specific function implementation from last week."
    • memex search "function implementation" --hybrid
  • Session Identification: "Which session covered the database migration?"
    • memex search "database migration" --unique-session

Search Modes

Semantic vs Exact

Need Flag Example
Exact terms, IDs, errors (default) memex search "Error: 500"
Concepts, intent --semantic memex search "auth flow" --semantic
Mixed specific + fuzzy --hybrid memex search "user_id logic" --hybrid

Session Context

Use --session {session_id} to isolate a specific interaction thread.

  1. Find Session ID:
    • memex search "topic" --unique-session
  2. Narrow Search:
    • memex search "detail" --session <session_id>
  3. Fetch Transcript:
    • memex session <session_id>

Output Parsing

Output is JSONL (JSON Lines). Each line is a valid JSON object.

Schema:

  • doc_id: Unique record ID.
  • session_id: Conversation thread ID.
  • ts: ISO 8601 timestamp.
  • role: user, assistant, system.
  • text: Content payload.
  • score: Search relevance (float).

Interpretation:

  • Filtering: Discard results below a relevance threshold (e.g., score < 0.5) unless specific.
  • Ordering: Sort by ts for timeline reconstruction.
  • Grouping: Aggregate by session_id to view conversation turns.

Expand your agent's capabilities with these related and highly-rated skills.

nicosuave/memex

memex-search

Search, filter, and retrieve Claude/Codex history indexed by the memex CLI. Use when the user wants to index history, run lexical/semantic/hybrid search, fetch full transcripts, or produce LLM-friendly JSON output for RAG.

74 7
Explore
nicosuave/memex

memex-search

Search, filter, and retrieve Claude/Codex history indexed by the memex CLI. Use when you want to search history, run lexical/semantic/hybrid search, fetch full transcripts, or produce LLM-friendly JSON output.

74 7
Explore
nicosuave/memex

instruction-improver

Search memex for user feedback patterns (frustration, corrections, praise, successful outcomes) to identify recurring mistakes and wins, then generate CLAUDE.md or AGENTS.md improvements.

74 7
Explore
davila7/claude-code-templates

verl-rl-training

Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.

23,776 2,298
Explore
davila7/claude-code-templates

openrlhf-training

High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.

23,776 2,298
Explore
davila7/claude-code-templates

gguf-quantization

GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.

23,776 2,298
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results