Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

markdownlintmarkdownlint 控制

Agent Skill

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

总安装

665

周安装

28

GitHub Stars

公开资料未说明

下载量

233
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/perdolique/workflow --skill markdownlint

简介

markdownlint 用于 Markdown 文件的语法检查和格式规范控制。

  • 适合在开发流程中自动检测缩进、标点、标题层级等格式问题。
  • 可集成到 CI/CD 流程中,确保文档风格一致性和可读性。
  • 通过 npx skills add 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。
  • 建议结合项目现有配置使用,避免规则冲突或误报。

SKILL.md

Package manager detection

Before any operation, detect which package manager the project uses:

  1. Check for lock files:

- pnpm-lock.yaml → use pnpm - yarn.lock → use yarn - package-lock.json → use npm - bun.lockb → use bun

  1. Check packageManager field in package.json: "packageManager": "pnpm@8.0.0"
  2. If no indicators, ask the user which package manager they prefer

Throughout this skill, commands use pnpm as examples. Replace with the detected package manager:

  • pnpm add -Dnpm install --save-dev / yarn add -D / bun add -d
  • pnpm runnpm run / yarn run / bun run
  • pnpm installnpm install / yarn install / bun install

Operation selection guide

Identify what the user needs and read the appropriate reference file:

- First time installation - Creating config files (.markdownlint.yaml,.markdownlintignore) - Adding npm scripts - Adding verification to AGENTS.md - Husky integration

- Enabling/disabling specific rules - Configuring rule options (heading-style, ul-style, etc.) - Understanding rule names and codes (MD###)

- Adding files/folders to.markdownlintignore - Gitignore-style pattern syntax - Verifying ignored files

- Understanding error messages - Auto-fix with --fix flag - Common violations (MD009, MD012, MD022, MD040, etc.) - Manual fixes for specific errors

- Updating npm scripts - Modifying Husky hooks - CI/CD integration (GitHub Actions, GitLab CI) - VS Code extension setup

- Too many errors - Files not being checked - Hook failures - Module not found errors - Performance issues

Quick reference: Common commands

# Install
pnpm add -D markdownlint markdownlint-cli

# Run linting
pnpm run lint:markdown

# Auto-fix issues
markdownlint '**/*.md' --fix

# Lint specific file
markdownlint README.md

# Lint specific directory
markdownlint 'docs/**/*.md'

Quick reference: Config file basics

.markdownlint.yaml in project root:

$schema: ./node_modules/markdownlint/schema/markdownlint-config-schema.json

# Disable a rule
line-length: false

# Enable a rule
no-duplicate-heading: true

# Configure a rule
heading-style:
  style: "atx"

.markdownlintignore in project root (gitignore syntax):

node_modules
dist/
build/
CHANGELOG.md

Key examples

Example 1: Basic setup

User: "Add markdownlint to my project"

Action: Read references/setup.md and follow Steps 1-9 for complete initial setup.

Example 2: Disable annoying rule

User: "Stop complaining about duplicate headings"

Action: Read references/rules.md → Removing rules section. Add no-duplicate-heading: false to .markdownlint.yaml.

Example 3: Fix many errors

User: "I have 50 markdown errors, fix them"

Action: Read references/fixing.md → Auto-fixing section. Run markdownlint '**/*.md' --fix, show diff, handle remaining errors.

Example 4: Ignore folder

User: "Don't lint the dist folder"

Action: Read references/ignoring.md. Add dist/ to .markdownlintignore.

Example 5: Add to CI

User: "Add markdown linting to GitHub Actions"

Action: Read references/integration.mdtions"

Action: Read references/integration.md → CI integration section. Create workflow file with pnpm setup and linting step.

Progressive workflow

For complex requests that span multiple operations:

  1. Start with the main operation - Read the primary reference file first
  2. Chain related operations - Read additional reference files as needed
  3. Verify each step - Run commands to confirm changes work
  4. Document what was done - Summarize changes for the user

Example: "Set up markdownlint with strict rules and CI"

When to use which reference

User mentions installation, setup, "add markdownlint":references/setup.md

User mentions specific rules, MD codes, enabling/disabling:references/rules.md

User mentions ignoring files, excluding folders:references/ignoring.md

User has errors and wants to fix them:references/fixing.md

User mentions npm scripts, husky, pre-commit, CI, GitHub Actions:references/integration.md

User reports issues, things not working, errors:references/troubleshooting.md

Default configuration philosophy

When setting up markdownlint, use this opinionated default configuration:

$schema: ./node_modules/markdownlint/schema/markdownlint-config-schema.json

line-length: false # Modern editors handle wrapping

Rationale: Start permissive, enable rules gradually. The line-length rule is disabled by default because:

  • Modern editors and viewers handle text wrapping automatically
  • Fixed line length creates unnecessary friction in most projects
  • Semantic issues are more valuable to catch than presentation issues

Only add more rules if user explicitly requests them or if the project needs stricter validation.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.76%
按下载量换算83

Claude

30.48%
按下载量换算71

Cursor

20.61%
按下载量换算48

Gemini CLI

9.75%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills