← 返回 Skills 市场
trenza1ore

ladybug-opencypher

作者 Hugo · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
142
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ladybug-opencypher
功能描述
Runs openCypher against Ladybug DB with schema-first DDL, Python sync/async execution, CALL procedures, full-text search (CREATE_FTS_INDEX / QUERY_FTS_INDEX)...
使用说明 (SKILL.md)

Ladybug openCypher

Ladybug follows openCypher where possible. Schema, DDL, some clauses, and MATCH semantics differ from Neo4j. Overview: Differences between Ladybug and Neo4j. DDL: Create table.

Ladybug is embedded (in-process) — no server URI; open a file path or :memory: via real_ladybug.

Core principles

  1. Schema first — node and relationship tables must exist before insert. One label per node/rel table; every node table needs a primary key.
  2. Walk vs trail — patterns use walk semantics (edges may repeat). Use is_trail() / is_acyclic() when you need Neo4j-like trail checks.
  3. Variable-length paths — require an upper bound for termination; if omitted, default upper bound is 30.
  4. Catalog — prefer CALL procedure(...) instead of Neo4j SHOW … for many introspection tasks.

Execute from Python (quick start)

Import real_ladybug (Ladybug Python bindings). Full docs: Python API, generated reference.

import real_ladybug as lb

db = lb.Database("path/to/db.lbug")
conn = lb.Connection(db)
rows = conn.execute("""
    MATCH (a:User)-[f:Follows]->(b:User)
    RETURN a.name, b.name, f.since;
""")
for row in rows:
    print(row)
  • conn.execute / await conn.execute per statement unless the API documents batching.
  • Multiple statements (semicolon-separated) return a list of results; a single statement returns one result.
  • COPY / LOAD FROM paths resolve relative to the process CWD unless absolute.

For async, result helpers, UDFs, and Parquet/DataFrame import — see references/api-reference.md.

Schema snippet (DDL)

CREATE NODE TABLE User(name STRING PRIMARY KEY, age INT64);
CREATE NODE TABLE City(name STRING PRIMARY KEY, population INT64);
CREATE REL TABLE Follows(FROM User TO User, since INT64);
CREATE REL TABLE LivesIn(FROM User TO City, MANY_ONE);

Optional IF NOT EXISTS. Multiplicity: MANY_ONE, ONE_MANY, MANY_MANY, ONE_ONE. CREATE NODE TABLE AS / CREATE REL TABLE AS — infer schema from LOAD FROM or MATCH … RETURN.

Import

  • COPY NodeTable FROM "file.csv" (Parquet and other formats per Import data).
  • Neo4j’s LOAD CSV FROMLOAD FROM in Ladybug.
  • In Python: LOAD FROM df / COPY Table FROM df for Pandas/Polars/Arrow without an intermediate file.

Full-text search (FTS)

Load the FTS extension first. Index STRING columns on node tables only; query with CALL QUERY_FTS_INDEX; list with CALL SHOW_INDEXES() RETURN *. Full procedure signatures: references/api-reference.md.

When results differ from Neo4j

Use the checklist and clause table in references/workflow-patterns.md: walk vs trail, variable-length defaults, unsupported clauses (FOREACH, REMOVE, FINISH, SET +=, …), and CALL vs SHOW.

Utility scripts

Bundled helpers (optional — require real_ladybug on PYTHONPATH):

  • scripts/run_cypher.py — run a Cypher string or .cypher file against a .lbug path.
  • scripts/check_env.py — verify import real_ladybug and print basic info.

Additional resources

Doc links

安全使用建议
This skill appears to be a local helper for running openCypher on Ladybug .lbug files and is coherent with its description. Before installing or running: - Ensure you trust the real_ladybug Python package you will import (inspect or install from the vendor you expect). The helper scripts require that package but do not bundle it. - Only run queries and open database files you trust — the tool reads database and .cypher files you provide. Do not point it at sensitive or untrusted DB files. - If you use the FTS features that accept a stopwords path or httpfs remote file, be aware that those options can make the database fetch external files; only use trusted remote sources. - Optionally run scripts/check_env.py locally to confirm the real_ladybug module is present; it prints the module path (this reveals local install location but is intended for diagnostics). No red flags were found in the skill's files themselves, and no extra credentials or install steps appear required.
功能分析
Type: OpenClaw Skill Name: ladybug-opencypher Version: 1.0.0 The skill bundle provides a standard interface and documentation for interacting with 'Ladybug', an embedded graph database. The included Python scripts (scripts/check_env.py and scripts/run_cypher.py) are simple utility wrappers for the 'real_ladybug' library, and the documentation (SKILL.md and references/) focuses exclusively on legitimate database operations, schema management, and syntax differences from Neo4j.
能力评估
Purpose & Capability
Name/description (openCypher on Ladybug) align with the included files and requirements: SKILL.md documents the Python client, and the two helper scripts import real_ladybug and operate on user-supplied .lbug/.cypher files. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Runtime instructions are narrowly scoped to running Cypher via the local real_ladybug bindings, schema/DDL guidance, and FTS setup. The scripts only read the user-provided DB path and optional query file; they do not access or transmit other system files or contact external endpoints. One note: the docs mention optional stopwords files and an httpfs option in FTS doc links — that is a feature of the underlying DB extension (not this skill) and could cause remote fetches if the user explicitly configures it.
Install Mechanism
There is no install spec (instruction-only with bundled helper scripts). Nothing is downloaded or written by an installer, so install-surface risk is low. The bundled scripts are small, readable, and do not execute arbitrary downloads.
Credentials
The skill requests no environment variables or secrets. It assumes Python is available and that the user will provide real_ladybug on PYTHONPATH (documented). This requirement is proportional to the stated purpose; no unrelated credentials or sensitive environment access is requested.
Persistence & Privilege
always is false and the skill does not modify agent/system configuration or other skills. It does not request persistent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ladybug-opencypher
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ladybug-opencypher 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of ladybug-opencypher. - Run openCypher queries on Ladybug DB with schema-first DDL support. - Supports Python (sync/async) execution, CALL procedures, and full-text search extensions (FTS). - Highlights key differences from Neo4j Cypher, including schema, DDL, and pattern semantics. - Includes utility scripts for query execution and environment checks. - Documentation links provided for Cypher features, DDL, import, FTS, and Neo4j migration notes.
元数据
Slug ladybug-opencypher
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ladybug-opencypher 是什么?

Runs openCypher against Ladybug DB with schema-first DDL, Python sync/async execution, CALL procedures, full-text search (CREATE_FTS_INDEX / QUERY_FTS_INDEX)... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 142 次。

如何安装 ladybug-opencypher?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ladybug-opencypher」即可一键安装,无需额外配置。

ladybug-opencypher 是免费的吗?

是的,ladybug-opencypher 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ladybug-opencypher 支持哪些平台?

ladybug-opencypher 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ladybug-opencypher?

由 Hugo(@trenza1ore)开发并维护,当前版本 v1.0.0。

💬 留言讨论