Agent skill

Logseq CLI Maintenance

by logseq in logseq/logseq

Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests.

AGPL-3.0Auto-check passedKnowledge Management

Install Logseq CLI Maintenance

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

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

GitHub CLI
$ gh skill install logseq/logseq logseq-cli-maintenance --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-maintenance .claude/skills/logseq-cli-maintenance && 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-maintenance
GitHub stars
45k
Token cost
~1k tokens
SKILL.md length
489 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests.

  • Works in 6 steps: Separate concerns clearly → Prefer small, composable functions → Keep command contracts explicit → …
  • Tasks that involve Plain language and style rules
  • SKILL.md covers Purpose, When to use, Core maintenance principles and Suggested workflow, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Logseq CLI Maintenance is an agent skill from logseq/logseq. Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests.

Its SKILL.md is about 1k 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, covering Plain language and style rules. 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

  • Tasks that involve Plain language and style rules

Example prompts

  • “/logseq-cli-maintenance”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Separate concerns clearly
  2. Prefer small, composable functions
  3. Keep command contracts explicit
  4. Make errors actionable
  5. Standardize CLI output
  6. Preserve behavior while refactoring

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 Maintenance loads about 1k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 489 words of instructions outside code blocks.

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

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). 489 words, ~1,038 tokens.

Download SKILL.mdSave it as .claude/skills/logseq-cli-maintenance/SKILL.md (or your agent's skills folder).
name
logseq-cli-maintenance
description
Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests.

logseq-cli-maintenance

Purpose

Use this skill when working on Logseq CLI-related code and you want to improve:

  • Readability
  • Maintainability
  • Consistency across command modules
  • Long-term development ergonomics

This skill focuses on practical refactoring and guardrails, without changing behavior unless explicitly requested.


When to use

Trigger this skill when tasks include any of the following:

  1. “Refactor Logseq CLI code”
  2. “Clean up command implementation”
  3. “Improve readability/structure of CLI logic”
  4. “Make CLI easier to extend and test”
  5. “Reduce duplication in argument parsing/output handling”

Do not use this skill for pure feature delivery unless the request also asks for code quality improvements.


Core maintenance principles

1) Separate concerns clearly

Keep these responsibilities isolated:

  • Input parsing (args/options/env)
  • Validation (schema/rules/errors)
  • Execution (domain logic)
  • Presentation (stdout/stderr formatting, exit codes)

A command handler should orchestrate these steps, not mix all logic in one large function.

2) Prefer small, composable functions
  • Keep functions single-purpose.
  • Use descriptive names that explain intent.
  • Extract repeated logic into shared helpers.
  • Avoid deep nesting; use early returns for invalid states.
3) Keep command contracts explicit

For each command/subcommand, make explicit:

  • Required and optional args
  • Defaults
  • Validation constraints
  • Output shape and error format
  • Exit code semantics
4) Make errors actionable
  • Show concise error messages with next-step hints.
  • Keep error wording consistent across commands.
  • Distinguish user errors (invalid input) from internal errors.
5) Standardize CLI output
  • Use one style for success, warning, and error output.
  • Ensure machine-readable mode (if supported) is stable and documented.
  • Avoid hidden format drift across subcommands.
6) Preserve behavior while refactoring

When request is maintenance-focused, avoid feature changes. If behavior must change, call it out explicitly and add tests.


Show full SKILL.md (219 more words)Show less

Suggested workflow

  1. Map current command flow
    • Locate parse → validate → execute → print boundaries.
  2. Identify maintenance hotspots
    • Long functions, duplicated parsing/output logic, hidden side effects.
  3. Refactor in small, reviewable steps
    • One concern per change.
  4. Add/update tests around behavior contracts
    • Especially for error cases and output format.
  5. Run relevant CLI tests and linters
    • Confirm no regressions.
  6. Run relevant cmds in logseq-cli
    • Use logseq-cli skill
    • Confirm no regressions.
  7. Document extension points
    • Show where future subcommands/options should be added.

Refactoring checklist

Use this checklist before finishing:

  • Command entrypoint is concise and easy to scan.
  • Parsing/validation/execution/output are separated.
  • Repeated logic is extracted to shared helpers.
  • Names are intention-revealing.
  • Error messages are consistent and actionable.
  • Output and exit code behavior are tested.
  • No behavior changes were introduced unintentionally.
  • bb lint:large-vars passes for touched vars.
  • Existing ^:large-vars/cleanup-todo annotations were removed when possible.
  • New structure is easy for future contributors to extend.

Common anti-patterns to remove

  • God-function command handlers
  • Implicit defaults scattered across files
  • Inconsistent option names/aliases
  • Silent failures or ambiguous exit codes
  • Copy-pasted output formatting logic
  • Mixing domain logic directly with terminal I/O

Deliverable expectations

When applying this skill, produce:

  1. Cleaner structure with equivalent behavior (unless requested otherwise)
  2. Focused tests for command contracts
  3. Brief rationale for key refactors
  4. Clear future extension path for new CLI commands/options

© 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-maintenance of logseq/logseq.

Open the folder on GitHubat commit 22a29b3

Compare with similar skills

Logseq CLI Maintenance 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 Maintenance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logseq CLI Maintenance this skilllogseq/logseq45k—~1kAutomated safety check: PassAGPL-3.0
Wiki NarrateAr9av/obsidian-wiki3.5k—~1.7kAutomated safety check: PassMIT
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

Similar skills

  • Wiki Narrate

    Ar9av/obsidian-wiki

    Turn a wiki topic into a cited Markdown briefing, plain-language explanation, or progressive lecture.

    3.5k GitHub stars~1.7k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • 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

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
  • Logseq CLI

    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…

    45k GitHub stars~1.9k 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

Questions about Logseq CLI Maintenance

What does Logseq CLI Maintenance do?

Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests. Logseq CLI Maintenance is an agent skill from logseq/logseq. Improve readability, consistency, and long-term maintainability of Logseq CLI-related code, command flows, and tests.

When should I use Logseq CLI Maintenance?

Logseq CLI Maintenance fits situations like: tasks that involve Plain language and style rules.

How do I install Logseq CLI Maintenance in Claude Code?

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

How do I install Logseq CLI Maintenance in Codex?

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

Can I use Logseq CLI Maintenance 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-maintenance -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-maintenance, .gemini/skills/logseq-cli-maintenance, .github/skills/logseq-cli-maintenance and .opencode/skills/logseq-cli-maintenance in your project.

What does Logseq CLI Maintenance need to run?

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

Does Logseq CLI Maintenance 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 Maintenance 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 Maintenance use?

Logseq CLI Maintenance 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 Maintenance use?

About 1k tokens (SKILL.md is roughly 4.2k 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 Maintenance?

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

Who maintains Logseq CLI Maintenance?

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.