Transforms Shiroi-flavored Markdown files into Haklex Lexical JSON for rich text editors.
Install
mkdir -p .claude/skills/md-to-lexical && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12254" && unzip -o skill.zip -d .claude/skills/md-to-lexical && rm skill.zipInstalls to .claude/skills/md-to-lexical
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Convert Shiroi Markdown to Haklex Lexical JSON. Use when the user wants to convert a markdown file or string to rich text editor JSON format.Key capabilities
- →Convert Shiroi Markdown to Haklex Lexical SerializedEditorState JSON.
- →Parse headings, paragraphs, and quotes.
- →Support custom nodes like AlertQuoteNode and MermaidNode.
- →Convert images and videos to ImageNode and VideoNode.
- →Handle text format flags like bold, italic, and strike.
- →Process complex structures like tables, galleries, and tabs.
How it works
The skill parses Shiroi-flavored Markdown input and converts it into Lexical SerializedEditorState JSON, supporting various standard and custom Markdown elements.
Inputs & outputs
When to use md-to-lexical
- →Convert blog posts to JSON
- →Migrate markdown docs to Lexical editor
- →Process rich text content for storage
About this skill
Markdown to Lexical JSON Converter
Converts Shiroi-flavored Markdown to Haklex's Lexical SerializedEditorState JSON.
Usage
Run the conversion script:
npx tsx scripts/md-to-lexical/index.ts <input.md> > output.json
Or pipe from stdin:
cat article.md | npx tsx scripts/md-to-lexical/index.ts - > output.json
Supported Syntax
| Markdown | Lexical Node |
| ---------------------------------------------- | ---------------------------------- | ---- | --------- | --- | ----------- |
| # heading | HeadingNode |
| paragraph | ParagraphNode |
| > quote | QuoteNode |
| > [!NOTE/TIP/WARNING/IMPORTANT/CAUTION] | AlertQuoteNode |
| - list / 1. list | ListNode |
| --- | HorizontalRuleNode |
| ```lang ``` | CodeBlockNode |
| ```mermaid ``` | MermaidNode |
|  | ImageNode |
|  | VideoNode (auto-detect) |
| <video src="..."> | VideoNode |
| | table | | TableNode |
| $eq$ | KaTeXInlineNode |
| $$eq$$ | KaTeXBlockNode |
| **bold**, *italic*, ~~strike~~ | text format flags |
| ++underline++, ==highlight== | text format flags |
| ^superscript^, ~subscript~ | text format flags |
| `code` | text format flag |
| | | text | | | SpoilerNode |
| [name]{GH@handle} | MentionNode |
| [^id] / [^id]: ... | FootnoteNode / FootnoteSectionNode |
| <ruby>base<rt>reading</rt></ruby> | RubyNode |
| <tag>text</tag> | TagNode |
| [text](url) | LinkNode |
| standalone URL paragraph | LinkCardNode |
| :::gallery/carousel | GalleryNode |
| :::warn/info/error/banner | BannerNode |
| :::grid{cols=N,gap=M} | GridContainerNode |
| :::masonry | GalleryNode (masonry) |
| <details><summary>...</summary>...</details> | DetailsNode |
| <Tabs><tab label="...">code</tab>...</Tabs> | CodeSnippetNode |
| <excalidraw>snapshot</excalidraw> | ExcalidrawNode |
| <nested-doc>content</nested-doc> | NestedDocNode |
Workflow
- User provides a markdown file path or pastes markdown content
- Run the script to generate JSON
- Output can be saved to a file or used directly
When not to use it
- →When the target format is not Haklex Lexical JSON.
- →When the input is not Shiroi Markdown.
- →When only standard Markdown conversion is needed without custom nodes.
Limitations
- →Only supports Shiroi-flavored Markdown.
- →Output is specific to Haklex Lexical SerializedEditorState JSON.
- →Requires running a conversion script.
How it compares
This skill specifically converts Shiroi Markdown to Haklex Lexical JSON, including custom nodes, which differs from generic Markdown to HTML converters.
Compared to similar skills
md-to-lexical side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| md-to-lexical (this skill) | 0 | 3mo | Review | Beginner |
| report-writer | 1 | 6mo | No flags | Beginner |
| markitdown | 177 | 2mo | Review | Intermediate |
| biorxiv-database | 7 | 9mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Innei
View all by Innei →You might also like
report-writer
camel-ai
Generate professional reports from analysis results. Use when user needs to create formatted documents summarizing findings.
markitdown
K-Dense-AI
Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.
biorxiv-database
lifangda
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
markdown-converter
steipete
Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.
office-docs
Xxiii8322766509
Extract text and tables from .docx and .xlsx using local scripts (no external deps).
analyze-with-file
catlog22
Interactive collaborative analysis with documented discussions, inline exploration, and evolving understanding. Serial execution with no agent delegation.