format-and-commit

Formats code with Prettier and ESLint, runs tests, and creates semantic git commits.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/alex-jordan547/agent-setup --skill format-and-commit-alex-jordan547
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: format-and-commit
Source: https://github.com/alex-jordan547/agent-setup/tree/main/archive/2026-09-10/format-and-commit
Command: npx skills add https://github.com/alex-jordan547/agent-setup --skill format-and-commit-alex-jordan547

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually running formatters, linters, and tests before every commit is repetitive and easy to skip, leading to inconsistent code style and poorly written commit messages. This Skill automates the entire pre-commit workflow in one command. ## Core Features & Use Cases - Automated Formatting: Runs npm run format:lint on both frontend and backend code using Prettier and ESLint. - Test Verification: Executes npm test -- --run to confirm no regressions before committing. - Semantic Commit Messages: Stages modified files and proposes a conventional commit message based on the actual changes, with user confirmation before committing. - Use Case: After finishing a feature in a full-stack TypeScript project, invoke the skill to format all touched files, verify tests pass, and produce a commit like feat(matches): add team performance calculation in service without running each step by hand. ## Quick Start Ask the AI to format the code, run the tests, and create a semantic git commit with the current staged changes.

Frequently Asked Questions about format-and-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format code and commit in one step?

Invoke the format-and-commit command, which runs npm run format:lint, executes the test suite, stages modified files with git add, and proposes a semantic commit message for your confirmation before committing.

How to generate semantic commit messages automatically?

The skill analyzes the staged file changes and drafts a conventional commit message such as feat(scope): description. You review the proposed message and confirm with y/n before the commit is created.

Does this work with husky pre-commit hooks?

Yes, the workflow integrates with husky pre-commit hooks. Formatting and tests run before the commit is created, so hook checks pass on the already-formatted and verified code.

What happens if tests fail before committing?

The skill runs npm test -- --run before staging and committing. If tests fail, the commit step does not proceed, preventing regressions from entering the repository.

Can I use this with projects that do not use npm scripts?

No, the skill depends on specific npm scripts: format:lint for Prettier and ESLint, and test for the test runner. Projects without these scripts defined in package.json need to add them first.