Agent skill

Logseq CLI

by logseq in logseq/logseq

Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage…

AGPL-3.0Auto-check passedKnowledge Management

Install Logseq CLI

skills CLI
$ npx skills add logseq/logseq --skill logseq-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install logseq/logseq logseq-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/logseq/logseq.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/logseq-cli .claude/skills/logseq-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
logseq-cli
GitHub stars
45k
Token cost
~1.9k tokens
SKILL.md length
978 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage…

  • Works in 2 steps: logseq upsert task --graph "Lambda RTC"… → If tags are needed, use the returned…
  • A request involves running logseq commands
  • SKILL.md covers Overview, Quick start, Command groups (from logseq… and Global options, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Logseq CLI is an agent skill from logseq/logseq. Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage db-worker-node servers. Use when a request involves running logseq commands or interpreting CLI output.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management. The repository describes itself as: A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: https://logseq.io/p/NX4mcggEV. The licence is AGPL-3.0.

When your agent uses it

  • A request involves running logseq commands
  • Interpreting CLI output

Example prompts

  • “/logseq-cli”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. logseq upsert task --graph "Lambda RTC" --target-page "May 4th, 2026" --content 'Some content here' --status done --output json
  2. If tags are needed, use the returned block id: logseq upsert block --graph "Lambda RTC" --id --update-tags '["AI-GENERATED" "CLI"…

What it can do on your machine

Read from SKILL.md and the folder at commit 22a29b3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Logseq CLI loads about 1.9k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 978 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from logseq/logseq at commit 22a29b3, republished under its AGPL-3.0 licence (© logseq). 978 words, ~1,938 tokens.

Download SKILL.mdSave it as .claude/skills/logseq-cli/SKILL.md (or your agent's skills folder).
name
logseq-cli
description
Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage db-worker-node servers. Use when a request involves running `logseq` commands or interpreting CLI output.

Logseq CLI

Overview

Use logseq to inspect and edit graph entities, run Datascript queries, and control graph/server lifecycle.

Quick start

  • Run logseq --help to see top-level commands and global flags.
  • Run logseq <command> --help to see command-specific options.
  • Use --graph to target a specific graph.
  • Omit --output for human output. Use --output json or --output edn for structured command results. skill show prints raw Markdown in every output mode.

Command groups (from logseq --help)

  • Graph Inspect and Edit:
  • list node, list page, list tag, list property, list task, list asset
  • upsert block, upsert page, upsert tag, upsert property, upsert task, upsert asset
  • remove block, remove page, remove tag, remove property
  • query, query list, show, search block|page|property|tag
  • Graph Management:
  • graph list|create|switch|remove|validate|info|export|import|backup list|backup create|backup restore|backup remove
  • server list|cleanup|start|stop|restart
  • doctor
  • sync status|start|stop|upload|download|asset download|remote-graphs|ensure-keys|grant-access|config set|get|unset
  • Authentication: login|logout
  • Utilities: agent bridge, completion, debug, example, skill

Global options

  • --config Path to cli.edn (default <root-dir>/cli.edn)
  • --graph Graph name
  • --root-dir Path to CLI root dir (default ~/logseq)
  • --timeout-ms Request timeout in ms (default 10000)
  • --output Output format (human, json, edn)
  • --profile Enable stage timing profile output to stderr
  • --verbose Enable verbose debug logging to stderr

Command option policy

  • Check the full command path with logseq <command-path> --help before using its options; for example, logseq upsert block --help.

Task command preference

  • If a user request is task-related, prefer task-scoped commands first.
  • Use list task, upsert task, and other ... task commands before block/page-level alternatives.
  • Only fall back to upsert block/list page style workflows when task commands cannot satisfy the requested operation.
  • For any task state, create/update the task with upsert task --status <status> and keep status markers out of --content.
  • If the same task block also needs additional tags, use explicit tag association separately, for example upsert block --id <task-block-id> --update-tags '["AI-GENERATED" "CLI"]'.

Examples policy

  • Do not maintain long static command examples in this skill.
  • Use logseq example <command-path> for starting points, then check the command's help and input format before using an example.
  • Prefer exact selectors when possible (for example, logseq example upsert page).
  • Use prefix selectors when grouped examples are needed (for example, logseq example upsert).
  • Replace placeholder ids/uuids in retrieved examples with real entities from the target graph.
  • Use logseq list ..., logseq show ..., or logseq query ... first to discover valid ids/uuids.
  • For graph transfer flows, keep graph export --file and graph import --input paths consistent.
  • Quote --content values with single quotes in shell examples, for example --content 'Block content', so markdown backticks are not interpreted by the shell.

Structured block writes

  • When writing multi-item or hierarchical content, prefer a block tree instead of packing everything into one block.
  • Preserve the source structure as sibling and child blocks. Each logical bullet, row, or subsection should usually become its own block.
  • Reserve --content for true single-block writes or targeted updates to one existing block.
  • If the user asks to write notes, lists, outlines, imported data, or any content that already has structure, do not flatten it into one long --content string.
  • Create multiple sibling or child blocks with upsert block --blocks <markdown> or --blocks-file <path>. Use Markdown list indentation for the hierarchy; for example, --blocks $'- Parent\n - Child\n- Sibling' in Bash or Zsh.
  • Specify --target-page, --target-id, or --target-uuid when the destination matters. Create mode defaults to the current journal if no target is given. --pos sibling requires a block target.
  • --blocks and --blocks-file are create-mode inputs. With --id or --uuid, upsert block updates one existing block and rejects those options. Use --dry-run in create mode to inspect planned operations without writing.
Show full SKILL.md (397 more words)Show less

Tag association semantics

  • For block or page tag association, prefer explicit CLI tag options such as --update-tags and --remove-tags.
  • upsert block supports --update-tags in both create mode and update mode.
  • --update-tags expects an EDN vector.
  • Tag values may be tag title/name strings, db/id, UUID, or :db/ident values.
  • String tag values may include a leading #, but they should still be passed inside --update-tags.
  • If the user asks to tag a block or page, prefer explicit tag association.
  • Tags must already exist. If needed, create the tag first with upsert tag --name "<TagName>". Do not assume a tag's public property controls whether it can be associated; tag resolution does not check that property.

Anti-patterns and correct usage

Task status in block content
  • Anti-pattern: store task state in content, for example --content 'DONE Implemented and verified ...' with upsert block.
  • Correct usage: store task state as structured task data with upsert task --status <status> and keep content free of TODO, DOING, DONE, or other status markers.
  • Example:
    1. logseq upsert task --graph "Lambda RTC" --target-page "May 4th, 2026" --content 'Some content here' --status done --output json
    2. If tags are needed, use the returned block id: logseq upsert block --graph "Lambda RTC" --id <returned-block-id> --update-tags '["AI-GENERATED" "CLI" "db-sync"]'
Hashtags in content instead of tag association
  • Anti-pattern: treat content hashtags as tag association, for example --content 'Summary #AI-GENERATED'.
  • Correct usage: keep tags in explicit tag options, for example upsert block --update-tags '["AI-GENERATED"]'.
Comma-separated tag lists
  • Anti-pattern: pass tag updates as a comma-separated string, for example --update-tags "AI-GENERATED,CLI".
  • Correct usage: pass an EDN vector, for example --update-tags '["AI-GENERATED" "CLI"]'.
Missing tags
  • Anti-pattern: retry the same tag association command after a tag association failure without checking tag state.
  • Correct usage: verify the tag exists; create it first when needed with upsert tag --name "<TagName>".

Tips

  • query list returns both built-ins and custom-queries from cli.edn.
  • agent bridge starts/reuses db-worker-node, listens to db-worker-node events, scans routable tasks on startup and each event, starts one in-process master Codex session, and dispatches matched task/comment requests to that session.
  • show --id and remove block --id accept one positive db/id or a bracketed list such as '[123,456]'. Their id parser splits integers on commas or whitespace; it does not parse EDN.
  • upsert block enters update mode when --id or --uuid is provided.
  • If logseq reports that it doesn’t have read/write permission for root-dir, then check filesystem permissions or set LOGSEQ_CLI_ROOT_DIR.

© logseq, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/logseq-cli of logseq/logseq.

Open the folder on GitHubat commit 22a29b3

Compare with similar skills

Logseq CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Logseq CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logseq CLI this skilllogseq/logseq45k—~1.9kAutomated safety check: PassAGPL-3.0
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone
Obsidian CLIAtmosphere/atmosphere3.8k13 repos~795Automated safety check: PassApache-2.0
Karpathy LLM WikiAstro-Han/karpathy-llm-wiki2.4k—~3.6kAutomated safety check: PassMIT
Zlibrary To Notebooklmzstmfhy/zlibrary-to-notebooklm1.7k1 repos~968Automated safety check: PassMIT
Multi-Source to NotebookLM Processorjoeseesun/qiaomu-anything-to-notebooklm6.2k—~3.6kAutomated safety check: PassMIT

Similar skills

  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian CLI

    Atmosphere/atmosphere

    Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more.

    3.8k GitHub starsUsed in 13 repos~795 tokens
    Knowledge ManagementAuto-check passed
  • Karpathy LLM Wiki

    Astro-Han/karpathy-llm-wiki

    A skill your agent uses when building or maintaining a personal LLM-powered knowledge base.

    2.4k GitHub stars~3.6k tokensUpdated 2 mo ago
    Knowledge ManagementAuto-check passed
  • Zlibrary To Notebooklm

    zstmfhy/zlibrary-to-notebooklm

    自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

    1.7k GitHub starsUsed in 1 repo~968 tokens
    Knowledge ManagementAuto-check passed
  • Multi-Source to NotebookLM Processor

    joeseesun/qiaomu-anything-to-notebooklm

    Collects content from WeChat articles, web pages, YouTube, podcasts, documents and more, uploads it to NotebookLM and generates podcasts, slides or mind maps.

    6.2k GitHub stars~3.6k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check passed
  • Soul

    aeonfun/soul.md

    Embody this digital identity. An agent skill from aeonfun/soul.md.

    686 GitHub starsUsed in 2 repos~1.1k tokens
    Knowledge ManagementAuto-check passed

More from logseq/logseq

All 12 skills in this repo
  • Compare two revisions of the Logseq logseq-review-workflow skill by running the same review prompt against isolated before and after skill snapshots, collecting both outputs, and producing a…

    45k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Esm Cjs Risk Scan

    logseq/logseq

    Scan Logseq ClojureScript Node/Electron targets for npm module loading risks, especially ESM-only packages that may fail when loaded through js/require or shadow-cljs require-based shims.

    45k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Logseq Plugin SDK

    logseq/logseq

    Build, debug, or review Logseq plugins with the @logseq/libs SDK (TypeScript/JavaScript, iframe/shadow sandboxed).

    45k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Audit, plan, and refresh dependency upgrades for the Logseq repository by scanning every non-gitignored package.json, deps.edn, bb.edn and nbb.edn manifest, checking latest upstream versions…

    45k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Logseq I18n

    logseq/logseq

    Logseq i18n workflow for adding, renaming, reviewing, or editing translation keys and user-facing strings.

    45k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Answer user questions about the Logseq repository by researching source code, docs, tests, runtime behavior, and local tools.

    45k GitHub stars~1.2k tokensUpdated today
    Auto-check: warnings

Questions about Logseq CLI

What does Logseq CLI do?

Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage…. Logseq CLI is an agent skill from logseq/logseq. Operate the current Logseq command-line interface to inspect or modify graphs, pages, blocks, tasks, tags, and properties; run Datascript queries; show page/block trees; manage graphs; and manage db-worker-node servers.

When should I use Logseq CLI?

Logseq CLI fits situations like: A request involves running logseq commands; interpreting CLI output.

How do I install Logseq CLI in Claude Code?

Run `npx skills add logseq/logseq --skill logseq-cli -a claude-code`. Or copy the skill folder (.agents/skills/logseq-cli in logseq/logseq) into .claude/skills/logseq-cli in your project. Claude Code loads it when a task matches its description.

How do I install Logseq CLI in Codex?

Run `npx skills add logseq/logseq --skill logseq-cli -a codex`. Or copy the skill folder (.agents/skills/logseq-cli in logseq/logseq) into .agents/skills/logseq-cli in your project. Codex loads it when a task matches its description.

Can I use Logseq CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add logseq/logseq --skill logseq-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logseq-cli, .gemini/skills/logseq-cli, .github/skills/logseq-cli and .opencode/skills/logseq-cli in your project.

What does Logseq CLI need to run?

SKILL.md names no scripts, command-line tools or credentials: Logseq CLI is instructions for the agent only.

Does Logseq CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Logseq CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Logseq CLI use?

Logseq CLI is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Logseq CLI use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Logseq CLI?

Skills that share tags, products or a category with Logseq CLI: Baoyu URL To Markdown (sdyckjq-lab/llm-wiki-skill, 2.5k stars), Obsidian CLI (Atmosphere/atmosphere, 3.8k stars), Karpathy LLM Wiki (Astro-Han/karpathy-llm-wiki, 2.4k stars) and Zlibrary To Notebooklm (zstmfhy/zlibrary-to-notebooklm, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Logseq CLI?

logseq (a GitHub organization) maintains it in logseq/logseq, which has 45,158 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 7, 2026.

Source: logseq/logseq on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.