Use when creating Docusaurus plugins — write remark transformers for markdown AST, rehype transformers for HTML/HAST, lifecycle plugins that add routes/webpack config/global data via loadContent and contentLoaded, theme plugins and swizzled components, and content plugins for custom data sources. Triggers on tasks involving custom remark/rehype plugins, content plugins, theme plugins, or Docusaurus lifecycle hooks.
71
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The canonical home for this skill is mcclowes/docusaurus-plugins
// Remark plugin - transforms markdown AST
module.exports = function remarkPlugin(options = {}) {
return async function transformer(ast, vfile) {
const { visit } = require('unist-util-visit');
visit(ast, 'link', (node) => {
// Transform nodes
node.data = node.data || {};
node.data.hProperties = { className: 'custom' };
});
return ast;
};
};
// In docusaurus.config.js:
// remarkPlugins: [require('./plugins/my-plugin')]Start here — pick the type from what you need to change, then open the matching reference file:
| You want to… | Use | Reference |
|---|---|---|
| Change markdown syntax/content before HTML | Remark | remark-plugins.md |
| Change the generated HTML | Rehype | rehype-plugins.md |
| Add routes, webpack config, or global build data | Lifecycle | lifecycle-plugins.md |
| Override or wrap UI components | Theme | theme-plugins.md |
| Load a custom content source (CMS, API, files) | Content | content-plugins.md |
unist-util-visit for AST traversalloadContent(), contentLoaded(), postBuild()Detailed guides for each plugin type:
6b52554
Canonical home
since Jun 17, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.