SkillAgentSearch skills...

Apex

Universal Markdown Processor compatible with CommonMark, GFM, MultiMarkdown, Kramdown, mmark, and more

Install / Use

/learn @ApexMarkdown/Apex
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Version: 1.0.3 License: MIT <!--TESTS_BADGE-->Tests passing 1502/1502<!--END TESTS_BADGE-->

Apex

Apex is a unified Markdown processor that combines the best features from CommonMark, GitHub Flavored Markdown (GFM), MultiMarkdown, Kramdown, and Marked. One processor to rule them all.

There are so many variations of Markdown, extending its features in all kinds of ways. But picking one flavor means giving up the features of another flavor. So I'm building Apex with the goal of making all of the most popular features of various processors available in one tool.

Features

Compatibility Modes

  • Multiple compatibility modes: CommonMark, GFM, MultiMarkdown, Kramdown, and Unified (all features)
  • Mode-specific features: Each mode enables appropriate extensions for maximum compatibility

Markdown Extensions

  • Tables: GitHub Flavored Markdown tables with advanced features (rowspan via ^^, colspan via empty cells/<<, captions before/after tables including Pandoc-style Table: Caption and : Caption syntax, and individual cell alignment using colons :Left, Right:, :Center:)

  • Table caption positioning: Control caption placement with --captions above or --captions below (default: below)

  • Table caption IAL: IAL attributes in table captions (e.g., : Caption {#id .class}) are extracted and applied to the table element

  • Relaxed tables: Support for tables without separator rows (Kramdown-style)

  • Headerless tables: Support for tables that start with alignment rows (separator rows) without header rows; column alignment is automatically applied

  • Footnotes: Three syntaxes supported (reference-style, Kramdown inline, MultiMarkdown inline)

  • Definition lists: Kramdown-style definition lists with Markdown content support

  • Task lists: GitHub-style checkboxes (- [ ] and - [x])

  • Strikethrough: ~~text~~ syntax from GFM

  • Smart typography: Automatic conversion of quotes, dashes, ellipses, and more

  • Math support: LaTeX math expressions with $...$ (inline) and $$...$$ (display)

  • Syntax highlighting: External syntax highlighting for fenced code blocks via Pygments, Skylighting, or Shiki with --code-highlight flag.

    Supports language-aware highlighting, auto-detection, and line numbers with --code-line-numbers

  • Wiki links: [[Page Name]], [[Page Name|Display Text]], and [[Page Name#Section]] syntax with configurable link targets via --wikilink-space and --wikilink-extension

  • Abbreviations: Three syntaxes (classic MMD, MMD 6 reference, MMD 6 inline)

  • Callouts: Bear/Obsidian-style callouts with collapsible support (> [!NOTE], > [!WARNING], etc.)

  • GitHub emoji: 350+ emoji support (:rocket:, :heart:, etc.)

Document Features

  • Metadata blocks: YAML front matter, MultiMarkdown metadata, and Pandoc title blocks

  • Metadata variables: Insert metadata values with [%key] syntax

  • Metadata transforms: Transform metadata values with [%key:transform] syntax

    Supports case conversion, string manipulation, regex replacement, date formatting, and more.

    See Metadata Transforms for complete documentation

  • Metadata control of options: Control command-line options via metadata

    • set boolean flags (indices: false, wikilinks: true) and string options (bibliography: refs.bib, title: My Document, wikilink-space: dash, wikilink-extension: html) directly in document metadata for per-document configuration
  • Table of Contents: Automatic TOC generation with depth control using HTML (<!--TOC-->), MMD ({{TOC}} / {{TOC:2-4}}), and Kramdown {:toc} markers. Headings marked with {:.no_toc} are excluded from the generated TOC.

  • File includes: Three syntaxes (Marked <<[file], MultiMarkdown {{file}}, iA Writer /file), with support for address ranges and wildcard/glob patterns such as {{file.*}}, {{*.md}}, and {{c?de.py}}.

  • Markdown combiner (--combine): Concatenate one or more Markdown files into a single Markdown stream, expanding all include syntaxes.

    When a SUMMARY.md file is provided, Apex treats it as a GitBook-style index and combines the linked files in order, perfect for building books, multi-file indices, and shared tables of contents that can then be piped back into Apex for final rendering.

  • MultiMarkdown merge (--mmd-merge): Read one or more mmd_merge-style index files and stitch their referenced documents into a single Markdown stream.

    Each non-empty, non-comment line specifies a file to include; indentation with tabs or four-space groups shifts all headings in that file down by one level per indent, mirroring the original mmd_merge.pl behavior.

    Output is raw Markdown that can be piped into Apex (e.g., apex --mmd-merge index.txt | apex --mode mmd).

  • CSV/TSV support: Automatic table conversion from CSV and TSV files

  • Inline Attribute Lists (IAL): Kramdown-style attributes {: #id .class} and Pandoc-style attributes {#id .class}

    Both formats work in all contexts (block-level, inline, paragraphs, headings, table captions)

  • Bracketed spans: Convert [text]{IAL} syntax to HTML span elements with attributes, enabled by default in unified mode

  • Fenced divs: Pandoc-style fenced divs ::::: {#id .class} ... ::::: for creating custom block containers, enabled by default in unified mode.

    Supports block type syntax >blocktype to create different HTML elements (e.g., ::: >aside {.sidebar} creates <aside> instead of <div>). Common block types include aside, article, section, details, summary, header, footer, nav, and custom elements

  • Image IAL support: Inline and reference-style images support IAL syntax with automatic width/height conversion (percentages and non-integer/non-px values convert to style attributes, Xpx values convert to integer width/height attributes, bare integers remain as width/height attributes)

  • Special markers: Page breaks (<!--BREAK-->), autoscroll pauses (<!--PAUSE:N-->), end-of-block markers

Citations and Bibliography

  • Multiple citation syntaxes: Pandoc ([@key]), MultiMarkdown ([#key]), and mmark ([@RFC1234]) styles
  • Bibliography formats: Support for BibTeX (.bib), CSL JSON (.json), and CSL YAML (.yml, .yaml) formats
  • Automatic bibliography generation: Bibliography automatically generated from cited entries
  • Citation linking: Option to link citations to bibliography entries
  • Metadata support: Bibliography can be specified in document metadata or via command-line flags
  • Multiple bibliography files: Support for loading and merging multiple bibliography files
  • CSL style support: Citation Style Language (CSL) files for custom citation formatting
  • Mode support: Citations enabled in MultiMarkdown and unified modes

Indices

  • mmark syntax: (!item), (!item, subitem), (!!item, subitem) for primary entries
  • TextIndex syntax: {^}, [term]{^}, {^params} for flexible indexing
  • Automatic index generation: Index automatically generated at end of document or at <!--INDEX--> marker
  • Alphabetical sorting: Entries sorted alphabetically with optional grouping by first letter
  • Hierarchical sub-items: Support for nested index entries
  • Mode support: Indices enabled by default in MultiMarkdown and unified modes

Critic Markup

  • Change tracking: Additions ({++text++}), deletions ({--text--}), substitutions ({~~old~>new~~})
  • Annotations: Highlights ({==text==}) and comments ({>>text<<})
  • Accept mode: --accept flag to apply all changes for final output
  • Reject mode: --reject flag to revert all changes to original

Output Options

  • Flexible output: Compact HTML fragments, pretty-printed HTML, or complete standalone documents
  • Standalone documents: Generate complete HTML5 documents with <html>, <head>, <body> tags
  • Custom styling: Link multiple external CSS files in standalone mode (use --css multiple times or comma-separated list)
  • Syntax highlighting: External syntax highlighting via Pygments, Skylighting, or Shiki with --code-highlight flag, includes automatic GitHub-style CSS in standalone mode
  • Pretty-print: Formatted HTML with proper indentation for readability
  • XHTML output: --xhtml writes void/empty elements in XML form (<br />, <meta ... />). --strict-xhtml adds polyglot XHTML document scaffolding when used with --standalone (XML declaration, XHTML namespace, Content-Type meta). You can also select the same behavior with -t xhtml or -t strict-xhtml (aliases for HTML output with those flags). In fragment mode, strict mode does not validate or repair all markup as XML???raw HTML can still be ill-formed; see the main README.
  • Header ID generation: Automatic or manual header IDs with multiple format options (GFM, MMD, Kramdown)
  • Emoji-to-name conversion: In GFM mode, emojis in headers are converted to their textual names in IDs (e.g., # ???? Support ??? id="smile-support"), matching Pandoc's GFM behavior
  • Header anchors: Option to generate <a> anchor tags instead of header IDs
  • ARIA accessibility: Add ARIA labels and accessibility attributes (--aria) for better screen reader support, including aria-label on TOC navigation, role attributes on figures and tables, and aria-describedby linking tables to their captions
  • Terminal inline images: With -t terminal / `-t ter

Related Skills

View on GitHub
GitHub Stars112
CategoryDevelopment
Updated15h ago
Forks5

Languages

C

Security Score

100/100

Audited on Mar 31, 2026

No findings