agents-pre-commit
Run pre-commit checks using src.agents.scripts.pre_commit after editing code. Use when you need automated lint/format hooks on changed files or before running tests and review.
When & Why to Use This Skill
The Agents Pre Commit skill automates the execution of pre-commit hooks, such as linting and formatting, specifically on files modified in the current workspace. By ensuring code quality and style consistency before tests or peer reviews, it streamlines the development workflow and prevents common syntax or stylistic errors from entering the codebase.
Use Cases
- Automated Code Formatting: Automatically apply project-specific formatting rules to changed files to maintain a clean and consistent style.
- Static Code Analysis: Run linters to detect potential bugs, security vulnerabilities, or non-compliant code patterns before committing changes.
- Pre-Review Quality Gate: Use as a mandatory check before submitting code for review to reduce manual feedback on trivial formatting or linting issues.
- Local CI/CD Simulation: Catch and fix errors locally that would otherwise fail in the continuous integration pipeline, saving time and resources.
| name | agents-pre-commit |
|---|---|
| description | Run pre-commit checks using src.agents.scripts.pre_commit after editing code. Use when you need automated lint/format hooks on changed files or before running tests and review. |
Agents Pre Commit
Overview
Use this skill to run the repo's pre-commit hooks on files changed since HEAD.
Quick start
uv run python -m src.agents.scripts.pre_commit
Notes
The script runs pre-commit on git diff --name-only HEAD and may delegate fixes to sub-agents.
Logs are saved under agents_workspace/sub_agents/logs/.
If uv cache permissions fail, use a workspace cache:
uv --cache-dir agents_workspace/tmp_cache/uv_cache run python -m src.agents.scripts.pre_commit