agentleFS
hmj1026hmj1026/dhpk/skills/precommit/SKILL.md

precommit

Skill2 starsChanged 6 days agoMITView on GitHub

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.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use architecture and verify.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    verify

    End-to-end app testing pipeline for browser-based web apps on cloud browsers via Azure Playwright Workspaces: verify the live app, author tests for working flows, heal failing tests, then re-run with video and produce one consolidated report. Three phases (app verification, test authoring, test healing) plus a scoped final sanity run; each phase emits a sub-report. Use when asked to "verify my app", "make sure my app works and has good test coverage", "do a full QA pass", "add tests where I'm missing coverage", "fix failing tests and add new ones", "smoke test before deploy", "QA my deployment", or any combined verify-and-test ask. Requires Azure CLI (`az login`) and a Playwright Workspace resource ID — bootstraps configs on first invocation. Browser-based web apps with Playwright only — not for unit/API tests, native mobile/desktop, load/perf, or full accessibility audits.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run from the consumer repository.

    line 21
  2. Distinctive:

    When using the changed-file report for handoff, apply the kernel's Evidence snapshots rule to verification and review evidence.

    line 49

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Precommit

Workflow

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

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

With --dry-run, append that flag to preview the selected stages, commands, and working directories. The runner performs read-only repository discovery and stops before executing checks or writing cache/log files. DRY_RUN is a plan, not verification evidence. Fast mode omits build; its test selection can still fall back to the complete test script. Preview unfamiliar configurations before choosing an execution checkpoint.

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. If checks live in subprojects or do not use root package.json scripts, configure them in the repository-root precommit.config.json. Configured commands run directly from their declared working directories. Read references/workflow.md for the terminal boundary.

When using the changed-file report for handoff, apply the kernel's Evidence snapshots rule to verification and review evidence.

When NOT to Use

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

Output

For a preview, return the runner's DRY_RUN plan and retain its unexecuted state. For execution, return the runner output, changed-file report, and its final PASS, FAIL, or UNSUPPORTED verdict. A missing runner is UNAVAILABLE; a runner crash or failed check is FAIL. An UNSUPPORTED verdict means no Git repository or executable checks were available and exits non-zero; 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.
  • A requested dry run listed the selected commands without stage/cache writes and was reported as a plan rather than a check result.
  • Runner-owned stage order, skips, changed files, and verdict are intact.
  • summary.json overallStatus and the final Markdown verdict agree; FAIL and UNSUPPORTED remain terminal when the CLI exits zero.
  • Non-zero exit or missing final verdict remains a failure.

References

  • references/workflow.md — mode mapping, $SKILL_DIR resolution, runner ownership, and failure handling.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.