Files
David Karlsson 8571e1b322 agents: hoist lint.sh to scripts/ for cross-skill use
The lint script was buried in the write skill's scripts directory, so
only agents that invoked that specific skill discovered it. Move it to
the repo-level scripts/ directory and reference it from AGENTS.md so
every agent session sees the recommended workflow.

- scripts/lint.sh: scoped markdownlint + vale on changed files
- AGENTS.md Commands and Verification loop now point here
- write skill SKILL.md updated to use the new path
- post-edit.sh stays in the skill (it's a PostToolUse hook tied to that
  skill's lifecycle)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 12:40:03 +02:00

28 lines
488 B
Bash
Executable File

#!/bin/bash
# Run markdownlint and vale on specific files.
# Usage: scripts/lint.sh <file> [file...]
#
# Scoped output — no repo-wide noise. For full repo validation, use:
# docker buildx bake validate
set -uo pipefail
if [ $# -eq 0 ]; then
echo "Usage: $0 <file> [file...]" >&2
exit 1
fi
exit_code=0
echo "=== markdownlint ==="
if ! npx markdownlint-cli "$@" 2>&1; then
exit_code=1
fi
echo ""
echo "=== vale ==="
if ! vale "$@" 2>&1; then
exit_code=1
fi
exit $exit_code