convert-from-md-to-lfm

convert-from-md-to-lfm is a cursor rule for coding agents from codekiln/logseq-cursor-rules. It costs 17 tokens per session (1,257 once invoked), scanned A, original, MIT.

A checklist for converting standard Markdown into Logseq Flavored Markdown, the Markdown variant used by Logseq for outlining and notes.

In plain words
What is it for?
Use it to fix link labels, nest code blocks correctly inside bullets, remove unnecessary separators, and preserve heading structure during conversion.
Why use it?
It catches formatting details that can make converted notes harder to read or render incorrectly in Logseq.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/codekiln/logseq-cursor-rules/convert-from-md-to-lfm
Clone the repo
git clone --depth 1 https://github.com/codekiln/logseq-cursor-rules

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for convert-from-md-to-lfm

README.md
[![agentmods](https://agentmods.dev/badge/rules/codekiln/logseq-cursor-rules/convert-from-md-to-lfm.svg)](https://agentmods.dev/rules/codekiln/logseq-cursor-rules/convert-from-md-to-lfm)
Your own site
<a href="https://agentmods.dev/rules/codekiln/logseq-cursor-rules/convert-from-md-to-lfm"><img src="https://agentmods.dev/badge/rules/codekiln/logseq-cursor-rules/convert-from-md-to-lfm.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.01257
Opus 5 $0.00009 $0.00629
Sonnet 5 $0.00003 $0.00251
Haiku 4.5 $0.00002 $0.00126

Measured 3d ago against content hash 5eab8dbcca45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

convert-from-md-to-lfm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

convert-from-md-to-lfm.mdc · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Converting from Standard Markdown to Logseq Flavored Markdown (LFM)

This guide provides a checklist for exceptional tasks that may require specific attention when converting standard markdown (particularly from ChatGPT or similar sources) to Logseq Flavored Markdown (LFM). For standard LFM rules, see logseq-flavored-markdown.mdc.

Conversion Checklist

1. Links Requiring Special Attention

  • For any link without descriptive text (e.g., [github.com](url)), visit the destination to get its actual title/content
  • Replace generic link text with meaningful descriptions from the destination
  • Example: Convert [github.com](https://github.com/pytest-dev/pytest/commit/9335a0b) to [Avoid ast deprecation warnings on Python 3.12](https://github.com/pytest-dev/pytest/commit/9335a0b)

2. Code Block Formatting

  • Ensure code blocks are properly nested inside bullet points (not as separate bullet points)
  • Example of correct format:
    - ~~~python
      your code here
      ~~~
    
    Not:
    - ~~~python
    - your code here
    - ~~~
    

3. Horizontal Rules

  • Remove any lines with only horizontal separators (---) as they're not needed in LFM
  • Use proper heading hierarchy and indentation to indicate section breaks instead

4. Tables

  • Convert any markdown tables with more than two columns to bullet points with label-value pairs. If it has two columns, it's okay to keep it as a table, but it must be appropriately put inside of a markdown unordered list item (-).
  • Example: <EXAMPLE_FROM> | Label | Value | |-------|-------| | A | B | </EXAMPLE_FROM> <EXAMPLE_TO>
    • A: B <EXAMPLE_TO> or <EXAMPLE_TO>
  • Label Value
    A B

</EXAMPLE_TO>

5. Heading Nesting Levels

  • Ensure headings use the correct level for their indentation:
    • # (H1) only at root level (no indent)
    • ## (H2) only at first indent (one TAB)
    • ### (H3) only at second indent (two TABs)
  • Example:
    - # Main Topic
      - ## Subtopic
        - ### Detail
    

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 130 lines · 17 tokens per session scan A 5eab8dbcca45

Subscribe to this mod's changes

convert-from-md-to-lfm is a cursor rule published in the GitHub repository codekiln/logseq-cursor-rules (2 stars, last pushed 11mo ago), licensed MIT. It adds 17 tokens to every session and 1,257 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.