clean-code-pre-commit-integration
Sub-skill of clean-code: Pre-commit Integration.
Best use case
clean-code-pre-commit-integration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of clean-code: Pre-commit Integration.
Teams using clean-code-pre-commit-integration should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pre-commit-integration/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clean-code-pre-commit-integration Compares
| Feature / Agent | clean-code-pre-commit-integration | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of clean-code: Pre-commit Integration.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
```
---Related Skills
mnt-analysis-cleanup
Survey, classify, and clean up `/mnt/local-analysis/` (or any sibling-to-workspace-hub directory holding orphan worktrees, codex-burn artifacts, agent log accumulations, and outer-clone duplicates) without losing useful code/work. Surfaces a tiered approval menu rather than baking decisions; defers all destructive ops until user confirms.
library-evaluation-integration
Create evaluation scripts and integration tests for Python scientific libraries in the digitalmodel package. Follows the established pattern from fluids, ht, meshio, sectionproperties, and pygmt evaluations.
pre-completion-cleanup-audit
Audit and dispose of session residue (orphan files, scratch dirs, sibling-repo state, locks, trash-stages) BEFORE claiming a task complete. Required gate before any agent says "all done", "task complete", or hands work back to user/orchestrator.
verify-Codex-run-commit-vs-working-tree-before-closing
After a Codex implementation run, verify the claimed file set against the actual commit and working tree before treating the issue as fully complete.
git-worktree-cleanup-at-scale
Identify and remove stale git worktrees blocking branch deletion in multi-repo environments
git-worktree-cleanup-and-branch-reconciliation
Systematic process for cleaning up stale git worktrees, resolving merge conflicts in diverged branches, and reconciling branch state across multiple repositories.
git-worktree-cleanup-and-branch-hygiene
Systematic approach to cleaning up stale git worktrees, orphan branches, and branch hygiene at scale across multiple repos
git-blob-size-filter-cleanup
Strip oversized blobs from unpushed commits using git filter-branch when GitHub's 100 MB limit blocks push
evaluate-local-commits-via-cherry-pick-dry-run
Technique to identify which ahead commits contain real changes vs. already-merged or ephemeral content
adversarial-code-review-for-committed-diffs
Systematic process for reviewing already-committed code changes to catch type inconsistencies, edge cases, and docstring gaps
clean-worktree-integration-from-dirty-main
Land validated issue work from isolated worktrees when the main checkout is dirty by creating a fresh integration worktree, cherry-picking only implementation commits, re-running combined validation, and preparing push/closeout artifacts.
clean-code
Clean code enforcement for workspace-hub Python repos: file/function size limits, God Object detection, naming rules, dead code removal, and refactor decision guidance. Consult before writing new modules or accepting large files.