From sd0x-dev-flow
Runs pre-commit checks in the order: lint:fix, build, test. Supports multiple ecosystems (Node.js, Python, Rust, Go, Java, Ruby) by detecting project files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sd0x-dev-flow:precommitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Keywords: precommit, pre-commit, lint and test, quality gate
/precommit-fast)/verify)| Step | Goal | Safety | Skip if Missing |
|---|---|---|---|
| lint-fix | Auto-fix code style issues | read-write | yes |
| build | Verify compilation succeeds | read-only | yes |
| test-unit | Run full test suite | read-only | yes |
Failure behavior: continue-all (run all steps, report all results)
Run pre-commit checks: lint:fix -> build -> test
Use Glob to check if .claude/scripts/precommit-runner.js exists in the project root.
node .claude/scripts/precommit-runner.js --mode full --tail 80
Detect the project ecosystem to run steps manually.
Ecosystem detection:
| Manifest | Ecosystem | Lint-fix | Build | Test |
|---|---|---|---|---|
package.json | Node.js | {pm} lint:fix | {pm} build | {pm} test:ci / test / test:fast / test:unit |
pyproject.toml | Python | ruff check --fix . | — | pytest tests/unit/ |
Cargo.toml | Rust | cargo clippy --fix | cargo build | cargo test |
go.mod | Go | golangci-lint run --fix | go build ./... | go test ./... |
build.gradle | Java (Gradle) | ./gradlew spotlessApply | ./gradlew build | ./gradlew test |
pom.xml | Java (Maven) | mvn spotless:apply | mvn compile | mvn test |
Gemfile | Ruby | bundle exec rubocop -a | — | bundle exec rspec |
For Node.js projects, auto-detect package manager from lockfile.
| Step | package.json script | If missing |
|---|---|---|
| lint:fix | lint:fix | Skip with note |
| build | build | Skip with note |
| test | test:ci → test → test:fast → test:unit | Skip with note |
After lint:fix completes, run git diff --name-only to capture auto-fixed files.
## Precommit (full)
## Results
| Step | Status | Notes |
|------|--------|-------|
| lint:fix | ✅/❌/⏭️ | skipped if no script |
| build | ✅/❌/⏭️ | skipped if no script |
| test | ✅/❌/⏭️ | skipped if no script |
## Changed Files (after lint:fix)
- <files or "(none)">
## Overall: ✅ PASS / ❌ FAIL
## Checklist
- [ ] All available checks pass
- [ ] git status reviewed
npx claudepluginhub sd0xdev/sd0x-dev-flow --plugin sd0x-dev-flowRuns quick pre-commit checks: auto-fix linting issues then run fast tests. Detects Node.js, Python, Rust, Go, Java, Ruby ecosystems and uses their native tools.
Detects and runs linters, formatters, type checkers from configs before commits/PRs. Supports JS/TS, Python, Go, Rust; auto-fixes on staged files.
Configures pre-commit hooks for linting, formatting, type checking, and testing in Python, Rust, and TypeScript projects to enforce quality gates on commits, ideal for monorepos.