logseq-entity

Metaskill for Logseq entity work in the active graph: open [[Logseq/Entity]] and [[Logseq/Entity/<Type>]] pages, dedupe, create or update instances per those type rules, infer candidates from journals, help initialize entity pages when asked, and record graph edits in today's journal (garddiff / Filed / Updated). All type-specific rules live in the graph; this skill does not list entity types or repo companion skills by name. Other skills in a repo may wrap narrow workflows—discover them from the graph, type pages, or the repo's skill layout. Use for: entity exists?, similar entities?, new entity page?, add entities from today's journal?, define or refresh entity types?

5 stars

Best use case

logseq-entity is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Metaskill for Logseq entity work in the active graph: open [[Logseq/Entity]] and [[Logseq/Entity/<Type>]] pages, dedupe, create or update instances per those type rules, infer candidates from journals, help initialize entity pages when asked, and record graph edits in today's journal (garddiff / Filed / Updated). All type-specific rules live in the graph; this skill does not list entity types or repo companion skills by name. Other skills in a repo may wrap narrow workflows—discover them from the graph, type pages, or the repo's skill layout. Use for: entity exists?, similar entities?, new entity page?, add entities from today's journal?, define or refresh entity types?

Teams using logseq-entity should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/logseq-entity/SKILL.md --create-dirs "https://raw.githubusercontent.com/codekiln/logseq-encode-garden/main/.claude/skills/logseq-entity/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/logseq-entity/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How logseq-entity Compares

Feature / Agentlogseq-entityStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Metaskill for Logseq entity work in the active graph: open [[Logseq/Entity]] and [[Logseq/Entity/<Type>]] pages, dedupe, create or update instances per those type rules, infer candidates from journals, help initialize entity pages when asked, and record graph edits in today's journal (garddiff / Filed / Updated). All type-specific rules live in the graph; this skill does not list entity types or repo companion skills by name. Other skills in a repo may wrap narrow workflows—discover them from the graph, type pages, or the repo's skill layout. Use for: entity exists?, similar entities?, new entity page?, add entities from today's journal?, define or refresh entity types?

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Logseq Entity

Use this skill when the user wants help managing Logseq entities in this garden.

This skill is intentionally general-purpose:

- Deduplicate before creating anything.
- Read garden-specific rules from garden-owned configuration instead of hardcoding them here.
- Work across multiple gardens with different entity types and naming affinities.
- Infer candidates from source material using the active garden config.
- Report what was inferred, what already existed, what was created, and what needs human judgment.

## Progressive Disclosure

This skill is designed to work well in both Claude-style and Rulesync environments:

- Like Claude Code skills, it is directory-based and centers on `SKILL.md`.
- Like Claude Code skills, it uses progressive disclosure: metadata first, then this file, then references only when needed.
- Unlike Claude Code alone, Rulesync treats this as a source artifact that can be generated or simulated across multiple tools, so keep instructions tool-agnostic unless a tool-specific behavior is necessary.

## Configuration First

Before doing entity work, read [references/configuration-contract.md](./references/configuration-contract.md) and [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md), then load:

- `[[Logseq/Entity]]`
- `[[Logseq/Entity/<Type>]]`
- `[[Logseq/Frontmatter]]`
- `[[Logseq/Pref]]` when present (optional encode-wide naming prefs under **`[[Logseq/Pref/Page/Name]]`** and siblings)

Use this fallback when the Logseq entity pages do not exist yet or are incomplete:

- `.rulesync/config/logseq-entity.md`

Treat those garden-owned sources as the source of truth for:

- which entity types this garden models (from the registry, not from this skill)
- naming and namespace rules
- dedup heuristics
- frontmatter and page-shape expectations
- creation blockers
- reporting expectations

If the Logseq entity pages and fallback config are both missing, inspect the garden for conventions, say that no explicit entity configuration was found, and ask whether to proceed with inferred conventions or create the entity-type pages first.

## Graph edits and today’s journal

When **any graph pages** under `pages/` are **created or materially edited** during entity work—including **imports** that only add `logseq-entity::`, **prerequisite pages required by the active type page or registry**, or **`Logseq/Entity/<Type>`** edits—you are **not done** until **`journals/YYYY_MM_DD.md`** records the change set (**`[[Filed]]`** vs **`[[Updated]]`**, mutual exclusivity, link-first lists). Load **`[[Logseq/Journal]]`** / **`[[Logseq/Journal/Section/Garddiff]]`** when they exist; otherwise follow rule **`logseq-core`** (journal updates).

Procedure: [references/entity-session-journal.md](./references/entity-session-journal.md).

## Polymorphism and other skills in the repo

- **Same skill, different graphs:** Identical `logseq-entity` text may be deployed in multiple gardens; effective behavior follows whatever `[[Logseq/Entity]]` and `[[Logseq/Entity/<Type>]]` pages exist **in the workspace graph**. Do not assume another garden’s entity types.
- **Entity definition pages are authoritative:** Everything on `[[Logseq/Entity/<Type>]]` is binding—not only naming and frontmatter. If an entity definition page defines imports, index updates, checklists, or search patterns, follow it end-to-end.
- **Narrow workflows:** A garden or repo may ship additional skills for routing (for example topic-specific filing). **Do not assume** their names or locations—discover from the graph, from entity definition bullets, or by listing the repo’s skill directories. Those skills should route to Logseq entity definition pages; **do not** duplicate long entity definitions under this skill’s `./references/`.

## Graph Page Hygiene

When creating or editing `[[Logseq/Entity]]`, `[[Logseq/Entity/<Type>]]`, `[[Logseq/Frontmatter]]`, or other graph entity definition pages:

- Keep graph pages self-contained and graph-native. Do **not** add Rulesync, skill, slash-command, generated-file, repo-path, or agent-workflow references to Logseq pages.
- Do **not** add agent-only reminders such as journal bookkeeping or source-block handling to entity type pages. Those operational duties live in Rulesync rules/skills and journal guidance.
- Keep actual Logseq links clickable. Do **not** wrap `[[Page]]` links in backticks; use backticks only for non-link path shapes, filenames, globs, or property syntax.
- Use declarative garden voice instead of second-person instructions.
- Put shared frontmatter conventions on `[[Logseq/Frontmatter]]`; type pages should mention only entity-specific frontmatter plus a short reference to that page.
- Entity type page names follow **`[[Logseq/Entity]]`**: multi-word types prefer nested Title Case segments (for example **`Software/Project`**); deferred legacy paths stay listed on the registry until migrated.

## Quick Start

### Does this entity already exist?

1. Read [references/configuration-contract.md](./references/configuration-contract.md).
2. Read [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md).
3. Load `[[Logseq/Entity]]` and `[[Logseq/Entity/<Type>]]` when they exist.
4. Fall back to `.rulesync/config/logseq-entity.md` only if needed.
5. Read [references/entity-search-and-dedup.md](./references/entity-search-and-dedup.md).
6. Search according to garden configuration.
7. Report one of:
   - existing canonical entity
   - similar entities that need human judgment
   - no matching entity found
   - blocked because config or prerequisites are missing

### Search for similar entities

1. Read [references/configuration-contract.md](./references/configuration-contract.md).
2. Read [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md).
3. Load `[[Logseq/Entity]]` and `[[Logseq/Entity/<Type>]]` when they exist.
4. Fall back to `.rulesync/config/logseq-entity.md` only if needed.
5. Read [references/entity-search-and-dedup.md](./references/entity-search-and-dedup.md).
6. Return likely candidates ordered from strongest to weakest match.
7. Call out why each candidate might be the same entity or a different one.

### Create a new entity page

1. Read [references/configuration-contract.md](./references/configuration-contract.md).
2. Read [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md).
3. Load `[[Logseq/Entity]]` and `[[Logseq/Entity/<Type>]]` when they exist.
4. Fall back to `.rulesync/config/logseq-entity.md` only if needed.
5. Confirm it does not already exist using [references/entity-search-and-dedup.md](./references/entity-search-and-dedup.md).
6. Create the page using the configured page shape, frontmatter, naming rules, and template guidance.
7. If configuration-defined prerequisites are missing, stop and present recommended choices to the user.
8. Complete **Graph edits and today’s journal** (section above): update `journals/YYYY_MM_DD.md` for every new or changed graph page from this workflow.

### Initialize entity types for this garden

When the user says something like `initialize entity types for this garden`:

1. Read [references/configuration-contract.md](./references/configuration-contract.md).
2. Read [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md).
3. Read [references/entity-type-initialization.md](./references/entity-type-initialization.md).
4. Research:
   - inspect existing `[[Logseq/Entity]]` pages if they already exist
   - inspect `.rulesync/config/logseq-entity.md` as shared fallback text when present
   - inspect representative garden pages and journals to infer repeated entity kinds, naming conventions, and page-shape expectations
5. Plan:
   - propose a small initial set of entity types the garden appears to cover
   - propose the contents of `[[Logseq/Entity]]` and each `[[Logseq/Entity/<Type>]]` page
   - call out whether any dedicated `[[Logseq/Template/Entity/<Type>/Page]]` pages are actually needed
6. Implement:
   - create or update `[[Logseq/Entity]]` and the approved `[[Logseq/Entity/<Type>]]` pages
   - keep registry and instance-template guidance together on the type page by default
   - keep `.rulesync/config/logseq-entity.md` limited to shared fallback material (resolution order, reporting)—**not** a duplicate catalog of per-type rules
   - after any new or changed graph pages: complete **Graph edits and today’s journal** (section above)
7. Report:
   - what the skill inferred during research
   - which types were proposed
   - which pages were created or updated
   - what was intentionally deferred for human judgment

Prefer an explicit RPI flow:

- `research`: inspect the garden and gather evidence
- `plan`: propose the initial entity-type model and pause when ambiguity is material
- `implement`: write the `Logseq/Entity` pages once the direction is clear

### Create or update an entity type page

When the user wants to define a new entity type for the garden:

1. Create or update `[[Logseq/Entity/<Type>]]` as the canonical page for that type.
2. Put both type definition and instance-template guidance on that page by default.
3. Only create a dedicated `[[Logseq/Template/Entity/<Type>/Page]]` page when the template needs to be instantiated directly through Logseq or grows too large for the type page.
4. If the garden is still being bootstrapped, keep `.rulesync/config/logseq-entity.md` as a short shared fallback (see that file’s headings)—do not grow it back into per-type duplication.
5. Complete **Graph edits and today’s journal** (section above) for every graph page touched.

### Add entities from today's journal page

When the user says something like `add entities from today's journal page`:

1. Read today's journal page.
2. Read [references/configuration-contract.md](./references/configuration-contract.md).
3. Read [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md).
4. Load `[[Logseq/Entity]]` and the relevant `[[Logseq/Entity/<Type>]]` pages when they exist.
5. Fall back to `.rulesync/config/logseq-entity.md` only if needed.
6. Read [references/entity-inference-from-journal.md](./references/entity-inference-from-journal.md).
7. Extract in-scope entity candidates from direct links and strong indirect context.
8. Deduplicate each candidate using [references/entity-search-and-dedup.md](./references/entity-search-and-dedup.md).
9. For each missing entity, create a page using the active garden configuration.
10. Complete **Graph edits and today’s journal** (section above) for all new or changed graph pages from step 9 (and any prerequisite pages).
11. Summarize:
   - entities found
   - entities already present
   - entities created
   - aggressive inferences that may need correction
   - blocked cases that require a human choice
   - journal: which `[[Filed]]` / `[[Updated]]` links were added (or that none applied)

## Reference Guide

- **Another skill invoked for the same task:** follow that skill’s scope and steps; this skill still supplies **shared** entity behavior (configuration order, dedup references, **garddiff** / **Filed** / **Updated** when `pages/` change) unless the other skill explicitly documents a different journal contract for the same edit.
- Polymorphism and narrow repo skills: see **Polymorphism and other skills in the repo** above and [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md)
- Configuration contract: [references/configuration-contract.md](./references/configuration-contract.md)
- Logseq entity-type pages: [references/logseq-entity-type-pages.md](./references/logseq-entity-type-pages.md)
- Entity-type initialization: [references/entity-type-initialization.md](./references/entity-type-initialization.md)
- Search and dedup rules: [references/entity-search-and-dedup.md](./references/entity-search-and-dedup.md)
- Journal extraction and aggressive inference: [references/entity-inference-from-journal.md](./references/entity-inference-from-journal.md)
- After graph edits (garddiff / Filed / Updated): [references/entity-session-journal.md](./references/entity-session-journal.md)
- `date-created::` (entity creation/publication date, not import date): [references/date-created-frontmatter.md](./references/date-created-frontmatter.md)
- External entity pages (canonical H1 link, no duplicate URL/macros): [references/external-entity-page.md](./references/external-entity-page.md)

Related Skills

logseq-youtube-notes

5
from codekiln/logseq-encode-garden

Format a YouTube video transcript inside a Logseq page into clean, navigable, timestamped Logseq-Flavored Markdown. Use when the user pastes a raw YouTube transcript, asks to organize/clean up video notes, add clickable {{youtube-timestamp}} headings, or structure a {{video ...}} block's notes. Do not use for non-video transcripts or for general LFM formatting (that is the logseq-lfm skill / logseq-core rule).

logseq-table-formatter

5
from codekiln/logseq-encode-garden

Format markdown tables inside Logseq Flavored Markdown (LFM) pages and journals: bullet-wrapped first row, continuation rows with aligned pipe columns, padded cells for readable plain text, and [[wikilinks]] for graph commands or pages when they exist. Use when adding or fixing tables in pages/*.md or journals/*.md, when the user asks for column alignment, or after editing comparison tables. Do not use to convert wide tables to bullets (skill logseq-convert-md-to-lfm) or for non-Logseq markdown.

logseq-slides

5
from codekiln/logseq-encode-garden

Author or fix Logseq slideshow pages where top-level bullets are section titles (H2) and nested bullets are individual slides with bullet points and a 16:9 image. Use when the user asks to build a slide deck/presentation in Logseq, add slides, or fix slide structure/image sizing. Do not use for ordinary page bullets or non-slide content.

logseq-question

5
from codekiln/logseq-encode-garden

Log a research question in the Logseq garden under Topic/Q/..., deduplicate against existing ___Q___ pages, add today's journal link, and research an answer (with AI attribution). Use when the user invokes /logseq-question or asks to file, record, or capture a scoped question page. Do not use for non-Q pages, general notes, or entity types other than question—use skill logseq-entity and the relevant [[Logseq/Entity/<Type>]] page instead.

logseq-pref

5
from codekiln/logseq-encode-garden

Load [[Logseq/Pref]] and linked pages for encode-wide garden preferences (page naming, namespaces, editorial defaults) before creating pages or entity types. Use when aligning new titles with [[Logseq/Pref/Page/Name]], refreshing prefs in-graph, or routing alongside logseq-entity for naming—not for per-entity definitions (those stay on [[Logseq/Entity/<Type>]]).

logseq-link-hygiene

5
from codekiln/logseq-encode-garden

Check, resolve, and normalize Logseq wikilinks before or after editing graph pages. Use when adding links, importing notes, creating pages, reviewing unresolved references, preventing accidental stub pages, or replacing newly invented wikilinks with canonical existing pages or aliases. Applies to all Logseq graph work, not only entity pages.

logseq-lfm

5
from codekiln/logseq-encode-garden

Look up Logseq-Flavored Markdown details beyond the always-on core: footnote syntax, nested fenced code blocks, bold-vs-backtick rendering pitfalls, the singular/plural naming rationale and aliases, the file-name-vs-link reference table, and the logical-vs-on-disk page distinction. Use when formatting footnotes, debugging why a ref/inline-code renders wrong, deciding a page name, or checking whether a page exists before creating a file. Baseline LFM rules live in logseq-core.

logseq-forum-post

5
from codekiln/logseq-encode-garden

Import and structure a forum post (Cursor Forum, Reddit, Stack Overflow, or other forums) into a Logseq page with title link, metadata, Original Poster / Response / Related / My Notes sections, and site-specific user namespaces. Use when the user pastes a forum thread or asks to capture/import a forum discussion. For person hubs use the logseq-person command and logseq-entity skill. Do not use for blog posts/articles (logseq-import-blog) or non-forum content.

logseq-flashcard

5
from codekiln/logseq-encode-garden

Create or maintain Logseq SRS flashcards and first-class Card entity pages in this garden. Use when the user asks to add a flashcard, factor out cards, create or audit Card pages, audit or fix Keyshort flashcards, ensure {{cards}} queries pick up cards, design or debug simple or advanced query expressions for card decks, or convert shortcut notes into review cards. New generic card work uses [[Card]] and [[Logseq/Entity/Card]]; legacy Keyshort audits may still encounter #card / [[card]]. Do not use for non-Logseq decks (e.g. repeater-only formats).

logseq-flashcard-favorite

5
from codekiln/logseq-encode-garden

Generate and keep in sync the [[Logseq/Flashcard/Review/Favorite]] deck tree from the graph's :favorites (logseq/config.edn). Use when the user asks to build, refresh, or reconcile favorite-driven flashcard decks: an aggregate {{cards (or …)}} deck, a negated background {{cards (not (or …))}} deck, and one scoped {{cards [[Favorite]]}} subpage per favorite. Runs idempotently via the mise file task and preserves the review-history children Logseq appends to {{cards}} blocks. Do not use for ad-hoc card authoring (logseq-flashcard) or non-favorite decks.

logseq-convert-md-to-lfm

5
from codekiln/logseq-encode-garden

Convert standard Markdown (especially pasted from ChatGPT or similar) into Logseq-Flavored Markdown: nest code blocks inside bullets, fix heading-to-indent levels, drop horizontal rules, convert wide tables to label-value bullets, fix footnotes to URL-only, and replace generic link text. Use when the user pastes non-LFM markdown to import, asks to "convert to LFM", or to clean up an AI-generated dump. For table column alignment use logseq-table-formatter; for baseline LFM rules see logseq-core / logseq-lfm.

logseq-block-ids

5
from codekiln/logseq-encode-garden

Work safely with Logseq block IDs (`id::` properties) and `((uuid))` block references when moving, copying, or removing blocks across graph pages. Use when relocating a block that has an id::, creating a new ((ref)) to a block, deciding whether an id:: can be removed, or diagnosing refs that won't render. Baseline safety (never backtick a live ref/link; keep id:: with its block) is in logseq-core; this skill has the full move/copy/reindex procedures.