Use this skill when the user asks about "markdown setup", "remark plugins", "rehype configuration", "admonitions", "code highlighting", "math equations", "KaTeX", "GitHub cards", "expressive code", "unified ecosystem", "markdown pipeline", "image lightbox", "table of contents", "CSS variables", "markdown styling", or wants to set up advanced markdown features.
/plugin marketplace add Linaqruf/cc-plugins/plugin install fuwari-md@cc-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples/astro-config.tsexamples/next-config.mjsexamples/vite-config.tsreferences/advanced-customization.mdreferences/css-classes.mdreferences/css-variables.mdreferences/expressive-code.mdreferences/framework-configs.mdreferences/photoswipe-lightbox.mdreferences/rehype-plugins.mdreferences/remark-plugins.mdreferences/toc-component.mdreferences/troubleshooting.mdsources/expressive-code-plugins.tssources/rehype-component-admonition.mjssources/rehype-component-github-card.mjssources/remark-directive-rehype.jssources/remark-excerpt.jssources/remark-reading-time.mjsProvide comprehensive guidance for implementing Fuwari's production-ready markdown processing pipeline in any framework. This stack includes admonitions, math equations, GitHub repository cards, enhanced code blocks, reading time calculation, and more.
The markdown processing flows through these stages:
Markdown Source
↓
[Remark Plugins] - Parse and transform MDAST
├── remark-math → Parse LaTeX notation
├── remark-reading-time → Calculate reading time
├── remark-excerpt → Extract first paragraph
├── remark-github-admonitions-to-directives → Convert GitHub syntax
├── remark-directive → Parse directive syntax
├── remark-sectionize → Wrap headings in sections
└── parseDirectiveNode → Convert directives to HAST
↓
[Rehype Plugins] - Transform and render HAST
├── rehype-katex → Render math equations
├── rehype-slug → Add IDs to headings
├── rehype-components → Render custom components
└── rehype-autolink-headings → Add anchor links
↓
[Expressive Code] - Enhanced code blocks
├── pluginLineNumbers
├── pluginCollapsibleSections
├── pluginLanguageBadge
└── pluginCustomCopyButton
↓
HTML Output
| Feature | Syntax | Notes |
|---|---|---|
| Admonitions | :::note[Title] ... ::: | Types: note, tip, important, warning, caution |
| GitHub Admonitions | > [!NOTE] | Converted to directive syntax |
| Math (inline) | $E = mc^2$ | KaTeX rendering |
| Math (display) | $$\int_0^\infty$$ | Block-level equations |
| GitHub Cards | ::github{repo="owner/repo"} | Fetches repo info via API |
| Spoilers | :spoiler[hidden text] | Click to reveal |
| Code Blocks | ```lang | Line numbers, copy button, language badge |
{
"remark-math": "^6.0.0",
"remark-directive": "^3.0.0",
"remark-github-admonitions-to-directives": "^2.0.0",
"remark-sectionize": "^2.0.0",
"rehype-katex": "^7.0.0",
"rehype-slug": "^6.0.0",
"rehype-autolink-headings": "^7.0.0",
"rehype-components": "^0.3.0",
"hastscript": "^9.0.0",
"unist-util-visit": "^5.0.0",
"mdast-util-to-string": "^4.0.0",
"reading-time": "^1.5.0",
"astro-expressive-code": "^0.35.0",
"@expressive-code/plugin-collapsible-sections": "^0.35.0",
"@expressive-code/plugin-line-numbers": "^0.35.0"
}
Support both directive syntax and GitHub-style admonitions:
Directive syntax:
:::note[Custom Title]
This is a note with a custom title.
:::
:::warning
This uses the default "WARNING" title.
:::
GitHub syntax (auto-converted):
> [!NOTE]
> This is a GitHub-style note.
> [!TIP]
> Helpful tip here.
Admonition types: note, tip, important, warning, caution
See references/remark-plugins.md for plugin configuration.
See sources/rehype-component-admonition.mjs for component implementation.
Use KaTeX for rendering LaTeX math:
Inline math:
The equation $E = mc^2$ is famous.
Display math:
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
Requires remark-math and rehype-katex. Include KaTeX CSS in your layout.
See references/rehype-plugins.md for KaTeX configuration.
Embed interactive GitHub repository cards:
::github{repo="withastro/astro"}
This creates a card that fetches and displays:
See sources/rehype-component-github-card.mjs for implementation.
Expressive Code provides:
See references/expressive-code.md for full configuration.
See sources/expressive-code-plugins.ts for custom plugins.
Automatically calculate reading time and extract excerpt:
// In your template (Astro example):
const { minutes, words, excerpt } = Astro.props.frontmatter;
See sources/remark-reading-time.mjs and sources/remark-excerpt.js.
Enable click-to-zoom for images using PhotoSwipe v5:
import PhotoSwipeLightbox from "photoswipe/lightbox"
import "photoswipe/style.css"
const lightbox = new PhotoSwipeLightbox({
gallery: ".custom-md img",
pswpModule: () => import("photoswipe"),
wheelToZoom: true,
})
lightbox.init()
See references/photoswipe-lightbox.md for full integration guide.
Interactive TOC with scroll tracking via IntersectionObserver:
See references/toc-component.md for implementation details.
Inline spoiler elements that reveal on hover:
This has a :spoiler[hidden secret] in the text.
.custom-md spoiler {
background: var(--codeblock-bg);
transition: all 0.15s;
}
.custom-md spoiler:hover {
background: transparent;
}
.custom-md spoiler:not(:hover) {
color: var(--codeblock-bg);
}
For framework-specific configuration:
examples/astro-config.tsexamples/next-config.mjsexamples/vite-config.tsSee references/framework-configs.md for detailed integration guides.
To create your own directives:
parseDirectiveNode to convert to HASTrehype-componentsSee sources/remark-directive-rehype.js for the directive parser.
Admonitions, GitHub cards, and other components require CSS. Key classes:
.admonition, .bdm-note, .bdm-tip, etc..card-github, .gc-titlebar, .gc-description, etc.spoiler element for inline spoilers.toc-link, .toc-indicator for table of contentsSee references/css-classes.md for complete class reference.
See references/css-variables.md for theming with CSS custom properties.
references/remark-plugins.md - Detailed remark plugin documentationreferences/rehype-plugins.md - Detailed rehype plugin documentationreferences/expressive-code.md - Code block configurationreferences/framework-configs.md - Framework integration guides (Astro, Next.js, Vite, SvelteKit, Docusaurus, Remix)references/advanced-customization.md - Custom directives, Expressive Code plugins, theme customizationreferences/photoswipe-lightbox.md - Image lightbox integration guidereferences/toc-component.md - Table of contents implementationreferences/css-variables.md - Complete CSS variable reference (50+ variables)references/css-classes.md - CSS class reference for all componentsreferences/troubleshooting.md - Common issues and solutionssources/ - Complete plugin source code from FuwariThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.