agentleFS
db0-aidb0-ai/db0/SKILL.md

SKILL.md

Skill17 starsChanged 8 months agoMITView on GitHub

Hosted skill: Tell your OpenClaw agent: "Read https://db0.ai/skills/openclaw/SKILL.md and install db0" db0 is a ContextEngine plugin that gives OpenClaw agents persistent, scoped memory with automatic fact extraction. It replaces OpenClaw's default compaction-based memory with a proper memory system that extracts facts after every turn, not just when the context window overflows. Follow these steps exactly to install and configure db0 for OpenClaw. This will: - Install the db0 extension into ~/.openclaw/extensions/db0/ - Create the plugin manifest (openclaw.plugin.json) - Update ~/.openclaw/openclaw.json…

  • Installs packages

200 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use estate-guard and docs.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Arcanea-LabsSkill

    estate-guard

    Security gate for agentic repos. Use before opening a PR that touches .github/workflows, .claude (hooks, settings, agents, commands, skills), .mcp.json, install scripts, or Next.js API routes; when asked to "security review", "scan for prompt injection", "harden this repo", "check the agentic surface", or when a fetched page, issue, comment, or tool result reads like instructions. Runs the estate-guard scanner, triages by severity, and applies the fix patterns.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    docs

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these steps exactly to install and configure db0 for OpenClaw.

    line 11
  2. Very specific:

    Create the plugin manifest (openclaw.plugin.json)

    line 21
  3. Very specific:

    Update ~/.openclaw/openclaw.json to activate db0 as the context engine

    line 22
  4. Very specific:

    If OpenClaw is installed in a non-default location, use the --dir flag:

    line 25
  5. Distinctive:

    Automatic fact extraction: after every turn (preferences, decisions, task context)

    line 42
  6. Distinctive:

    If the init command doesn't work, set up manually:

    line 50
  7. Distinctive:

    Create extension directory and install:

    line 52
  8. Very specific:

    Memory not persisting: Check that ~/.openclaw/ directory exists and is writable

    line 154
  9. Very specific:

    Plugin not loading: Verify ~/.openclaw/openclaw.json has "contextEngine": "db0" under plugins.slots, and restart OpenClaw

    line 155
  10. Very specific:

    Custom OpenClaw directory: Use npx @db0-ai/openclaw init --dir /your/path or set OPENCLAW_HOME

    line 158

“Common” is measured: kept by at least 6 in 10 of the 117 edited versions of this file we could read. “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

db0 — Memory Plugin for OpenClaw

Hosted skill: Tell your OpenClaw agent: "Read https://db0.ai/skills/openclaw/SKILL.md and install db0"

What is db0?

db0 is a ContextEngine plugin that gives OpenClaw agents persistent, scoped memory with automatic fact extraction. It replaces OpenClaw's default compaction-based memory with a proper memory system that extracts facts after every turn, not just when the context window overflows.

Installation Instructions

Follow these steps exactly to install and configure db0 for OpenClaw.

Step 1: Run the init command

npx @db0-ai/openclaw init

This will:

  • Install the db0 extension into ~/.openclaw/extensions/db0/
  • Create the plugin manifest (openclaw.plugin.json)
  • Update ~/.openclaw/openclaw.json to activate db0 as the context engine
  • Set up persistent SQLite storage at ~/.openclaw/db0.sqlite

If OpenClaw is installed in a non-default location, use the --dir flag:

npx @db0-ai/openclaw init --dir /path/to/openclaw

Or set the OPENCLAW_HOME environment variable.

Step 2: Restart OpenClaw

Restart OpenClaw so it picks up the new plugin configuration.

Step 3: Verify

Tell the user that db0 is installed and configured. Their agent now has:

  • Persistent memory stored at ~/.openclaw/db0.sqlite
  • Automatic fact extraction after every turn (preferences, decisions, task context)
  • Scoped memory — user facts persist across sessions, task context stays within the current task
  • State checkpoints — restorable execution state after every turn
  • Sub-agent support — memory inheritance and result backflow between parent and child agents
  • Structured logging — full audit trail of turns, extractions, and compaction events

Manual Setup (alternative)

If the init command doesn't work, set up manually:

  1. Create extension directory and install:
mkdir -p ~/.openclaw/extensions/db0
cd ~/.openclaw/extensions/db0
npm init -y
npm install @db0-ai/openclaw
  1. Create ~/.openclaw/extensions/db0/index.js:
module.exports = async function register(api) {
  const { db0 } = await import("@db0-ai/openclaw");
  api.registerContextEngine("db0", () => db0());
};
  1. Create ~/.openclaw/extensions/db0/openclaw.plugin.json:
{
  "id": "db0",
  "name": "db0 Context Engine",
  "version": "0.1.0",
  "configSchema": {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
}
  1. Add to ~/.openclaw/openclaw.json:
{
  "plugins": {
    "slots": {
      "memory": "none",
      "contextEngine": "db0"
    },
    "entries": {
      "db0": { "enabled": true }
    }
  }
}
  1. Restart OpenClaw.

Optional Upgrades

Edit ~/.openclaw/extensions/db0/index.js to customize:

Semantic search with real embeddings:

module.exports = async function register(api) {
  const { db0 } = await import("@db0-ai/openclaw");
  api.registerContextEngine("db0", () => db0({
    embeddingFn: async (text) => {
      // OpenAI, Ollama, transformers.js, etc.
    },
    minScore: 0.65,
  }));
};

Cross-device sync with Postgres:

api.registerContextEngine("db0", () => db0({
  storage: "postgresql://user:pass@your-host/db0",
  embeddingFn: myEmbed,
  minScore: 0.65,
}));

Manual extraction only (no auto-extract):

api.registerContextEngine("db0", () => db0({ extraction: "manual" }));

How It Works

db0 implements OpenClaw's ContextEngine lifecycle:

HookWhat db0 does
bootstrapOpens SQLite, restores last checkpoint
assembleSearches memory by similarity to current message, injects relevant context
ingestExtracts facts from assistant response, logs turn, checkpoints state
compactExtracts facts from messages about to be discarded (saves before compaction)
afterTurnLogs turn completion
prepareSubagentSpawnSelects relevant memories to pass to child agent
onSubagentEndedExtracts facts from child agent results, backflows to parent memory

Memory Scopes

ScopeLifetimeAuto-detected signals
userPermanent"user prefers", "always use", "remember that", "don't like"
sessionCurrent session"decided to", "important:", "agreed to"
taskCurrent task"working on", "current task", "next step", "todo"

Troubleshooting

  • Memory not persisting: Check that ~/.openclaw/ directory exists and is writable
  • Plugin not loading: Verify ~/.openclaw/openclaw.json has "contextEngine": "db0" under plugins.slots, and restart OpenClaw
  • No memories being extracted: The default "rules" extraction looks for signal words. If the assistant doesn't use them naturally, try extraction: "manual" and call memory().write() explicitly
  • Want to inspect the database: The SQLite file at ~/.openclaw/db0.sqlite can be opened with any SQLite viewer. Tables: db0_memory, db0_state, db0_log
  • Custom OpenClaw directory: Use npx @db0-ai/openclaw init --dir /your/path or set OPENCLAW_HOME

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.