|
1 | 1 | # Logseq DB Plugin API Skill |
2 | 2 |
|
3 | | -**Version**: 2.1.0 |
4 | | -**Updated**: 2025-12-18 |
| 3 | +**Version**: 2.2.0 |
| 4 | +**Updated**: 2026-04-16 |
5 | 5 |
|
6 | | -A comprehensive Claude Code skill for developing Logseq plugins specifically for **DB (database) graphs**, now with modular documentation and production-tested patterns. |
| 6 | +A comprehensive Claude Code skill for developing Logseq plugins specifically for **DB (database) graphs**, now with authoritative upstream docs mirrored from logseq/logseq, modular documentation, and production-tested patterns. |
7 | 7 |
|
8 | 8 | ## Overview |
9 | 9 |
|
10 | 10 | This skill provides essential knowledge for building Logseq plugins that work with the new DB graph architecture. It covers the complete plugin API verified against LSPlugin.ts TypeScript definitions, including tag/class management (with **CORRECTED method names**), property handling (with **complete upsertProperty signature**), icon management, tag inheritance, comprehensive type definitions, and proper Vite bundling setup. |
11 | 11 |
|
12 | 12 | **Target Audience**: Developers building plugins for Logseq DB graphs using Claude Code. |
13 | 13 |
|
| 14 | +## What's New in v2.2.0 |
| 15 | + |
| 16 | +### Authoritative Upstream Docs + Related Skills 📚 |
| 17 | + |
| 18 | +This release layers the Logseq core team's own agent-oriented documentation on top of the existing production patterns, and points to two related skills from Logseq core dev RCmerci. |
| 19 | + |
| 20 | +**New Layer 1 (authoritative upstream)**: Seven files mirrored verbatim from [logseq/logseq `libs/development-notes/`](https://github.com/logseq/logseq/tree/master/libs/development-notes), refreshed via `scripts/sync-logseq-docs.sh`: |
| 21 | + |
| 22 | +- `AGENTS.md`, `starter_guide.md`, `db_properties_skill.md`, `db_properties_guide.md`, `db_query_guide.md`, `db_tag_property_idents_notes.md`, `experiments_api_guide.md` |
| 23 | + |
| 24 | +These live in `skill/references/logseq-official/` and are licensed **AGPL-3.0** (see License boundary below). |
| 25 | + |
| 26 | +**New Layer 3 (related skills)**: cross-references to [RCmerci's skills](https://github.com/RCmerci/skills): |
| 27 | + |
| 28 | +- `logseq-schema` — authoritative Datascript schema for Datalog queries |
| 29 | +- `logseq-electron-debug` — Chrome DevTools against running Logseq |
| 30 | + |
| 31 | +Install separately from RCmerci's repo; SKILL.md points at them for discoverability. |
| 32 | + |
| 33 | +**SKILL.md reorganized** into 3 layers with explicit precedence: Layer 1 wins on API facts, Layer 2 (existing production patterns) wins on real-world pitfalls. |
| 34 | + |
| 35 | +**No existing content removed.** All v2.1.0 references preserved and back-linked. |
| 36 | + |
| 37 | +## Mirrored Upstream Docs |
| 38 | + |
| 39 | +### What's mirrored |
| 40 | + |
| 41 | +Files under `skill/references/logseq-official/` are copied verbatim from [logseq/logseq](https://github.com/logseq/logseq) master branch via a shallow + sparse git clone at `upstream/logseq-repo/` (gitignored). |
| 42 | + |
| 43 | +Refresh command (from repo root): |
| 44 | + |
| 45 | +```bash |
| 46 | +bash scripts/sync-logseq-docs.sh |
| 47 | +``` |
| 48 | + |
| 49 | +The script is idempotent — if upstream HEAD matches the recorded `.last-synced-sha`, it exits without rewriting. Each mirrored file carries a 3-line HTML-comment footer recording the upstream commit SHA and fetch timestamp. |
| 50 | + |
| 51 | +### License boundary |
| 52 | + |
| 53 | +- The root `LICENSE` file is **MIT** and covers the skill's own original content (SKILL.md, most of `skill/references/`, scripts, docs). |
| 54 | +- The subfolder `skill/references/logseq-official/` is **AGPL-3.0**. Its own `LICENSE` file (full AGPL-3.0 text) and `README.md` (attribution + source URLs) make the boundary explicit. |
| 55 | +- **If you redistribute modifications** to files in `skill/references/logseq-official/`, the AGPL-3.0 copyleft applies. The MIT license at repo root does **not** extend into that subfolder. |
| 56 | + |
| 57 | +See [`skill/references/logseq-official/README.md`](./skill/references/logseq-official/README.md) for full attribution and [`skill/references/logseq-official/LICENSE`](./skill/references/logseq-official/LICENSE) for the AGPL-3.0 text. |
| 58 | + |
14 | 59 | ## What's New in v2.1.0 |
15 | 60 |
|
16 | 61 | ### Advanced Query Patterns 🔍 |
@@ -522,7 +567,12 @@ Contributions are welcome! If you discover new API features, better patterns, or |
522 | 567 |
|
523 | 568 | ## License |
524 | 569 |
|
525 | | -MIT License - feel free to use, modify, and distribute. |
| 570 | +**Mixed-license repository**: |
| 571 | + |
| 572 | +- **MIT License** covers the skill's original content (root `LICENSE`): `SKILL.md`, most of `skill/references/`, `scripts/`, root documentation. |
| 573 | +- **AGPL-3.0** covers mirrored upstream content under `skill/references/logseq-official/` (see `skill/references/logseq-official/LICENSE`). These files are reproduced verbatim from [logseq/logseq](https://github.com/logseq/logseq) with attribution footers. |
| 574 | + |
| 575 | +Redistributing modifications to files under `skill/references/logseq-official/` requires AGPL-3.0 compliance. All other content is MIT — feel free to use, modify, and distribute. |
526 | 576 |
|
527 | 577 | ## Support |
528 | 578 |
|
|
0 commit comments