Git Best Practices
Helps with Git, best practices as part of developing backend services and APIs workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add git-best-practices npx -- -y @trustedskills/git-best-practices
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"git-best-practices": {
"command": "npx",
"args": [
"-y",
"@trustedskills/git-best-practices"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill guides an AI agent through Git workflows with a focus on best practices for backend service and API development. It enforces rules around commit formatting (Conventional Commits), staging changes, and pushing updates to protect shared history. The skill also supports the creation of "WIP" checkpoint commits during long-running tasks and provides guidance on crafting clean, narrative-driven commit histories before opening pull requests.
When to use it
- When developing backend services or APIs where consistent Git practices are crucial.
- During complex development tasks requiring temporary checkpoints (WIP commits).
- Before branching, merging, or opening pull requests to ensure adherence to repository conventions.
- To enforce standardized commit message formatting and improve code review processes.
Key capabilities
- Branch Discovery: Identifies default, current, and optionally production branch names.
- Conventional Commits: Enforces a specific commit format:
type(scope): description. - Explicit Staging: Requires files to be added by name using
git add path/to/file. - Safe Force Pushing: Uses
--force-with-leasefor force pushes and requires user confirmation. - WIP Checkpoint Commits: Allows creation of temporary commits during long tasks, cleaned up before PRs.
- Commit Message Guidelines: Provides rules and examples for subject lines and commit bodies.
Example prompts
- "Discover the default branch in this repository."
- "Stage these files:
src/auth.tsandsrc/auth.test.ts." - "Create a conventional commit with type 'feat' for updating user authentication."
Tips & gotchas
- The skill enforces strict rules regarding commit formatting and staging, so be prepared to follow the guidelines.
- User confirmation is required before any force push operations are performed.
- Review the
git-examples.mdfile (referenced in the source) for detailed examples of conventional commit messages.
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.