comark
БесплатноБез исполняемых скриптовНе проверенComark (Components in Markdown) parser: syntax, AST, Vue/React/Svelte/Angular renderers, plugins, and LLM streaming with auto-close.
от onmax★ 729 звёзд на GitHubОб этом скилле
Comark - Skills Guide
A high-performance markdown parser with Comark (Components in Markdown) support, built on markdown-it, offering both string-based and streaming APIs.
Overview
Comark extends standard markdown with a powerful component system while maintaining full compatibility with CommonMark and GitHub Flavored Markdown. It provides:
- 🚀 High-performance parsing with markdown-it engine
- 📦 Streaming support with buffered and incremental modes
- ⚡ Real-time rendering with auto-close for incomplete syntax
- 🔧 Comark component syntax for custom components
- 🎨 Vue, React, Svelte & Angular renderers with custom component mapping
- 📝 YAML frontmatter support
- 📑 Automatic TOC generation
- 🎯 Full TypeScript support
- 🌈 Syntax highlighting with Shiki integration
Package Information
- Package Name:
comark - Installation:
npm install comarkorpnpm add comark - Exports:
- Main parser:
comark - Vue components:
@comark/vue - React components:
@comark/react - Svelte components:
@comark/svelte - Angular components:
@comark/angular - HTML rendering:
@comark/html - ANSI terminal rendering:
@comark/ansi - Nuxt module:
@comark/nuxt
- Main parser:
Quick Start
Basic Usage
import { parseMarkdown } from 'comark'
const content = `---
title: Hello World
---
# Hello World
This is **markdown** with :icon component.
::alert{type="info"}
Important message
::
`
const result = await parseMarkdown(content)
console.log(result.nodes) // Markdown AST
console.log(result.frontmatter) // { title: 'Hello World' }
console.log(result.meta) // Additional metadata
Vue Rendering
<template>
<Markdown :value="content" />
</template>
<script setup lang="ts">
import { Markdown } from '@comark/vue'
const content = `# Hello World`
</script>
React Rendering
import { Markdown } from '@comark/react'
export default function App() {
return <Markdown value={content} />
}
Svelte Rendering
<script lang="ts">
import { Markdown } from '@comark/svelte'
const content = `# Hello World`
</script>
<Markdown value={content} />
Angular Rendering
import { Component } from '@angular/core'
import { Markdown } from '@comark/angular'
@Component({
selector: 'app-root',
standalone: true,
imports: [Markdown],
template: `<comark-markdown [value]="content" />`,
})
export class AppComponent {
content = `# Hello World`
}
Documentation Sections
This guide is organized into focused sections covering different aspects of the package:
📝 1. Markdown Syntax
Learn how to write Comark documents with complete syntax reference:
- Standard Markdown: headings, text formatting, lists, links, images, blockquotes
- Frontmatter: YAML metadata with special fields (title, depth, searchDepth)
- Comark Components: block components (
::component), inline components (:component), properties, slots, nesting - Attributes: custom attributes on native markdown elements using
{...}syntax - Code Blocks: language specification, filename metadata, line highlighting, special characters
- Task Lists: GFM-style checkboxes with
[x]and[ ]syntax - Tables: GFM tables with alignment and inline markdown support
→ Read Full Markdown Syntax Guide
🔧 2. Parsing & Document Model
Complete guide for parsing and working with MarkdownDocument:
- String Parsing:
parseMarkdown()function with options (autoUnwrap, autoClose) - Async Parsing:
parseMarkdown()with Shiki syntax highlighting - Document Structure: serializable
MarkdownDocumentwith compact array-based nodes - Rendering Documents: convert to HTML (
renderHtmlFromDocumentvia@comark/html) or markdown (renderMarkdownviacomark/render) - Auto-close: automatic closing of unclosed syntax
- Auto-unwrap: remove unnecessary paragraph wrappers from container components
→ Read Full Parsing & Document Model Guide
⚛️ 3. Vue Rendering
Comprehensive guide for rendering in Vue applications:
- Basic Usage:
Markdowncomponent setup - Custom Components: mapping custom Vue components to Comark elements
- Dynamic Loading:
componentsManifestfor lazy-loaded components - Slots Support: named slots with
#slot-namesyntax - Streaming Mode: real-time rendering with reactive content
- Prose Components: pre-built styled components for standard elements
- Error Handling: built-in error capture for streaming scenarios
- Props Access: accessing
__nodeand parsed properties
→ Read Full Vue Rendering Guide
⚛️ 4. React Rendering
Comprehensive guide fo
Установить comark в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл comark?
Comark (Components in Markdown) parser: syntax, AST, Vue/React/Svelte/Angular renderers, plugins, and LLM streaming with auto-close.
Как установить скилл comark?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл comark запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic