Skip to content

feat: add .pre-commit-config.yaml mirroring CI checks#31

Merged
CybotTM merged 1 commit into
mainfrom
feat/precommit-config
May 23, 2026
Merged

feat: add .pre-commit-config.yaml mirroring CI checks#31
CybotTM merged 1 commit into
mainfrom
feat/precommit-config

Conversation

@CybotTM

@CybotTM CybotTM commented May 23, 2026

Copy link
Copy Markdown
Member

Summary

Wires netresearch/skill-repo-skill@v1.22.0 as a pre-commit hook provider so validate-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)

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>
Copilot AI review requested due to automatic review settings May 23, 2026 05:53
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml wiring the standard NR hook set (validate-skill, version parity, markdown/yaml/action linting, ruff, shellcheck, plus pre-commit-hooks basics).
  • Add an npm prepare script that opportunistically installs pre-commit hooks when pre-commit is 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.

Comment thread package.json

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
Comment thread package.json
@CybotTM CybotTM merged commit 29ac04e into main May 23, 2026
18 checks passed
@CybotTM CybotTM deleted the feat/precommit-config branch May 23, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants