Install
npx skillscat add alex-jordan547/agent-setup/format-and-commit Install via the SkillsCat registry.
SKILL.md
format-and-commit
Format code and create a git commit with staged changes.
What This Skill Does
When you invoke /format-and-commit, Claude will:
- Format code - Run
npm run format:linton both frontend and backend - Verify tests pass - Run
npm test -- --runto ensure no regressions - Stage changes - Add modified files with
git add - Create commit - Generate a semantic commit message and commit changes
How to Use
Simply invoke:
/format-and-commitThen follow the prompts. Claude will:
- Show you the files being committed
- Propose a semantic commit message based on changes
- Ask for confirmation before committing
Example
User: /format-and-commit
Claude:
✓ Formatting code...
✓ Running tests...
✓ Files changed:
- api/src/matches/services/matches.service.ts
- web/src/components/MatchTable.tsx
Proposed commit message:
"feat(matches): add team performance calculation in service
This adds a new `calculateTeamPerformance` method to compute team stats
based on recent match results, improving the match simulation accuracy."
Ready to commit? [y/n]Benefits
- Ensures code quality before committing
- Consistent commit messages following semantic versioning
- No need to manually run format/lint/test steps
- Integrates with husky pre-commit hooks