Format markdown

From CERTCC/Vultron · View interactive version

Format markdown is an AI agent skill from the GitHub repository CERTCC/Vultron. Run markdownlint-cli2 consistently using the repository's wrapper script to lint and auto-fix markdown files.

How to use this skill

Skill file

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

be executed.

Outputs

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).

  1. 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

environments.

your configuration deliberately includes them. The repository config file

contains the canonical ignore patterns.

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.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.