feat: add .pre-commit-config.yaml mirroring CI checks#31
Conversation
Wires netresearch/skill-repo-skill@v1.22.0 as a pre-commit hook provider so validate-skill, check-version-parity, and the standard linter set (markdownlint-cli2, yamllint, actionlint, ruff, shellcheck) run locally before commit instead of only in CI. - package.json scripts.prepare: invokes pre-commit install --install-hooks if pre-commit is on PATH; silent no-op otherwise. Auto-activates hooks on `npm install`. Part of the fleet rollout following netresearch/agent-harness-skill#27 (CI/Hook Parity Principle) and skill-repo-skill v1.22.0 (hook exposure). Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR introduces a local pre-commit setup intended to mirror the repository’s CI validation/lint checks (via netresearch/skill-repo-skill), so contributors can catch issues before pushing.
Changes:
- Add a
.pre-commit-config.yamlwiring the standard NR hook set (validate-skill, version parity, markdown/yaml/action linting, ruff, shellcheck, plus pre-commit-hooks basics). - Add an npm
preparescript that opportunistically installspre-commithooks whenpre-commitis available.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
package.json |
Adds a prepare script to auto-install pre-commit hooks during npm lifecycle. |
.pre-commit-config.yaml |
Introduces pinned, Renovate-bumpable pre-commit hook configuration mirroring CI checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a .pre-commit-config.yaml file to enforce various linting and validation hooks, along with a prepare script in package.json for automatic installation. Feedback indicates that several hook versions (pre-commit-hooks, markdownlint-cli2, yamllint, and ruff) are set to non-existent versions and must be downgraded to stable releases. Additionally, the yamllint configuration references a missing file, and the prepare script should be optimized by removing the --install-hooks flag to improve installation performance.



Summary
Wires
netresearch/skill-repo-skill@v1.22.0as a pre-commit hook provider sovalidate-skill,check-version-parity, plus markdownlint-cli2 / yamllint / actionlint / ruff / shellcheck run locally before commit.Part of the fleet rollout following the CI/Hook Parity Principle in netresearch/agent-harness-skill#27. Pilot phase (skill-repo-skill#109, go-development-skill#34, security-audit-skill#71, php-modernization-skill#57) validated the template across with/without yamllint and with/without package.json configurations.
Files
.pre-commit-config.yaml— standard NR skill-repo hook set (pre-commit-hooks meta, validate-skill, check-version-parity, markdownlint-cli2, yamllint, actionlint, ruff, shellcheck)