Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

mermint-markdown-workflowmermint Markdown 工作流

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

336

周安装

14

GitHub Stars

1

下载量

112
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mermint-markdown-workflow(mermint Markdown 工作流)
来源仓库:https://github.com/alessandrobologna/mermint
仓库路径:skills/mermint-markdown-workflow
安装命令:
npx skills add https://github.com/alessandrobologna/mermint --skill mermint-markdown-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alessandrobologna/mermint --skill mermint-markdown-workflow

简介

用于辅助文档、README、Markdown 和内容稿件的整理与改写。

  • 适合提炼结构、补齐章节、统一术语或检查链接完整性。
  • 使用时应保留项目已有事实,避免将未确认信息写成确定结论。
  • 涉及对外文案时需控制语气,避免过度营销或夸大能力。
  • mermint-markdown-workflow 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Mermint Markdown Workflow

Use this workflow to render Markdown Mermaid blocks into GitHub-friendly <picture> markup and SVG assets. Prefer running mermint directly from this GitHub repo with npx; do not assume a local checkout or global install. For hand-drawn or architecture-beta work, do not stop at a successful SVG render. Rasterize previews, inspect them visually, and iterate until readability and aesthetics are acceptable in both themes.

Inputs To Confirm

  • Target markdown file (example: README.md)
  • SVG output directory (example: svgs)
  • In-place overwrite vs separate output path
  • Whether Mermaid source must be preserved (--keep-mermaid)
  • Whether hand-drawn tuning is allowed, or whether the user wants the existing style preserved

Preflight Checks

Before rendering, check:

  • node is installed and version >= 22
  • npx is available
  • network access is available, because the CLI is fetched from GitHub

Example:

node --version
npx --version

Standard Commands

Primary command:

npx --yes git+https://github.com/alessandrobologna/mermint.git \
  --input README.md \
  --svg-dir svgs \
  --keep-mermaid

Use explicit themes when you want stable readme-style output:

npx --yes git+https://github.com/alessandrobologna/mermint.git \
  --input README.md \
  --svg-dir svgs \
  --light-theme default \
  --theme dark \
  --keep-mermaid

For non-interactive in-place conversion (CI/automation), add --yes:

npx --yes git+https://github.com/alessandrobologna/mermint.git \
  --input README.md \
  --svg-dir svgs \
  --keep-mermaid \
  --yes

For a non-destructive preview, write to a separate markdown output:

npx --yes git+https://github.com/alessandrobologna/mermint.git \
  --input README.md \
  --output /tmp/README.rendered.md \
  --svg-dir /tmp/mermint-svgs \
  --keep-mermaid

Raster Preview Commands

After SVG rendering, rasterize both light and dark outputs to PNG previews before judging quality. Prefer representative backgrounds:

  • light preview background: #ffffff
  • dark preview background: #0d1117

Preferred command with rsvg-convert:

mkdir -p /tmp/mermint-previews

for svg in svgs/*-light.svg; do
  png="/tmp/mermint-previews/$(basename "${svg%.svg}.png")"
  rsvg-convert --background-color '#ffffff' "$svg" -o "$png"
done

for svg in svgs/*-dark.svg; do
  png="/tmp/mermint-previews/$(basename "${svg%.svg}.png")"
  rsvg-convert --background-color '#0d1117' "$svg" -o "$png"
done

Fallback with ImageMagick:

mkdir -p /tmp/mermint-previews

for svg in svgs/*-light.svg; do
  png="/tmp/mermint-previews/$(basename "${svg%.svg}.png")"
  magick -background '#ffffff' "$svg" -flatten "$png"
done

for svg in svgs/*-dark.svg; do
  png="/tmp/mermint-previews/$(basename "${svg%.svg}.png")"
  magick -background '#0d1117' "$svg" -flatten "$png"
done

If neither rasterizer is available, open the SVGs in a browser and capture screenshots of both the light and dark variants before approving the result.

Frontmatter / Init Conventions

This workflow supports source-level Mermaid config in frontmatter/init, including:

  • config.look
  • config.fontFamily
  • config.architecture.iconPacks
  • x-mermint.rough

mermint includes a built-in aws icon pack for Mermaid architecture diagrams. Use aws:<icon> directly without adding a URL or local icon-pack path.

When generating or revising AWS architecture diagrams, read references/aws-architecture-icons.md before inventing icon names. Prefer concrete AWS service icons over generic Mermaid shapes when the service is known. Examples:

  • use aws:simple-storage-service for S3-style storage instead of disk
  • use aws:dynamodb for DynamoDB-style state instead of database
  • use aws:simple-queue-service for SQS instead of a generic queue/storage symbol
  • use aws:amazon-simple-notification-service or aws:simple-notification-service for SNS
  • fall back to generic Mermaid shapes only when there is no suitable AWS service icon

Use config.architecture.iconPacks only when you need:

  • additional non-AWS icon packs
  • a local override for the built-in aws pack
  • a pinned custom AWS pack snapshot

Optional Hand-Drawn Tuning

Enable hand-drawn rendering with either:

  • config.look: handDrawn in frontmatter/init
  • --look handDrawn on the CLI

Tune the Rough.js pass with x-mermint.rough in source config, or with CLI flags when you want a one-off override.

Supported rough keys:

  • roughness
  • fillWeight
  • fillStyle
  • hachureGap
  • hachureAngle
  • bowing
  • strokeWidth
  • seed
  • disableMultiStroke
  • disableMultiStrokeFill
  • preserveVertices

Important behavior:

  • rough precedence is CLI > source config > defaults
  • --look classic is incompatible with rough overrides
  • built-in aws icons work normally in hand-drawn mode
  • hand-drawn architecture-beta diagrams with icon references default to fillStyle: solid for icon legibility unless you explicitly set a fill style

Example with AWS icons and source-level Rough.js tuning:

---
config:
  look: handDrawn
x-mermint:
  rough:
    roughness: 0.55
    fillStyle: cross-hatch
    hachureGap: 1
    bowing: 0.8
    seed: 42
---
architecture-beta
  group api(aws:aws-api-gateway)[API Layer]
  service gateway(aws:aws-api-gateway)[API Gateway] in api
  group compute(aws:aws-lambda)[Compute]
  service fn(aws:aws-lambda)[Lambda] in compute
  gateway:R --> L:fn

Equivalent CLI shape for a one-off render:

npx --yes git+https://github.com/alessandrobologna/mermint.git \
  --input README.md \
  --svg-dir svgs \
  --keep-mermaid \
  --look handDrawn \
  --roughness 0.55 \
  --fill-style cross-hatch \
  --hachure-gap 1 \
  --bowing 0.8 \
  --seed 42

AWS Architecture Example

Built-in AWS icons with no extra pack config:

Legibility note:

  • if you use hand-drawn mode with architecture icons and do not specify fillStyle, mermint now defaults those diagrams to fillStyle: solid
  • set x-mermint.rough.fillStyle or --fill-style explicitly if you want hachure, cross-hatch, or another Rough.js fill style instead
---
config:
  look: handDrawn
---
architecture-beta
  group api(aws:aws-api-gateway)[API Layer]
  service gateway(aws:aws-api-gateway)[API Gateway] in api

  group compute(aws:aws-lambda)[Compute]
  service lambda(aws:aws-lambda)[Lambda] in compute

  group messaging(aws:simple-queue-service)[Messaging]
  service queue(aws:simple-queue-service)[SQS] in messaging

  gateway:R --> L:lambda
  lambda:B --> T:queue

Override the built-in aws pack only when needed:

---
config:
  architecture:
    iconPacks:
      aws: ./aws-architecture-service-icons.json
---
architecture-beta
  service queue(aws:simple-queue-service)[SQS]

If icon packs use relative paths, they resolve from:

  • diagram mode: directory of the input .mmd file
  • markdown mode: directory of the markdown file

architecture-beta Guardrails

architecture-beta is less predictable than simpler Mermaid diagram types. A render can succeed and still produce an unusable layout.

Prefer these constraints when creating or revising architecture diagrams:

  • keep labels short and conservative
  • avoid slash-heavy or punctuation-heavy labels unless you render-test them
  • avoid decorative edge labels unless they carry essential meaning
  • use junction for optional branches or fan-out instead of forcing extra direct edges between services

Recommended optional-branch pattern:

architecture-beta
  service relay(aws:kinesis-data-streams)[Relay]
  junction fanout
  service collector(aws:amazon-opensearch-service)[Collector]
  service archive(aws:simple-storage-service)[Archive]

  relay:R --> L:fanout
  fanout:T --> B:collector
  fanout:B --> T:archive

Fallback rule:

  • if architecture-beta still overlaps after one conservative rewrite, stop and either simplify further with a junction-based branch or ask whether to switch to flowchart while preserving the architecture meaning

Visual Inspection Workflow

For architecture-beta and hand-drawn output, use an image-capable model or visual inspection pass on rasterized PNG previews. Do not rely only on Mermaid parse success or SVG existence.

Inspect both:

  • the light-theme PNG on a light background
  • the dark-theme PNG on a dark background

When an image-capable model is available, provide both PNGs and ask it to evaluate:

  • readability at normal README viewing size
  • overlap, clipping, and cramped layout
  • contrast and legibility in both themes
  • icon clarity and whether hatching interferes with service recognition
  • whether the hand-drawn treatment feels intentional rather than noisy

If no visual model is available, do the same checklist manually in an image viewer or browser.

Quality Rubric

Treat the result as acceptable only when all of the following pass:

  • Layout: nodes, labels, icons, and edge labels do not overlap or clip.
  • Readability: labels are readable without zooming excessively and line crossings do not obscure meaning.
  • Theme contrast: the light variant reads cleanly on #ffffff, and the dark variant reads cleanly on #0d1117.
  • Icon clarity: AWS or other service icons remain recognizable and are not muddied by hatching or stroke noise.
  • Hand-drawn balance: the diagram feels organic, but not shaky, fuzzy, or visually exhausting.
  • Fill control: fills and hatching add texture without overpowering text, icons, or edge direction.
  • Visual consistency: light and dark variants feel like the same diagram, not two different layouts or densities.

Use a simple decision per preview:

  • pass: no change needed
  • adjust: structurally correct, but visual tuning is still needed
  • fail: layout or readability is not acceptable

Iterative Tuning Loop

When visual inspection finds problems:

  1. Change only one or two rough parameters at a time.
  2. Re-render the SVGs.
  3. Re-rasterize both light and dark previews.
  4. Re-run the visual inspection on both themes.
  5. Stop once the rubric passes, or simplify the diagram structure if tuning alone is no longer helping.

Prefer two or three small iterations over one large uncontrolled change.

Symptom-driven parameter guide:

  • Too noisy or shaky:

- lower roughness - lower bowing - consider disableMultiStroke: true - consider preserveVertices: true

  • Hatching is too dense or text/icons feel muddy:

- increase hachureGap - lower fillWeight - consider fillStyle: solid for icon-heavy architecture diagrams

  • Diagram feels too sterile or over-clean:

- increase roughness slightly - increase bowing slightly - decrease hachureGap slightly if fill texture is too sparse

  • Same structure, but a particular seed looks awkward:

- keep the geometry the same and change seed

  • Strokes or fill lines are too faint:

- increase strokeWidth - increase fillWeight

  • Fine geometry is being distorted too much:

- lower roughness - lower bowing - enable preserveVertices

Practical defaults for iterative experiments:

  • adjust roughness in small steps such as 0.05
  • adjust fillWeight in small steps such as 0.1
  • adjust hachureGap in small steps such as 0.5
  • adjust bowing in small steps such as 0.1
  • keep seed fixed while tuning other parameters, then vary seed only after the style is close

Verification Checklist

After rendering:

  1. Confirm markdown contains <picture> blocks:
rg -n "<picture>" README.md
  1. If --keep-mermaid is expected, confirm preserved source blocks:
rg -n "data-mermint-source=\"true\"" README.md
  1. Confirm SVG assets exist and are non-empty:
ls -la svgs
  1. Rasterize both *-light.svg and *-dark.svg outputs to PNG previews on representative backgrounds.
  2. Inspect both PNGs with an image-capable model or a manual visual pass.
  3. Apply the quality rubric.
  4. If the result is only adjust, iterate with small rough-parameter changes and re-check both themes.
  5. For architecture-beta, do not accept the output just because it rendered successfully. Labels still need to be readable, icons need to stay legible, and the final layout must be usable in both themes.

Failure Recovery

  • If node --version is lower than 22, upgrade Node before running mermint.
  • If npx is unavailable, install a recent Node.js distribution that includes npm/npx.
  • If Playwright browsers are missing:
npx playwright install
  • If the error says Executable doesn't exist at.../chromium_headless_shell-<rev>/..., a generic npx playwright install may have installed the wrong browser revision for the Playwright version that mermint resolved.
  • In a local checkout, install the headless shell with the exact Playwright version from node_modules instead of relying on an unpinned CLI:
PLAYWRIGHT_VERSION=$(node -p "require('./node_modules/playwright/package.json').version")
npx --yes playwright@$PLAYWRIGHT_VERSION install chromium-headless-shell
  • If you are running mermint via npx --yes git+https://github.com/alessandrobologna/mermint.git... and still hit the same chromium_headless_shell-<rev> error, do not keep retrying an unpinned npx playwright install. Re-run with a version-pinned Playwright CLI or switch to a local checkout long enough to discover the resolved version first.
  • If verification uses rg and it is unavailable, use grep instead.
  • If PNG preview generation is needed and rsvg-convert is unavailable, try magick.
  • If both rasterizers are unavailable, open the SVG in a browser and capture screenshots instead of skipping visual review.
  • If rendering fails due to invalid source rough config, fix x-mermint.rough values in source or remove conflicting --look classic.
  • If repeated rough tuning still produces a crowded or unreadable architecture-beta layout, simplify labels and edges or switch to a less layout-fragile Mermaid diagram type.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.94%
按下载量换算37

Claude

27.99%
按下载量换算31

Cursor

20.03%
按下载量换算22

Gemini CLI

9.31%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills