From repo-structure
Use when the user asks to setup pre-commit hooks, configure CI/CD, install linters, add formatters, automate testing, or needs automation setup guidance for a specific tech stack.
How this skill is triggered — by the user, by Claude, or both
Slash command
/repo-structure:automation-strategiesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for setting up automation tools — pre-commit hooks, linters, formatters, and security scanning — adapted to the detected tech stack.
Guide for setting up automation tools — pre-commit hooks, linters, formatters, and security scanning — adapted to the detected tech stack.
Install and configure the pre-commit framework:
pip install pre-commit
pre-commit install
Or use the plugin's install-hooks.sh script which auto-detects stack and generates .pre-commit-config.yaml:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/install-hooks.sh
Recommended tools: ruff (linter + formatter), pre-commit-hooks (common checks). Optional additions: black (alternative formatter), mypy (type checking), detect-secrets (secret scanning).
Sample .pre-commit-config.yaml (matches what install-hooks.sh generates):
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
- id: ruff-format
Recommended tools: prettier (formatter), eslint (linter), husky (hooks integration).
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.56.0
hooks:
- id: eslint
types: [javascript, jsx, ts, tsx]
Recommended tools: gofmt (formatter), golangci-lint (meta-linter).
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: golangci-lint
Recommended tools: rustfmt (formatter), clippy (linter).
repos:
- repo: local
hooks:
- id: rustfmt
name: rustfmt
entry: cargo fmt --
language: system
types: [rust]
- id: clippy
name: clippy
entry: cargo clippy -- -D warnings
language: system
types: [rust]
pass_filenames: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
Use the plugin's CI templates from skills/repository-templates/templates/ci/:
python-ci.yml.template — Python CI with pytest, ruff, optional coveragenode-ci.yml.template — Node.js CI with test and lintGenerate with:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/generate-template.py \
--template ${CLAUDE_PLUGIN_ROOT}/skills/repository-templates/templates/ci/python-ci.yml.template \
--output .github/workflows/ci.yml
Commit-msg validation (conventional commits):
#!/usr/bin/env bash
# .git/hooks/commit-msg
pattern="^(feat|fix|chore|docs|refactor|test|ci|perf|revert)(\(.+\))?: .{1,72}"
if ! grep -qE "$pattern" "$1"; then
echo "ERROR: Commit message must follow conventional commits format" >&2
exit 1
fi
npx claudepluginhub nsalvacao/nsalvacao-claude-code-plugins --plugin repo-structureAutomates Git hooks setup with Husky, lint-staged, and commitlint to enforce code quality before commits and pushes.
This skill should be used when the user says "set up CI", "create GitHub Actions", "scaffold CI pipeline", "add CI/CD", "configure continuous integration", "create test workflow", "create release workflow", "add pre-commit hooks", "set up linting pipeline", "configure ruff in CI", "configure biome in CI", "add typo checking", or wants to add, update, or customize CI/CD pipelines for their project. For initial project setup including basic CI, see init-project. Use ci-scaffolding for adding or customizing CI/CD in existing projects.
Configures pre-commit or prek git hooks for code quality automation, formatting, linting, and commit message processing across multi-language projects.