maludb-plugin
A Claude Code plugin marketplace for building MaluDB
memory applications. MaluDB is a memory / knowledge-graph system implemented as a set of
PostgreSQL extensions (maludb_core).
This repo is both the marketplace catalog (.claude-plugin/marketplace.json) and the host
of the maludb plugin (in maludb/).
The plugin: maludb
Three skills, one per way of building on MaluDB:
| Skill | For | Covers |
|---|
maludb-api-client | desktop / web app developers | Integrating the MaluDB REST/JSON API — auth, endpoints, error codes, recipes (PHP, TS/JS, Python). |
maludb-sql-client | middleware developers | Querying the maludb_core PostgreSQL extension directly — views, facade functions, search_path, RLS, the vector-memory pipeline. |
maludb-api-server | backend developers | Scaffolding the PHP API server — one-file-per-endpoint, shared helpers, routing, SQL tracing. |
Install (in Claude Code)
/plugin marketplace add maludb/maludb-plugin
/plugin install maludb@maludb
maludb@maludb means plugin maludb from marketplace maludb (the marketplace name
is the name field in .claude-plugin/marketplace.json). After installing, the three
skills trigger automatically based on what you're working on; manage them with /plugin.
Updating
Bump the version in both maludb/.claude-plugin/plugin.json and
.claude-plugin/marketplace.json, commit, and push. Users then run:
/plugin marketplace update maludb
and update the plugin from the /plugin menu.
Layout
.
├── .claude-plugin/
│ └── marketplace.json # marketplace catalog (source: ./maludb)
└── maludb/ # the plugin
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── maludb-api-client/
├── maludb-sql-client/
└── maludb-api-server/
API reference (REST endpoints)
The full REST endpoint catalog, inlined here for convenience. The canonical copy lives in maludb/skills/maludb-api-client/references/endpoints.md — keep the two in sync when the API changes.
Every /v1 endpoint, grouped by area. For each: HTTP methods, request body / query
params, and the response shape (always JSON, always wrapped under a named key). All
endpoints require Authorization: Bearer malu_... unless noted.
Conventions used below:
{id} / {sid} / {vid} are numeric path segments.
field? = optional; field(req) = required.
- Response shown is the success body; errors are always
{error:{code,message}}.
- "Returns 201" means a created resource; otherwise 200.
Contents
1. Subjects
A subject is a node in the graph (a person, concept, project, software, …). The API field
label maps to the DB canonical_name; type to subject_type.
GET /v1/subjects
Query params: q? (search over name + description), limit? (default 50, max 200),
with?=attributes.
Returns { subjects: [ { id, label, type, description, classifier_md, linked_verbs, related_subjects, attributes? } ] }. linked_verbs / related_subjects are counts,
not arrays — fetch the detail endpoint for the full collections.
POST /v1/subjects
Body: { label(req), type?, description?, classifier_md? }.
Returns 201 { subject: { id, label, type, description, classifier_md, linked_verbs } }.
GET /v1/subjects/{id}
Returns { subject: { id, label, type, description, classifier_md, verbs[], related_subjects[], documents[] } }. Here the full collections are embedded:
verbs[] = { id, canonical_name, type }
related_subjects[] = { relationship_id, id, label, relationship_type, relationship_label, direction: "outgoing"|"incoming", valid_from, valid_to }
documents[] = { id, title, rel } (documents wired to this subject via the graph)
404 not_found if absent.
PATCH /v1/subjects/{id}
Body (any subset): { label?, type?, description?, classifier_md? }. Sending null
clears a nullable field. Empty label → 422. Returns the full detail object.
DELETE /v1/subjects/{id}
Returns { deleted: true, id }. 404 if absent. (Does not delete the subject's typed
attributes — see the no-cascade caveat in §5.)
GET /v1/subjects/{id}/verbs
Returns { ... } listing the verbs linked to this subject (same data as the detail
embedding). Backward-compat sub-resource.