一键导入
lint-markdown
Check and fix formatting and other issues in markdown files using markdownlint-cli2
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check and fix formatting and other issues in markdown files using markdownlint-cli2
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run when adding or updating GitHub Actions workflow steps. Pin every action to a commit SHA with the resolved version tag as a trailing comment.
Use when creating, updating, or reviewing Vally evals for plugin skills. Covers eval.yaml, fixtures, graders, expect_skills, suites, tags, and eval coverage for new or changed skills.
Check and fix spelling in project source files using cSpell
基于 SOC 职业分类
| name | lint-markdown |
| description | Check and fix formatting and other issues in markdown files using markdownlint-cli2 |
Check markdown files for common mistakes.
Search for a package.json in the current working directory and each ancestor directory up to and including the repository root.
If an ancestor package.json has markdownlint-cli2 in devDependencies, run npm install from that package.json directory to install it, then run npx markdownlint-cli2 <command> from the current working directory.
If no ancestor package.json contains markdownlint-cli2 in devDependencies, run npx -y markdownlint-cli2 <command> from the current working directory instead. Do not add markdownlint-cli2 to any package.json or install it permanently.
markdownlint-cli2 configuration including custom rules can be found in files:
.markdownlint-cli2.json.markdownlint-cli2.yaml.markdownlint-cli2.ymlIf a suitable configuration is not found, create a .markdownlint-cli2.yaml file in the root of the repository.
The configuration file schema is described at https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v<version>/schema/markdownlint-cli2-config-schema.json where <version> should match the markdownlint-cli2 version from the ancestor package.json devDependencies (e.g., v0.20.0). If no ancestor package.json contains markdownlint-cli2 in devDependencies, use https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/main/schema/markdownlint-cli2-config-schema.json.
Always include the schema URI in the $schema field.
For markdownlint rules configuration, nest it under the config property following the markdownlint schema at https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json.
If not already present, add a globs array with file patterns to lint (e.g., ["**/*.md"]) so no command-line arguments are needed.
By default, check only markdown files changed since the last commit:
npx markdownlint-cli2 --no-globs $(git diff --name-only --diff-filter=d HEAD -- '*.md' '*.markdown')
--no-globs prevents falling back to config globs when no files match.
To check all files (when explicitly asked):
npx markdownlint-cli2
By default, fix only markdown files changed since the last commit:
npx markdownlint-cli2 --no-globs --fix $(git diff --name-only --diff-filter=d HEAD -- '*.md' '*.markdown')
To fix all files (when explicitly asked):
npx markdownlint-cli2 --fix
Unfixable issues: show the output to the user and ask what to do.
Run the same check command again to verify all issues are fixed. There should be no errors reported.