logseq-flashcard-favorite
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.
Best use case
logseq-flashcard-favorite is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using logseq-flashcard-favorite 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/logseq-flashcard-favorite/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How logseq-flashcard-favorite Compares
| Feature / Agent | logseq-flashcard-favorite | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
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 flashcard favorite decks
Reconciles the `Logseq/Flashcard/Review/Favorite` page tree with the graph's
`:favorites` (`logseq/config.edn`). The engine is the `nbb-logseq` ClojureScript
script `scripts/generate-favorite-decks.cljs`, run through a **mise file task**
(per `[[My/Pref/Dev/mise/Tasks]]` — file tasks + usageCLI). It does **not** touch
the hand-curated `[[Logseq/Flashcard/Review]]` page.
## Run it
~~~sh
# preview (default; writes nothing)
mise run logseq:flashcard-favorite
# apply
mise run logseq:flashcard-favorite --write
# apply and delete subpages for favorites removed from config
mise run logseq:flashcard-favorite --write --prune
~~~
If `nbb-logseq` is missing, the task self-declares it (`#MISE tools=…`); run
`mise install`, or `mise use -g npm:@logseq/nbb-logseq@latest` (see
`.rulesync/skills/logseq-link-hygiene/references/nbb-logseq.md`).
## What it produces
- Aggregate page `[[Logseq/Flashcard/Review/Favorite]]`: an **All Favorite
Flashcards** deck `{{cards (or …)}}`, a collapsed **Background / Non-Favorite**
deck `{{cards (not (or …))}}` (`query-properties:: [:block]`), and a **By
Favorite** link list.
- One subpage per favorite, full namespace nested (e.g. `Lightroom/Classic` →
`[[Logseq/Flashcard/Review/Favorite/Lightroom/Classic]]`), each with
`{{cards [[Favorite]]}}`.
- Self-referential / meta favorites under `Logseq/Flashcard/*` are skipped.
## Idempotency contract (why re-runs are safe)
The script **merges**, never overwrites. It locates managed decks by their
`favorite-deck::` anchor property and rewrites only the `{{cards …}}` expression
when the favorite *set* drifts (whitespace/order/case-insensitive) — so the
`Summary / Remembered / Forgotten` children Logseq appends after a review are
preserved. A second `--write` run on an unchanged graph changes no files.
Full merge/template/anchor details: `references/algorithm.md`.
## Always
- Rules: `logseq-core` (LFM + naming; protected `tags::`), `logseq-link-hygiene`.
- After `--write`, add today's journal entries: new pages under `[[Filed]]`,
refreshed pages under `[[Updated]]` (link-only; mutually exclusive).
- Stale subpages are reported by default and deleted only with `--prune` (this
preserves SRS review history unless deletion is explicitly requested).
- For `{{cards}}` / simple-query semantics, defer to skill `logseq-flashcard`
(`references/cards-macro-and-query-language.md`).
## Editing this skill
Edit only the `.rulesync/` source (this `SKILL.md`, `scripts/`, `references/`),
then run `npx rulesync generate` and commit source + generated outputs together.
The mise task at `mise-tasks/logseq/flashcard-favorite` points at the `.rulesync`
engine path; keep that path in sync if the script moves.Related Skills
logseq-youtube-notes
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
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
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
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
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
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
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
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
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-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?
logseq-convert-md-to-lfm
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
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.