agentleFS
delexwdelexw/claude-code-misc/skills/ladybugdb/SKILL.md

ladybugdb

Skill2 starsChanged 8 months agoMITView on GitHub

Expert guide for LadybugDB — an embedded, in-process property graph database using openCypher. Use this skill whenever the user is working with LadybugDB, writing Cypher queries for LadybugDB, using the `lbug` CLI, importing `real_ladybug` in Python, using `@ladybugdb/core` in Node.js, or building any application with LadybugDB. Also triggers when the user asks about LadybugDB schema design, graph algorithms (PageRank, Louvain), HNSW vector search, full-text search, ATTACH to PostgreSQL/DuckDB/Delta Lake, LLM embeddings with CREATE_EMBEDDING, or bulk data import/export with COPY FROM/TO. Use even if the user just says 'ladybug graph db' or pastes a .lbug file path.

  • Pipes a download into a shell
  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    In-memory mode: use ":memory:" as the database path for ephemeral databases

    line 16
  2. Very specific:

    UNWIND: instead of FOREACH

    line 90
  3. Distinctive:

    No manual index creation — primary key index is automatic.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

LadybugDB

LadybugDB is an embedded, in-process property graph database — no server process required. It uses the openCypher query language with a required, predefined schema (unlike Neo4j), columnar disk-based storage, vectorized query execution, and serializable ACID transactions.

Quick orientation

  • Schema-first: you must create node/rel tables before inserting data
  • One primary key per node table — automatically indexed, unique, non-null
  • Walk semantics: repeated edges allowed in MATCH (unlike Neo4j's trail semantics)
  • One write transaction at a time; multiple concurrent reads are fine
  • In-memory mode: use ":memory:" as the database path for ephemeral databases

Installation

# CLI
curl -s https://install.ladybugdb.com | bash   # Linux
brew install ladybug                             # macOS

# Python
pip install real_ladybug

# Node.js
npm install @ladybugdb/core

CLI basics

lbug mydb.lbug        # open/create on-disk DB
lbug                   # in-memory (ephemeral)
lbug mydb.lbug < schema.cypher   # batch mode

Key shell commands: :schema (show tables), :help, :quit, :mode [json|csv|markdown|...]

Reference files

Load only the sections you need:

FileContents
references/cypher-reference.mdDDL, DML, MATCH queries, transactions, macros, LadybugDB vs Neo4j differences
references/python.mdPython (real_ladybug) — connection, query, DataFrame, transactions
references/nodejs.mdNode.js (@ladybugdb/core) — connection, query, streaming, transactions
references/java.mdJava — Maven setup, connection, query, transactions
references/rust.mdRust — Cargo setup, connection, query, Value types
references/go.mdGo — module setup, connection, query, transactions
references/swift.mdSwift — SPM setup, connection, query, async/await
references/import.mdCOPY FROM, LOAD FROM, DataFrame import, cloud storage, performance tips
references/export.mdCOPY TO, DataFrame export (pandas/polars/arrow), DuckDB export
references/graph-algorithms.mdPageRank, Louvain, WCC, SCC, K-Core, shortest paths — PROJECT_GRAPH
references/vector-search.mdHNSW index, CREATE/QUERY/DROP_VECTOR_INDEX, RAG pattern
references/full-text-search.mdBM25, CREATE/QUERY/DROP_FTS_INDEX, stemmers
references/llm-embeddings.mdCREATE_EMBEDDING — OpenAI, Ollama, Google, Bedrock, Voyage AI
references/attach.mdATTACH/DETACH — PostgreSQL, DuckDB, SQLite, Delta Lake, Iceberg, Neo4j
references/cli.mdlbug shell flags, commands, output modes, batch/scripting mode
references/explorer.mdLadybug Explorer Docker GUI — launch, env vars, volume mount

Common task routing

TaskRead
Schema design, Cypher queries, differences from Neo4jcypher-reference.md
Python integrationpython.md
Node.js / TypeScript integrationnodejs.md
Java integrationjava.md
Rust integrationrust.md
Go integrationgo.md
Swift / iOS / macOS integrationswift.md
Bulk import — COPY FROM, LOAD FROM, DataFrames, cloud storageimport.md
Bulk export — COPY TO, DataFrame export, DuckDBexport.md
PageRank, Louvain, WCC, SCC, K-Core, shortest pathsgraph-algorithms.md
HNSW vector similarity search, RAGvector-search.md
Full-text search (BM25)full-text-search.md
LLM embeddings (OpenAI, Ollama, Bedrock…)llm-embeddings.md
ATTACH to PostgreSQL, DuckDB, Delta Lake, Neo4jattach.md
CLI shell, batch scriptscli.md
Ladybug Explorer browser GUI (Docker)explorer.md

Key gotchas

  1. SET n.prop = NULL to remove a property (not REMOVE)
  2. label(n) not labels(n); id(n) not elementId(n)
  3. UNWIND instead of FOREACH
  4. List functions use list_ prefix: list_concat, list_sort, etc.
  5. Variable-length paths must have an upper bound (default 30): [:Follows*1..5]
  6. LOAD FROM (not LOAD CSV FROM) — supports CSV, Parquet, JSON, DataFrames
  7. No manual index creation — primary key index is automatic; use FTS/vector extensions for search

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.