Git Precommit
Automates git pre-commit checks like linting, formatting, and testing to ensure code quality before commits.
Install on your platform
We auto-selected Claude Code based on this skillβs supported platforms.
Run in terminal (recommended)
claude mcp add git-precommit npx -- -y @trustedskills/git-precommit
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"git-precommit": {
"command": "npx",
"args": [
"-y",
"@trustedskills/git-precommit"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The git-precommit skill automates pre-commit hooks to ensure code quality and consistency before committing changes. It runs configured checks, such as linting and formatting, preventing problematic code from entering the repository. This helps maintain a clean and consistent codebase by enforcing coding standards automatically.
When to use it
- Enforcing style guides: Ensure all team members adhere to project-specific coding styles (e.g., Python's PEP8).
- Preventing common errors: Catch syntax errors, formatting issues, or potential bugs before they are committed.
- Automating code checks: Reduce manual review effort by automatically running linters and formatters on every commit.
- Maintaining repository health: Keep the codebase clean and consistent over time, reducing technical debt.
Key capabilities
- Automated pre-commit hook execution
- Configurable check suite (linting, formatting)
- Enforcement of coding standards
- Prevention of problematic code commits
Example prompts
- "Run the git pre-commit checks on this file."
- "Execute the configured pre-commit hooks before committing these changes."
- βCan you show me what the pre-commit hook configuration is?β
Tips & gotchas
The skill requires a properly configured .pre-commit-config.yaml file in the repository root to define the checks to be performed. Ensure this file exists and contains valid configurations for the desired tools.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
π Community
Passed automated security scans.