using-basemem
Skill1 starsChanged 24 days agoMITView on GitHub
BaseMem memory + code intelligence protocol. Triggers on: recall context, log decision, session lifecycle, code search, review blast radius, project memory, zero-RAM code graph.
In this repository4 other files it gives its agents.
- code-reviewSkill
- debug-issueSkill
- explore-codebaseSkill
- session-startSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Literal values: Use native grep/rg for CLI flags, JSON keys, shell commands, documentation, and config values.
- Very specific: line 32
Reindex when needed: If code_find is empty, call code_init(projectRoot) once and retry.
- Very specific: line 35
Log selectively: Call logInteraction(topic, decision="...") immediately for meaningful decisions, fixes, and corrections.
- Very specific: line 36
Session End: Call logInteraction(topic="...", summary="...", activity="done") when finishing work.
- Very specific: line 43
Reindex after structural churn: run code_init when search is empty or stale after multiple symbol/signature changes.
- Very specific: line 48
Avoid full-file reads unless strictly necessary — use code_find and code_read line slicing.
- Very specific: line 49
Always pass the exact topic (repository folder name) when logging decisions.
≈ “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
BaseMem — Memory + Code Intelligence Protocol
BaseMem provides persistent cross-session memory (planets, notes, decisions) and zero-RAM code intelligence.
Quick Decision Matrix
| Task | Preferred Tool Call |
| Recall session / topic context (mid-session refresh or topic switch ONLY — never at session start) | getContext(topic="repo-name") |
| Structural symbol discovery (when the graph helps) | code_find(query="...") |
| Callers / callees / blast radius | code_explore(query="...") |
| Read source (ordinary inspection) | native Read |
| Literal text search | native grep/rg |
| File enumeration | native glob/ls |
| Code review blast-radius | get_review_context(files=["a.py"]) |
| Evidence gate | verify_change(projectRoot="...", files=[...], artifact_paths=[...], test_command="...") |
| Log key decision / architectural fact | logInteraction(topic="...", decision="...") |
| End session & save summary | logInteraction(topic="...", summary="...", activity="done") |
Division of labor: structural discovery (symbols, callers/callees, impact) → BaseMem. Ordinary source inspection and literal search → native tools. code_read and code_find(grep=True) are deprecated; prefer native Read and native grep/rg.
Workflow
- Session Start: Context is auto-injected — do NOT call
getContext. Only call it mid-session to refresh or switch topics. - Choose the lightest path: For a known target, inspect the exact file and nearby tests/callers directly with native tools. For unfamiliar or cross-file structural work, use
code_findfor symbols andcode_explorefor callers/callees. - Literal values: Use native
grep/rgfor CLI flags, JSON keys, shell commands, documentation, and config values. The code graph is for symbols and relationships, not universal text search. - Reindex when needed: If
code_findis empty, callcode_init(projectRoot)once and retry. Reindex after multiple symbol/signature additions, renames, or stale results. - Keep the loop short: For ordinary small tasks, discover → read exact source with native
Read→ inspect artifacts → run focused tests; useverify_changefor an explicit evidence bundle. Trace callers or review impact only when behavior depends on them. - Separate evidence: Memory preserves why and durable constraints; source, artifacts, and tests establish current behavior. Memory is context, not verification. Label conclusions as memory, source, artifact, test, or inference.
- Log selectively: Call
logInteraction(topic, decision="...")immediately for meaningful decisions, fixes, and corrections. Do not log routine observations. - Session End: Call
logInteraction(topic="...", summary="...", activity="done")when finishing work.
Code Intelligence Rules
- Use the graph for structure:
code_findfor symbols,code_explorefor callers/callees, andget_review_contextfor impact. - Use direct source for current truth: inspect a known file with native
Readbefore broad graph exploration. - Use text search for literals: native
grep/rgis preferred for flags, JSON fields, commands, docs, and embedded strings. - Reindex after structural churn: run
code_initwhen search is empty or stale after multiple symbol/signature changes. - Two tools are deprecated:
code_read(use nativeRead) andcode_find(grep=True)(use nativegrep/rg). They remain for backward compatibility only.
Gotchas
- Avoid full-file reads unless strictly necessary — use
code_findandcode_readline slicing. - Always pass the exact
topic(repository folder name) when logging decisions.
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.

