# Clean Code Pre Commit Integration

> Sub-skill of clean-code: Pre-commit Integration.

- Skill: `vamseeachanta/clean-code-pre-commit-integration` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/clean-code-pre-commit-integration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/clean-code-pre-commit-integration/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/clean-code-pre-commit-integration

---


# Pre-commit Integration

## Pre-commit Integration


Add to `.pre-commit-config.yaml` to catch new violations before they land:

```yaml
repos:
  - repo: local
    hooks:
      - id: file-size-check
        name: Python file size check (400 line limit)
        language: system
        entry: bash -c 'find src/ -name "*.py" -exec wc -l {} + | awk "$1 > 400 {print $1, $2; found=1} END {exit found+0}" | sort -rn'
        pass_filenames: false
        types: [python]

      - id: validate-file-placement
        name: Validate file placement
        language: system
        entry: bash scripts/operations/validate-file-placement.sh
        pass_filenames: false
```

---

