Auto skill build memsearch codex memory
Skill Arnie016/codex-prompt-templates/skills/auto-skill-build-memsearch-codex-memory
Use memsearch as an on-demand semantic index for project markdown memory (search → expand → optional deep drill). Use when the user asks to recall past decisions, prior debugging, or “have we seen this before?” and a `.memsearch/memory/` store exists (or the user wants to set one up). Skip when the question is only about current code state (use Read/Grep) or when the user explicitly does not want semantic indexing / installs.From its SKILL.md
npx -y skills add Arnie016/codex-prompt-templates --skill auto-skill-build-memsearch-codex-memoryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 8 commands, including `PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"` and 7 more.
SKILL.md
2.8 KB, 578 tokens by cl100k_base, as published. Nobody here has run it
memsearch + Codex memory recall (on-demand)
Generated by: Codex Supercharge maintenance automation.
This skill is for manual recall using the memsearch CLI. It does not
install hooks or run upstream installers.
Reference notes: references/memsearch-codex-memory.md.
Preconditions
- Prefer
.memsearch/memory/if it exists. - If there is no
.memsearch/memory/, fall back to$agent-memory-ledgerandrgacross.codex-memory/. - If
memsearchis not installed, stop and ask the user whether they want to install it. Do not runcurl | shinstallers.
Workflow
-
Confirm the memory store location:
PROJECT_ROOT/.memsearch/memory/(preferred)- otherwise
.codex-memory/+rgfallback
-
Derive a stable project collection, then index memory when needed:
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
COLLECTION="$(plugins/codex-supercharge/scripts/derive_memsearch_collection.sh "$PROJECT_ROOT")"
memsearch index "$PROJECT_ROOT/.memsearch/memory" --collection "$COLLECTION"
If indexing fails because the ONNX embedding model needs a first-run download, either:
- temporarily allow network access, or
- switch to a provider you already have configured (high-trust only).
- Search for relevant chunks and expand the best hit:
memsearch search "<query>" --top-k 5 --json-output --collection "$COLLECTION"
memsearch expand <chunk_hash> --collection "$COLLECTION"
- If
expandfails, read the source file directly using thesourceand line-range fields from JSON output:
sed -n '<start_line>,<end_line>p' "<source>"
- Return a curated summary:
- focus on decisions, constraints, prior fixes, and “why”
- cite the memory file/date (and heading if present)
- if nothing relevant: say so, and propose a tighter query
Skip when
- The task is purely about the current repo state (prefer Read/Grep/tests).
- The user asked to ignore memory or avoid semantic tools.
- There is no
.memsearch/memory/and the user does not want to create one.
Validation
- If
memsearchexists:memsearch --versionand a dry run search against a small collection. - Otherwise: ensure the fallback path uses
$agent-memory-ledger+rg. - Validate the helper with
plugins/codex-supercharge/scripts/derive_memsearch_collection.sh "$PWD".
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.