CowboyLogic/ai-dev / skills/markdownlint-validator
markdownlint-validator
VerifiedGuide for identifying and fixing markdownlint violations in Markdown files. Use this skill whenever asked to fix markdown linting errors, validate markdown files, resolve markdownlint violations, clean up markdown formatting issues, enforce markdown style rules, or correct any MD### rule failures. Always load this skill when working with .markdownlint config files or markdownlint-cli output.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.2 KB |
| SKILL.md | skill md | 4.6 KB |
| references/config.md | markdown | 5.9 KB |
| references/rules.md | markdown | 9.7 KB |
| scripts/validate.sh | script | 2.5 KB |
scripts/validate.sh
View on GitHub#!/usr/bin/env bash
# validate.sh — Run markdownlint-cli against one or more paths
#
# Usage:
# bash validate.sh # lint all .md files in current directory
# bash validate.sh docs/ # lint all .md files under docs/
# bash validate.sh docs/index.md # lint a single file
# bash validate.sh --fix docs/ # auto-fix where possible
# bash validate.sh --strict docs/ # error on any violation (non-zero exit)
#
# Requirements: markdownlint-cli (npm install -g markdownlint-cli)
# Config: nearest .markdownlint.json (or .yaml/.yml) is used automatically
set -euo pipefail
# ── Args ──────────────────────────────────────────────────────────────────────
FIX=false
STRICT=false
TARGETS=()
for arg in "$@"; do
case "$arg" in
--fix) FIX=true ;;
--strict) STRICT=true ;;
*) TARGETS+=("$arg") ;;
esac
done
# Default target if none given
if [[ ${#TARGETS[@]} -eq 0 ]]; then
TARGETS=(".")
fi
# ── Dependency check ──────────────────────────────────────────────────────────
if ! command -v markdownlint &>/dev/null; then
echo "ERROR: markdownlint-cli not found."
echo " Install: npm install -g markdownlint-cli"
echo " Or use: npx markdownlint-cli"
exit 1
fi
# ── Build glob pattern from targets ───────────────────────────────────────────
GLOBS=()
for target in "${TARGETS[@]}"; do
if [[ -f "$target" ]]; then
GLOBS+=("$target")
elif [[ -d "$target" ]]; then
GLOBS+=("${target%/}/**/*.md")
else
# Treat as glob directly
GLOBS+=("$target")
fi
done
# ── Run ───────────────────────────────────────────────────────────────────────
CMD=(markdownlint)
if [[ "$FIX" == "true" ]]; then
CMD+=(--fix)
fi
CMD+=("${GLOBS[@]}")
echo "Running: ${CMD[*]}"
echo ""
if "$STRICT"; then
# --strict: exit non-zero on any violation (default markdownlint behavior)
"${CMD[@]}"
else
# Soft mode: show violations but exit 0 so CI can choose how to handle
"${CMD[@]}" || true
fi
echo ""
echo "Done. Fix remaining violations manually or run with --fix."
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |