pre-commit-standards
Pre-commit hook standards and configuration. Use when configuring pre-commit hooks, checking hook compliance, or working with conventional commits.
What this skill does
# Pre-commit Standards
## When to Use This Skill
| Use this skill when... | Use `configure-pre-commit` instead when... |
|---|---|
| You need the canonical hook list, pinned versions, and conventional-commit conventions | You want to audit or install pre-commit hooks for a project end-to-end as an interactive workflow |
| You are checking whether a `.pre-commit-config.yaml` matches the documented standard | You want runtime detection of project type (frontend, infra, python) before choosing hook sets |
| Another skill needs to cite the standard hook versions or rule set | The user asked you to actually create or repair pre-commit configuration |
## Version: 2025.1
Standard pre-commit configuration for repository compliance.
## Standard Versions (2025.1)
| Hook | Version | Purpose |
|------|---------|---------|
| pre-commit-hooks | v6.0.0 | Core hooks (trailing-whitespace, check-yaml, etc.) |
| conventional-pre-commit | v4.4.0 | Conventional commit message validation |
| biome | v2.4.16 | Code formatting and linting (JS, TS, JSON) |
| gruntwork pre-commit | v0.1.30 | helmlint, tflint (infrastructure only) |
| actionlint | v1.7.12 | GitHub Actions validation (infrastructure only) |
| helm-docs | v1.14.2 | Helm documentation (infrastructure only) |
| gitleaks | v8.30.1 | Secret scanning (recommended) |
## Project Type Configurations
### Frontend App (Vue/React)
Required hooks for frontend applications:
```yaml
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^(helm/templates/|skaffold/|k8s/).*\.ya?ml$
- id: check-json
exclude: tsconfig\.json$
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/biomejs/pre-commit
rev: v2.4.16
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/[email protected]"]
# Optional: If project has Helm charts
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.30
hooks:
- id: helmlint
files: ^helm/
```
### Infrastructure Repository
Required hooks for infrastructure (Terraform, Helm, ArgoCD):
```yaml
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
exclude: argocd/.*templates/|helm/[^/]+/templates/
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.30
hooks:
- id: tflint
- id: helmlint
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
- repo: https://github.com/norwoodj/helm-docs
rev: v1.14.2
hooks:
- id: helm-docs
args:
- --chart-search-root=helm
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
```
### Python Service
Required hooks for Python projects:
```yaml
default_install_hook_types:
- pre-commit
- commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
```
## Compliance Checking
### Required Base Hooks (All Projects)
Every repository MUST have these hooks:
1. **pre-commit-hooks** (v6.0.0+)
- `trailing-whitespace`
- `end-of-file-fixer`
- `check-yaml`
- `check-json`
- `check-merge-conflict`
- `check-added-large-files`
2. **conventional-pre-commit** (v4.4.0+)
- `conventional-pre-commit` in `commit-msg` stage
### Status Levels
| Status | Meaning |
|--------|---------|
| PASS | Hook present with compliant version |
| WARN | Hook present but version outdated |
| FAIL | Required hook missing |
| SKIP | Hook not applicable for project type |
### Version Comparison
When checking versions:
- Exact match or newer: PASS
- Older by patch version: WARN (functional but should update)
- Missing entirely: FAIL (must add)
## Exclusion Patterns
### Frontend Apps
Exclude Kubernetes/Helm templates from YAML/prettier checks:
```yaml
exclude: ^(helm/templates/|skaffold/|k8s/).*\.ya?ml$
```
### Infrastructure
Exclude ArgoCD and Helm templates:
```yaml
exclude: argocd/.*templates/|helm/[^/]+/templates/
```
### Python
No special exclusions needed for standard Python projects.
## Installation
After configuring `.pre-commit-config.yaml`:
```bash
pre-commit install
pre-commit install --hook-type commit-msg
```
Or simply:
```bash
pre-commit install --install-hooks
```
## Updating
To update all hooks to latest versions:
```bash
pre-commit autoupdate
```
Then verify versions match project standards.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.