Interactive setup for git hooks, linters, formatters, and quality tooling.
/plugin marketplace add blueraai/bluera-base/plugin install bluera-base@blueraInteractive setup for git hooks, linters, formatters, and quality tooling.
See @bluera-base/skills/repo-hardening/SKILL.md for language-specific best practices.
!ls package.json pyproject.toml requirements.txt Cargo.toml go.mod 2>/dev/null || echo "No project files detected"
Check for project files to auto-detect language:
| File | Language |
|---|---|
package.json | JavaScript/TypeScript |
pyproject.toml or requirements.txt | Python |
Cargo.toml | Rust |
go.mod | Go |
If multiple detected or none, use AskUserQuestion to clarify.
Use AskUserQuestion to determine:
Based on selections, install and configure:
# Linting
npm install -D eslint @eslint/js typescript-eslint
# Formatting
npm install -D prettier eslint-config-prettier
# Hooks
npm install -D husky lint-staged
npx husky init
Create configs from templates:
.husky/pre-commit from @bluera-base/templates/repo-hardening/husky-pre-commit.templatelint-staged.config.js from @bluera-base/templates/repo-hardening/lint-staged.config.template# Linting + Formatting
pip install ruff
# or: uv add --dev ruff
# Hooks
pip install pre-commit
pre-commit install
Create configs from templates:
.pre-commit-config.yaml from @bluera-base/templates/repo-hardening/pre-commit-config.yaml.templateAdd to pyproject.toml:
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM"]
# Components (usually already installed)
rustup component add clippy rustfmt
Create native git hook from @bluera-base/templates/repo-hardening/git-pre-commit-rust.template:
cp template .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
Add to Cargo.toml:
[lints.clippy]
all = "warn"
pedantic = "warn"
# Install golangci-lint
go install github.com/golangci-lint/golangci-lint/cmd/golangci-lint@latest
Create native git hook from @bluera-base/templates/repo-hardening/git-pre-commit-go.template:
cp template .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
Create .golangci.yml with recommended linters.
If selected, create:
.editorconfig from @bluera-base/templates/repo-hardening/editorconfig.template
.gitattributes from @bluera-base/templates/repo-hardening/gitattributes.template
Report what was set up:
## Repo Hardening Complete
### Installed
- [x] ESLint + Prettier
- [x] husky + lint-staged
- [x] .editorconfig
- [x] .gitattributes
### Next Steps
1. Review generated configs
2. Run `npm run lint` to verify
3. Make a test commit to verify hooks
--skip-hooks flag providedchmod +x)If installation fails: