Skip to content
Skill

slimdown-js-markdown-parser

by erikvullings

AI Summary

A TypeScript skill for integrating slimdown-js, a lightweight (~2.8 kB) regex-based Markdown-to-HTML parser, enabling developers to quickly convert Markdown to safe HTML without heavy dependencies on client or server.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "slimdown-js-markdown-parser" skill in my project.

Please run this command in my terminal:
# Install skill into the correct directory
mkdir -p .claude/skills/slimdown-js && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/slimdown-js/SKILL.md "https://raw.githubusercontent.com/erikvullings/slimdown-js/master/SKILL.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Use slimdown-js, a lightweight (~2.8 kB minified), regex-based Markdown-to-HTML parser written in TypeScript. This skill covers installation, basic rendering, supported Markdown syntax (extended CommonMark subset including images, tables, task lists, math, footnotes, definition lists, etc.), adding custom parsing rules via addRule, browser vs module usage, and best practices for simple, client-side or Node.js Markdown conversion. Invoke this skill when the user needs to convert Markdown strings to safe HTML using a tiny, dependency-free parser without full CommonMark compliance.

Overview & When to Use This Skill

Use this skill for tasks involving slimdown-js — a very basic, regex-based Markdown parser[](https://github.com/erikvullings/slimdown-js) originally based on a PHP gist, ported to TypeScript, and extended with extra features. Key characteristics: • Extremely small footprint (~2.8 kB compressed) • No dependencies • Pure regex replacements → fast but not fully spec-compliant • Good for simple blogs, comments, notes, previews, or embedded Markdown rendering • Supports many common and some extended elements (tables, math, task lists, footnotes, definition lists, etc.) Do NOT use this skill for: • Full CommonMark/GFM compliance (use marked, markdown-it, micromark, etc.) • Security-critical sanitization (slimdown-js does not escape HTML by default) • Complex parsing needs (nested block elements, edge cases)

Quick Reference Examples

`ts // Math render('Inline math $$ E=mc^2 $$ and block $$ \sum_{i=0}^n i $$'); // Task list render('- [x] Buy milk\n- [ ] Do homework'); // Table with caption and span render(`[Q1 Results] | Item | Value | | | ---- | ----- || | Total | $500 ||`); // Footnote render('Fact[^1]\n\n[^1]: Source: 2025 report'); ` When helping with slimdown-js, stick to these documented features and patterns. For more complex Markdown needs, suggest migrating to marked, markdown-it, or showndown.

Installation

`bash npm install slimdown-js `

ES Modules (recommended)

`ts import { render } from 'slimdown-js'; const md = `

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 2mo ago
Active
AdoptionUnder 100 stars
15 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars15
Issues4
Updated2mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code