SKILL.md
$27
- Verify before committing: Ensure code is linted, builds correctly, and documentation is updated
- Atomic commits: Each commit should contain related changes that serve a single purpose
- Split large changes: If changes touch multiple concerns, split them into separate commits
- Conventional commit format: Use the format
<type>: <description>where type is one of:
feat: A new feature
fix: A bug fix
docs: Documentation changes
style: Code style changes (formatting, etc)
refactor: Code changes that neither fix bugs nor add features
perf: Performance improvements
test: Adding or fixing tests
chore: Changes to the build process, tools, etc.
- Present tense, imperative mood: Write commit messages as commands (e.g., "add feature" not "added feature")
- Concise first line: Keep the first line under 72 characters
- Emoji: Each commit type is paired with an appropriate emoji:
- β¨
feat: New feature
- π
fix: Bug fix
- π
docs: Documentation
- π
style: Formatting/style
- β»οΈ
refactor: Code refactoring
- β‘οΈ
perf: Performance improvements
- β
test: Tests
- π§
chore: Tooling, configuration
- π
ci: CI/CD improvements
- ποΈ
revert: Reverting changes
- π§ͺ
test: Add a failing test
- π¨
fix: Fix compiler/linter warnings
- ποΈ
fix: Fix security issues
- π₯
chore: Add or update contributors
- π
refactor: Move or rename resources
- ποΈ
refactor: Make architectural changes
- π
chore: Merge branches
- π¦οΈ
chore: Add or update compiled files or packages
- β
chore: Add a dependency
- β
chore: Remove a dependency
- π±
chore: Add or update seed files
- π§βπ»
chore: Improve developer experience
- π§΅
feat: Add or update code related to multithreading or concurrency
- ποΈ
feat: Improve SEO
- π·οΈ
feat: Add or update types
- π¬
feat: Add or update text and literals
- π
feat: Internationalization and localization
- π
feat: Add or update business logic
- π±
feat: Work on responsive design
- πΈ
feat: Improve user experience / usability
- π©Ή
fix: Simple fix for a non-critical issue
- π₯
fix: Catch errors
- π½οΈ
fix: Update code due to external API changes
- π₯
fix: Remove code or files
- π¨
style: Improve structure/format of the code
- ποΈ
fix: Critical hotfix
- π
chore: Begin a project
- π
chore: Release/Version tags
- π§
wip: Work in progress
- π
fix: Fix CI build
- π
chore: Pin dependencies to specific versions
- π·
ci: Add or update CI build system
- π
feat: Add or update analytics or tracking code
- βοΈ
fix: Fix typos
- βͺοΈ
revert: Revert changes
- π
chore: Add or update license
- π₯
feat: Introduce breaking changes
- π±
assets: Add or update assets
- βΏοΈ
feat: Improve accessibility
- π‘
docs: Add or update comments in source code
- ποΈ
db: Perform database related changes
- π
feat: Add or update logs
- π
fix: Remove logs
- π€‘
test: Mock things
- π₯
feat: Add or update an easter egg
- π
chore: Add or update .gitignore file
- πΈ
test: Add or update snapshots
- βοΈ
experiment: Perform experiments
- π©
feat: Add, update, or remove feature flags
- π«
ui: Add or update animations and transitions
- β°οΈ
refactor: Remove dead code
- π¦Ί
feat: Add or update code related to validation
- βοΈ
feat: Improve offline support
Guidelines for Splitting Commits
When analyzing the diff, consider splitting commits based on these criteria:
- Different concerns: Changes to unrelated parts of the codebase
- Different types of changes: Mixing features, fixes, refactoring, etc.
- File patterns: Changes to different types of files (e.g., source code vs documentation)
- Logical grouping: Changes that would be easier to understand or review separately
- Size: Very large changes that would be clearer if broken down
Examples
Good commit messages:
- β¨ feat: add user authentication system
- π fix: resolve memory leak in rendering process
- π docs: update API documentation with new endpoints
- β»οΈ refactor: simplify error handling logic in parser
- π¨ fix: resolve linter warnings in component files
- π§βπ» chore: improve developer tooling setup process
- π feat: implement business logic for transaction validation
- π©Ή fix: address minor styling inconsistency in header
- ποΈ fix: patch critical security vulnerability in auth flow
- π¨ style: reorganize component structure for better readability
- π₯ fix: remove deprecated legacy code
- π¦Ί feat: add input validation for user registration form
- π fix: resolve failing CI pipeline tests
- π feat: implement analytics tracking for user engagement
- ποΈ fix: strengthen authentication password requirements
- βΏοΈ feat: improve form accessibility for screen readers
Example of splitting commits:
- First commit: β¨ feat: add new solc version type definitions
- Second commit: π docs: update documentation for new solc versions
- Third commit: π§ chore: update package.json dependencies
- Fourth commit: π·οΈ feat: add type definitions for new API endpoints
- Fifth commit: π§΅ feat: improve concurrency handling in worker threads
- Sixth commit: π¨ fix: resolve linting issues in new code
- Seventh commit: β test: add unit tests for new solc version features
- Eighth commit: ποΈ fix: update dependencies with security vulnerabilities
Command Options
--no-verify: Skip running the pre-commit checks (lint, build, generate:docs)
Branch Naming Convention
When committing on master or main, the command will ask if you want to create a new branch. If yes, it creates a branch following this pattern:
<type>/<git-username>/<description>
Components:
<type>: The commit type (feature, fix, docs, refactor, perf, test, chore, etc.)
<git-username>: Your git username (obtained fromgit config user.nameor the system username)
<description>: A kebab-case description of the change (e.g.,add-user-auth,fix-login-bug)
Examples:
feature/leovs09/add-new-command
fix/johndoe/resolve-memory-leak
docs/alice/update-api-docs
refactor/bob/simplify-error-handling
chore/charlie/update-dependencies
Workflow:
- Command detects you're on
masterormain
- Asks: "You're on the main branch. Do you want to create a separate branch?"
- If "No": Proceeds with commit on current branch
- If "Yes": Analyzes your changes to determine the type, asks for a brief description, creates the branch, and proceeds with commit
Important Notes
- By default, pre-commit checks (
pnpm lint,pnpm build,pnpm generate:docs) will run to ensure code quality
- If these checks fail, you'll be asked if you want to proceed with the commit anyway or fix the issues first
- If specific files are already staged, the command will only commit those files
- If no files are staged, it will automatically stage all modified and new files
- The commit message will be constructed based on the changes detected
- Before committing, the command will review the diff to identify if multiple commits would be more appropriate
- If suggesting multiple commits, it will help you stage and commit the changes separately
- Always reviews the commit diff to ensure the message matches the changes