agentleFS
ashvin-toashvin-to/BaseMem/skills/using-basemem/SKILL.md

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.

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
  1. Very specific:

    Literal values: Use native grep/rg for CLI flags, JSON keys, shell commands, documentation, and config values.

    line 31
  2. Very specific:

    Reindex when needed: If code_find is empty, call code_init(projectRoot) once and retry.

    line 32
  3. Very specific:

    Log selectively: Call logInteraction(topic, decision="...") immediately for meaningful decisions, fixes, and corrections.

    line 35
  4. Very specific:

    Session End: Call logInteraction(topic="...", summary="...", activity="done") when finishing work.

    line 36
  5. Very specific:

    Reindex after structural churn: run code_init when search is empty or stale after multiple symbol/signature changes.

    line 43
  6. Very specific:

    Avoid full-file reads unless strictly necessary — use code_find and code_read line slicing.

    line 48
  7. Very specific:

    Always pass the exact topic (repository folder name) when logging decisions.

    line 49

≈ “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.

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

BaseMem — Memory + Code Intelligence Protocol

BaseMem provides persistent cross-session memory (planets, notes, decisions) and zero-RAM code intelligence.

Quick Decision Matrix

TaskPreferred 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 radiuscode_explore(query="...")
Read source (ordinary inspection)native Read
Literal text searchnative grep/rg
File enumerationnative glob/ls
Code review blast-radiusget_review_context(files=["a.py"])
Evidence gateverify_change(projectRoot="...", files=[...], artifact_paths=[...], test_command="...")
Log key decision / architectural factlogInteraction(topic="...", decision="...")
End session & save summarylogInteraction(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

  1. Session Start: Context is auto-injected — do NOT call getContext. Only call it mid-session to refresh or switch topics.
  2. 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_find for symbols and code_explore for callers/callees.
  3. Literal values: Use native grep/rg for CLI flags, JSON keys, shell commands, documentation, and config values. The code graph is for symbols and relationships, not universal text search.
  4. Reindex when needed: If code_find is empty, call code_init(projectRoot) once and retry. Reindex after multiple symbol/signature additions, renames, or stale results.
  5. Keep the loop short: For ordinary small tasks, discover → read exact source with native Read → inspect artifacts → run focused tests; use verify_change for an explicit evidence bundle. Trace callers or review impact only when behavior depends on them.
  6. 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.
  7. Log selectively: Call logInteraction(topic, decision="...") immediately for meaningful decisions, fixes, and corrections. Do not log routine observations.
  8. Session End: Call logInteraction(topic="...", summary="...", activity="done") when finishing work.

Code Intelligence Rules

  • Use the graph for structure: code_find for symbols, code_explore for callers/callees, and get_review_context for impact.
  • Use direct source for current truth: inspect a known file with native Read before broad graph exploration.
  • Use text search for literals: native grep/rg is preferred for flags, JSON fields, commands, docs, and embedded strings.
  • Reindex after structural churn: run code_init when search is empty or stale after multiple symbol/signature changes.
  • Two tools are deprecated: code_read (use native Read) and code_find(grep=True) (use native grep/rg). They remain for backward compatibility only.

Gotchas

  1. Avoid full-file reads unless strictly necessary — use code_find and code_read line slicing.
  2. Always pass the exact topic (repository folder name) when logging decisions.

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.