Skip to content
Back to skills

Precommit

ASecurity

Run the deterministic pre-commit pipeline in fast or full mode through the packaged runner. Use when handing off repository changes. Not for: ad hoc replacement checks, dependency audits, or read-only verification. Output: runner-owned changed-file reporting and final verdict.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 24, 2026
ai-agentsbashnodesecurity

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 24, 2026

npx -y skills add hmj1026/dhpk --skill precommit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Precommit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Precommit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hmj1026-precommit-ded79028/badge)](https://www.skillsdirectory.com/skills/hmj1026-precommit-ded79028)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: precommit
description: "Run the deterministic pre-commit pipeline in fast or full mode through the packaged runner. Use when handing off repository changes. Not for: ad hoc replacement checks, dependency audits, or read-only verification. Output: runner-owned changed-file reporting and final verdict."
metadata:
  dhpk-invocation-class: "implicit-eligible"
---

# Precommit

## Workflow

Run from the consumer repository. Resolve `--fast` to fast mode and no flag to
full mode, then invoke the package-local runner:

```bash
node "$SKILL_DIR/scripts/precommit-runner.js" --mode <fast|full> --tail 80
```

Here `$SKILL_DIR` is the installed directory containing this `SKILL.md`; the
current working directory remains the consumer repository. The runner and its
adjacent `$SKILL_DIR/scripts/lib/runner-utils.js` are one local runtime tree.
With the setup installer, the runner is
`.claude/dhpk/skills/precommit/scripts/precommit-runner.js`.
The runner owns ecosystem detection, package-manager selection,
`lint:fix -> build -> test:unit` ordering, graceful skips, changed-file
reporting, and the final verdict. Read
[`references/workflow.md`](references/workflow.md) for the terminal boundary.

## When NOT to Use

- A read-only verification loop is requested (use `$repo-verify`).
- Dependency security evidence or a fix operation is requested (use
  `$dep-audit`).
- A one-off command is requested outside the deterministic precommit pipeline.

## Output

Return the runner output, changed-file report, and its final `PASS`/`FAIL` or
skip evidence. A missing runner, runner crash, or non-zero exit is terminal
`UNAVAILABLE`/`FAIL`; never replace it with hand-written checks or claim a
pass from partial output.

## Verification

- [ ] Mode is exactly `fast` or `full` and the runner received `--tail 80`.
- [ ] The package-local runner ran from the consumer repository cwd.
- [ ] The local `runner-utils.js` helper resolved beside the runner.
- [ ] Runner-owned stage order, skips, changed files, and verdict are intact.
- [ ] A semantic `FAIL` (`summary.json` `overallPass=false` or the final
  Markdown verdict) remains failure even when the CLI exits zero.
- [ ] Non-zero exit or missing final verdict remains a failure.

## References

- [`references/workflow.md`](references/workflow.md) — mode mapping,
  `$SKILL_DIR` resolution, runner ownership, and failure handling.

Files in this skill

  • SKILL.md2.3 KB
  • references/workflow.md1.5 KB
  • scripts/lib/runner-utils.js8.4 KB
  • scripts/precommit-runner.js8.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.