Command Palette

Search for a command to run...

Назад к скиллам
скилл № 40739

Format Markdown

Run markdownlint-cli2 consistently using the repository's wrapper script to lint and auto-fix markdown files.

БесплатноБез исполняемых скриптов
CERTCCот CERTCC★ 22 звезды на GitHub

Установить Format Markdown в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Skill: Format Markdown with markdownlint-cli2

Purpose

Ensure consistent markdown formatting and linting across the repository using
markdownlint-cli2. Prefer invoking the tool directly with the repository's
configuration file (.markdownlint-cli2.yaml) so behavior is explicit and
consistent. The repository also includes a legacy wrapper script (mdlint.sh)
which is retained as an alternative for environments that rely on it.

Inputs

  • repo_root (string, default .): repository root where the command should
    be executed.

Outputs

  • lint_summary (string): machine- and human-readable summary printed to
    stdout/stderr (exit status indicates success/failure).

Procedure

  1. From the repository root (or repo_root), run the linter directly using the
    project config on the Markdown files you changed (preferred):
markdownlint-cli2 --fix --config .markdownlint-cli2.yaml notes/x.md docs/y.md
  1. The wrapper ./mdlint.sh is an alternative; pre-commit does not need it
    (the hook invokes markdownlint-cli2 directly). Pass it the same files:
    ./mdlint.sh notes/x.md lints and fixes only those. With no arguments it
    lints every Markdown file in the checkout, which is rarely what a task needs.
    Both forms skip .claude/worktrees/ and every plan/history/ (#6232).

  2. Inspect the output. The wrapper attempts to auto-fix problems. If linting
    still reports failures, address them manually and re-run the command.

Constraints / Rules

  • Prefer invoking markdownlint-cli2 directly with --config .markdownlint-cli2.yaml.
  • The wrapper ./mdlint.sh remains available as an alternative for legacy
    environments.
  • Do NOT run markdownlint across generated or dependency directories unless
    your configuration deliberately includes them. The repository config file
    contains the canonical ignore patterns.
  • Commit any formatting changes produced by the linter before running other
    commit-time checks.

Examples

# preferred (direct, uses .markdownlint-cli2.yaml), on the changed files
markdownlint-cli2 --fix --config .markdownlint-cli2.yaml notes/x.md

# alternative (wrapper), same files
./mdlint.sh notes/x.md

# whole checkout (wrapper with no arguments)
./mdlint.sh

Rationale

Centralizing markdown linting on .markdownlint-cli2.yaml ensures the same
config and exclusions are used by maintainers, CI, and automation; CI and the
pre-commit hook call markdownlint-cli2 directly, and mdlint.sh adds the
same exclusions. Including this SKILL
makes the capability discoverable by agents and documents the canonical
command for formatting markdown.

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Format Markdown?

Run markdownlint-cli2 consistently using the repository's wrapper script to lint and auto-fix markdown files.

Как установить скилл Format Markdown?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Format Markdown запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Format Markdown с