tree-graph-rag
v1.0.0Guide for designing and implementing a PostgreSQL database that fuses PageIndex-style document trees with LightRAG-style entity-relationship anchors. Use thi...
⭐ 0· 75·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the included artifacts: schema.sql, ingestion/retrieval Python scripts, query docs, and a smoke test. All requested resources and operations (DB inserts, selects, LLM-extraction hook) are coherent with building a hybrid tree/graph RAG persistence layer.
Instruction Scope
SKILL.md and scripts focus on schema, ingestion, anchoring and retrieval as promised. One operational note: extract_and_insert_graph fetches all node_contents for a workspace in a single query and then calls the provided llm_extract_func for each row — this is expected functionality but can consume large amounts of data in production and should be batched/rate-limited at runtime. The skill does not read env vars or files outside its scope.
Install Mechanism
Instruction-only install (no install spec) and included code files only operate on a DB pool object and do not download or execute external artifacts. No remote code/URL downloads are present.
Credentials
No environment variables, credentials, or config paths are requested by the skill. The only external dependency is a db_pool and an llm_extract_func provided by the integrator, which is proportionate to the skill's purpose.
Persistence & Privilege
Skill is not always-enabled and does not attempt to modify agent-wide configuration. It performs database writes/reads as expected for an ingestion/retrieval layer; privilege implications depend on the DB credentials you supply at integration time (not embedded in the skill).
Assessment
This skill appears coherent and implements the promised tree↔graph persistence and retrieval patterns. Before installing or running in production: 1) Review and control the db_pool credentials you supply (use a least-privilege DB role that can INSERT/SELECT on the pageindex_* tables but not superuser). 2) Review or provide a trusted llm_extract_func — the skill calls that function for each content row (do not pass an extract function that exfiltrates data). 3) For large datasets, implement batching/pagination and rate-limiting when calling the extractor and when writing to the DB. 4) Test on non-production data first and verify workspace filtering is enforced in your deployment. If you want, provide details of the DB driver and deployment topology and I can point out additional hardening steps.Like a lobster shell, security has layers — review code before you run it.
latestvk97b8mwdejg84js0dwvzq2bk6s83kpdc
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
