From sd0x-dev-flow
Generates customized precommit runner scripts for Node.js (npm/yarn/pnpm), Python, Rust, Go ecosystems by detecting project manifests. Use for non-Node projects, ejecting generic runners, or project customization.
npx claudepluginhub sd0xdev/sd0x-dev-flow --plugin sd0x-dev-flowThis skill is limited to using the following tools:
- Keywords: generate runner, create runner, custom runner, eject runner, runner for python, runner for rust, runner for go
Runs full pre-commit checks: lint-fix, build, test across Node.js, Python, Rust, Go, Java, Ruby projects. Use for quality gates on precommit, lint and test triggers.
Installs git pre-commit hooks for commit-time formatting, linting, type-checking, and tests, auto-detecting ecosystem (Node/husky-lint-staged, Python/OCaml/pre-commit, Go/lefthook, Rust/cargo-husky).
Sets up Git hooks with Husky, lint-staged, pre-commit framework, and commitlint to automate linting, formatting, testing, and commit message validation before CI.
Share bugs, ideas, or general feedback.
| Need | Use Instead |
|---|---|
| Run precommit checks | /precommit or /precommit-fast |
| Install existing runner | /project-setup (auto-installs) |
| Configure lint globs | Edit .claude/runner-config.json |
flowchart LR
A[Detect Ecosystem] --> B[Select Template]
B --> C[Customize]
C --> D[Write Runner]
D --> E[Verify]
Scan project root for manifest files:
| Manifest | Ecosystem | Template ID |
|---|---|---|
pnpm-lock.yaml | Node.js (pnpm) | node-pnpm |
yarn.lock | Node.js (yarn) | node-yarn |
package-lock.json or package.json | Node.js (npm) | node-npm |
pyproject.toml | Python | python |
Cargo.toml | Rust | rust |
go.mod | Go | go |
If multiple detected, prefer Node.js > Python > Rust > Go. If none detected, ask user.
Load template from references/templates.md for the detected ecosystem.
Read project-specific configuration:
| Source | What |
|---|---|
package.json scripts | Lint command, test command, build command |
.claude/runner-config.json | Custom lint globs (if exists) |
| Lock file | Package manager selection |
Write to .claude/scripts/precommit-runner.js (Node) or .claude/scripts/precommit-runner.sh (non-Node).
Include eject header:
@generated_at <ISO 8601>
@plugin_version <current version>
@template <template-id>
@ecosystem <ecosystem>
Conflict handling: If target file exists, AskUserQuestion with diff preview.
chmod +x)| Argument | Description | Default |
|---|---|---|
--ecosystem <name> | Force ecosystem (skip detection) | auto-detect |
--output <path> | Custom output path | .claude/scripts/precommit-runner.js |
--force | Overwrite existing without asking | off |
## Generated Runner
- Ecosystem: <detected>
- Template: <template-id>
- Output: <path>
- Package manager: <pm>
The generated runner is **user-owned** — plugin updates will not overwrite it.
Edit freely to customize for your project.
references/templates.mdInput: /generate-runner
Action: Detect Node.js (yarn) → load node-yarn template → customize → write .claude/scripts/precommit-runner.js
Input: /generate-runner --ecosystem python
Action: Load python template → customize → write .claude/scripts/precommit-runner.sh
Input: /generate-runner --force
Action: Detect ecosystem → overwrite existing runner without asking