Agent skill

Precommit Fast

by sd0xdev in sd0xdev/sd0x-harness

Quick pre-commit checks — lint:fix - test. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check passedDevelopment

Install Precommit Fast

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill precommit-fast -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness precommit-fast --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/precommit-fast .claude/skills/precommit-fast && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
precommit-fast
GitHub stars
192
Token cost
~1.4k tokens
SKILL.md length
554 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Quick pre-commit checks — lint:fix - test. An agent skill from sd0xdev/sd0x-harness.

  • Works in 2 steps: Check for runner script → Fallback (no runner script)
  • Tasks that involve Linting and formatting
  • SKILL.md covers Trigger, When NOT to Use, Workflow Steps and Task, plus 1 more section
  • Calls node, cargo and mvn

What it does

Precommit Fast is an agent skill from sd0xdev/sd0x-harness. Quick pre-commit checks — lint:fix - test

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/precommit-fast”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): Bash(node:*), Bash(pnpm:*), Bash(yarn:*), Bash(npm:*), Bash(npx:*), Bash(python*:*), Bash(pytest:*), Bash(ruff:*), Bash(mypy:*), Bash(cargo:*), Bash(go:*), Bash(golangci-lint:*), Bash(./gradlew:*), Bash(mvn:*), Bash(bundle:*), Bash(rubocop:*), Bash(rspec:*), Bash(git:*), Read, Grep, Glob

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Check for runner script
  2. Fallback (no runner script)

What it can do on your machine

Read from SKILL.md and the folder at commit a4d4bc1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(node:*)
    • Bash(pnpm:*)
    • Bash(yarn:*)
    • Bash(npm:*)
    • Bash(npx:*)
    • Bash(python*:*)
    • Bash(pytest:*)
    • Bash(ruff:*)
    • Bash(mypy:*)
    • Bash(cargo:*)

    …and 11 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • cargo
    • mvn
    • bundle
    • ruff
    • pytest
    • go
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Precommit Fast loads about 1.4k tokens when it runs. Until then it costs about 14 tokens; SKILL.md has 554 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~14
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit a4d4bc1, republished under its MIT licence (© sd0xdev). 554 words, ~1,386 tokens.

Download SKILL.mdSave it as .claude/skills/precommit-fast/SKILL.md (or your agent's skills folder).
name
precommit-fast
description
Quick pre-commit checks — lint:fix -> test
allowed-tools
Bash(node:*), Bash(pnpm:*), Bash(yarn:*), Bash(npm:*), Bash(npx:*), Bash(python*:*), Bash(pytest:*), Bash(ruff:*), Bash(mypy:*), Bash(cargo:*), Bash(go:*), Bash(golangci-lint:*), Bash(./gradlew:*), Bash(mvn:*), Bash(bundle:*), Bash(rubocop:*), Bash(rspec:*), Bash(git:*), Read, Grep, Glob

Pre-Commit Checks (Fast)

Trigger

  • Keywords: precommit fast, quick precommit, lint and test, precommit-fast

When NOT to Use

  • Full precommit with build step (use /precommit)
  • Verification loop (use /verify)
  • Just running tests (run directly)

Workflow Steps

StepGoalSafetySkip if Missing
lint-fixAuto-fix code style issuesread-writeyes
test-unitRun fast test suiteread-onlyyes

Failure behavior: continue-all (run all steps, report all results)

Task

Run quick pre-commit checks: lint:fix -> test (no build step)

Step 1: Check for runner script

Use Glob to check if .claude/scripts/precommit-runner.js exists in the project root.

  • Found → run: node .claude/scripts/precommit-runner.js --mode fast --tail 60
    • If runner emits ## Overall: ✅ PASS, use its output and skip to the Output section.
    • If runner emits ## Overall: ⚠️ NO CHECKS RUN, do NOT treat it as a pass — fall through to Step 2 ecosystem detection to run the project's real checks. The marker means no project validation executed and no policy step failed (validation steps all skipped or unavailable; a policy step that FAILS is ❌ FAIL, never this marker) — whether the repo declares no runnable checks or the required tools were unavailable to the runner (which orchestrates the ecosystem table below itself: manifest detection + first-class steps). The runner self-notes its own verdict (review-state.js note precommit pass|fail); on ⚠️ NO CHECKS RUN it notes nothing — the slot is untouched and the reminder persists, which is the correct reading of "nothing validated".
    • If runner fails (## Overall: ❌ FAIL), treat as a real precommit failure (do not silently fallback).
  • NOT found → Auto-install attempt:
    1. Manifest gate: Use Glob to check if any known manifest exists (package.json, pyproject.toml, Cargo.toml, go.mod, build.gradle, build.gradle.kts, pom.xml, Gemfile). None → skip, fall through to Step 2. (The runner orchestrates every ecosystem in the Step 2 table, so a non-Node manifest justifies the install just as well.)
    2. Locate plugin scripts: 3-level Glob fallback (short-circuit on first match):
      • Glob: ~/.claude/plugins/**/sd0x-dev-flow/scripts/precommit-runner.js
      • Glob: ${REPO_ROOT}/node_modules/sd0x-dev-flow/scripts/precommit-runner.js
      • Plugin-relative: try reading @scripts/precommit-runner.js
    3. Plugin not found → fall through to Step 2.
    4. Plugin found → copy runner + lib/utils.js + review-state.js + lib/tree-digest.js (skip on conflict) → run. The checker pair is the runner's self-note dependency — without it the runner still runs every check and reports; only the advisory note is skipped, loudly.
Show full SKILL.md (195 more words)Show less
Step 2: Fallback (no runner script)

Detect the project ecosystem to run steps manually.

ManifestEcosystemLint-fixTest
package.jsonNode.js{pm} lint:fix{pm} test:fast / test:unit / test
pyproject.tomlPythonruff check --fix .pytest tests/unit/
Cargo.tomlRustcargo clippy --fixcargo test
go.modGogolangci-lint run --fixgo test ./...
build.gradle / build.gradle.ktsJava./gradlew spotlessApply./gradlew test
pom.xmlJava (Maven)mvn spotless:applymvn test
GemfileRubybundle exec rubocop -abundle exec rspec

How the runner executes this table: same semantics as skills/precommit/SKILL.md § Ecosystem detection — a missing required tool is unavailable and blocks ✅ PASS; repo-declared capabilities (spotless / rubocop / rspec) skip only on definitive tool-native absence evidence (lockfile membership, the tool's own not-found diagnostic); an ambiguous or timed-out probe is unavailable, never a skip.

After lint:fix completes, run git diff --name-only to capture auto-fixed files.

After a conclusive fallback run, self-note the outcome — note precommit pass when every executed check passed, note precommit fail when the checks ran and at least one failed (the rounds count stays path-independent):

bash
CHECKER=".claude/scripts/review-state.js"; [ -f "$CHECKER" ] || CHECKER="scripts/review-state.js"
node "$CHECKER" note precommit pass   # or fail

An inconclusive run (checks could not execute) notes nothing — the slot stays untouched, like the runner's ⚠️ NO CHECKS RUN. The note is advisory; a failed note never fails the run.

Output

markdown
## Precommit (fast)

## Results

| Step | Status | Notes |
|------|--------|-------|
| lint:fix | ✅/❌/⏭️/⛔ | ⏭️ = repo opted out (skip); ⛔ = required tool unavailable (blocks PASS) |
| test | ✅/❌/⏭️/⛔ | same legend |

## Changed Files (after lint:fix)

- <files or "(none)">

## Overall: ✅ PASS / ❌ FAIL / ⚠️ NO CHECKS RUN (no project validation executed AND no policy step failed; fall through to Step 2, needs human if nothing runnable exists)

## Checklist

- [ ] All available checks pass
- [ ] git status reviewed

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/precommit-fast of sd0xdev/sd0x-harness.

Open the folder on GitHubat commit a4d4bc1

Compare with similar skills

Precommit Fast next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Precommit Fast compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Precommit Fast this skillsd0xdev/sd0x-harness192—~1.4kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k1 repos~2.2kAutomated safety check: PassMIT
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 89 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Categories

Questions about Precommit Fast

What does Precommit Fast do?

Quick pre-commit checks — lint:fix - test. An agent skill from sd0xdev/sd0x-harness. Precommit Fast is an agent skill from sd0xdev/sd0x-harness.

When should I use Precommit Fast?

Precommit Fast fits situations like: tasks that involve Linting and formatting.

How do I install Precommit Fast in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill precommit-fast -a claude-code`. Or copy the skill folder (skills/precommit-fast in sd0xdev/sd0x-harness) into .claude/skills/precommit-fast in your project. Claude Code loads it when a task matches its description.

How do I install Precommit Fast in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill precommit-fast -a codex`. Or copy the skill folder (skills/precommit-fast in sd0xdev/sd0x-harness) into .agents/skills/precommit-fast in your project. Codex loads it when a task matches its description.

Can I use Precommit Fast in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill precommit-fast -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/precommit-fast, .gemini/skills/precommit-fast, .github/skills/precommit-fast and .opencode/skills/precommit-fast in your project.

What does Precommit Fast need to run?

Going by SKILL.md and its folder, Precommit Fast needs the command-line tools its instructions call (node, cargo, mvn, bundle, ruff and pytest). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Bash(node:*), Bash(pnpm:*), Bash(yarn:*), Bash(npm:*), Bash(npx:*), Bash(python*:*), Bash(pytest:*), Bash(ruff:*), Bash(mypy:*), Bash(cargo:*), Bash(go:*), Bash(golangci-lint:*), Bash(./gradlew:*), Bash(mvn:*), Bash(bundle:*), Bash(rubocop:*), Bash(rspec:*), Bash(git:*), Read, Grep, Glob.

Does Precommit Fast access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Precommit Fast safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Precommit Fast use?

Precommit Fast is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Precommit Fast use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Precommit Fast?

Skills that share tags, products or a category with Precommit Fast: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Summarise Ecosystem Results (astral-sh/ruff, 50k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars) and Babysit PR To Pass CI (sgl-project/sglang, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Precommit Fast?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.