memory-context
Skill2 starsChanged 10 days agoMITView on GitHub
Retrieve semantically relevant past learnings, analysis outputs, and project context using the csm CLI (HDC encoder with hybrid BM25 retrieval). Use this skill when the user needs context retrieval, past session memory, learning recall, or wants to query the memory system for relevant documents or patterns — even if they just say "remember when we..." or "did we solve this before". Not for learn, delegate.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- VolcanoEngineering/Bamboo-Memoryfieldtheir own version, first seen Jun 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- VolcanoEngineering/Bamboo-Memoryfield★ 10same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When indexing files, ensure all target documentation, codebase configuration, and analysis files are included in the corpus:
- Very specific: line 57
Check if the source file at path exists.
- Distinctive: line 59
Freshness Decision: If the source file is missing, modified, or deleted, treat the candidate record as stale evidence.
- Distinctive: line 78
Preserve Parseable Structure: When truncating structured payloads (such as JSON query outputs), trim array elements or field values prior …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Context
Retrieve past learnings, analysis outputs, and project knowledge using the csm (Chaotic Semantic Memory) CLI.
Prerequisites
cargo install chaotic_semantic_memory --features cliHow Retrieval Works (Retrieval Engine Mechanics)
By default, csm uses Hyperdimensional Computing (HDC) combined with BM25 hybrid retrieval. This mechanism is lexical and positional (matching n-grams, exact tokens, and structural layout). It does NOT perform neural/dense semantic reasoning by default. Learned semantic embeddings are optional and require configuring a compatible embedding provider — never assume external model services are enabled or silently invoke third-party APIs.
Indexing (Run Once or Update)
When indexing files, ensure all target documentation, codebase configuration, and analysis files are included in the corpus:
# Index lessons (lessons.jsonl stores lesson summary text in "title")
csm index-jsonl -F agents-docs/lessons.jsonl --field title --id-field id --tag-field tags
# Index analysis outputs, repo configs, and docs (including code configs like .agents/config.sh)
csm index-dir --glob "analysis/**/*.md" --glob "agents-docs/*.md" --glob ".agents/config.sh" --heading-level 2Index stored in .git/memory-index/csm.db (per-clone, never committed). Files must be saved and read with UTF-8 encoding during both indexing and querying.
Concrete Retrieval Pipeline
To ensure complete, up-to-date context and prevent hallucinating content from candidate IDs/scores alone, follow this sequence:
Query in JSON Format: Execute
csm querywith--output-format jsonto obtain structured candidate fields (id,score,path,metadata,preview).csm query "how to handle git worktree cleanup" --top-k 5 --output-format jsonFor exact identifier or code matching:
csm query "MAX_CONTEXT_TOKENS" --top-k 3 --output-format json csm query "get_user_by_id" --code-aware --top-k 5 --output-format json- Inspect Bounded Candidates: Review candidate matches (
id,score,path,metadata,preview). Do NOT infer a lesson or document's full contents from its ID or score alone. - Verify Source Freshness:
- Check if the source file at
pathexists. - Compare current file state (existence and last modified
mtimeor hash) against indexmetadata. - Freshness Decision: If the source file is missing, modified, or deleted, treat the candidate record as stale evidence. Re-index the target path or perform a direct source inspection. Never present deleted or stale index records as active truth.
- Check if the source file at
- Read Source/Section Content:
- Fetch the actual source text from the matching source file path/heading directly (e.g., using
read_fileor file inspection).
- Fetch the actual source text from the matching source file path/heading directly (e.g., using
- Cite Verified Source:
- Attribute retrieved findings directly to the verified source file path and heading/section.
Output Formats
--output-format json(recommended for programmatic usage): returnsid,score,path,preview, andmetadata.--output-format table: human-readable table containing concept IDs and scores only; requires source file reading to access full text.--output-format quiet: returns IDs only.
Payload Budget & Bounding
Unfiltered retrieval outputs or raw file concatenation can exceed context limits.
- Bounded UTF-8 Byte / Token Ceiling: Enforce an explicit byte cap or tokenizer cap (e.g., matching budget limits in
.agents/config.sh). - Preserve Parseable Structure: When truncating structured payloads (such as JSON query outputs), trim array elements or field values prior to serialization. Never slice raw serialized JSON text mid-string, which creates malformed output.
- Label Estimates: Label word-count or character-based calculations as approximate estimates (
~tokens) unless using an exact tokenizer.
Example JSON bounding function:
import json
def bound_json_payload(items, max_bytes=4096):
bounded = []
current_bytes = 2 # []
for item in items:
serialized = json.dumps(item, ensure_ascii=False)
item_bytes = len(serialized.encode('utf-8')) + (2 if bounded else 0)
if current_bytes + item_bytes > max_bytes:
break
bounded.append(item)
current_bytes += item_bytes
return json.dumps(bounded, ensure_ascii=False)See Also
learn— Extract learnings into AGENTS.mddelegate— Context retrieval and handoff
Rationalizations
| Rationalization | Reality |
| "I'll just search with grep instead" | Grep finds literal string matches; CSM hybrid HDC/BM25 retrieval matches positional n-grams and indexed section metadata. |
| "The index is probably out of date, but I'll use the CLI output as full context anyway" | CSM CLI table/JSON output provides candidate IDs and previews, not full section source text. Always verify file freshness and read the source file directly. |
Red Flags
- Inferring lesson or document contents from concept ID or score alone without reading the source file
- Presenting deleted or modified source files as current truth based on stale index records
- Truncating serialized JSON text mid-string, causing invalid JSON syntax
- Assuming default HDC/BM25 performs dense neural semantic reasoning or silently enabling external embedding services
- Skipping source freshness verification before incorporating retrieved context
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
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.

