agentleFS
MisterIcyMisterIcy/skills/create-commits/SKILL.md

create-commits

Skill0 starsChanged 10 months agoMITView on GitHub

Creates git commits following the Conventional Commits specification. Performs git status to identify changes, reviews diffs to understand scope, collaborates with humans on staging files, and generates valid commit messages optimized for both agents and humans. Handles edge cases including reverts, amends, merge commits, and rebase commits. Use when committing changes, creating git commits, staging files, or when the user asks to commit code changes.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. About 0 are common, 30 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈30

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 12
  2. Distinctive:

    Follow this workflow for every commit:

    line 20
  3. Distinctive:

    Run git status to see all changes (staged, unstaged, untracked)

    line 23
  4. Distinctive:

    Read diffs for modified files using git diff (unstaged) or git diff --cached (staged)

    line 27
  5. Distinctive:

    Read new files that were added

    line 28
  6. Distinctive:

    Ask which files should be included in the commit

    line 34
  7. Distinctive:

    Check for breaking changes (API changes, config changes, etc.)

    line 41
  8. Distinctive:

    Write a clear, concise description following Conventional Commits format

    line 44
  9. Distinctive:

    Add breaking change footer if applicable

    line 46
  10. Very specific:

    Run git commit -m "<message>" or git commit for multi-line messages

    line 49
  11. Distinctive:

    Verify the commit was created successfully

    line 50
  12. Distinctive:

    Follow the Conventional Commits specification:

    line 54
  13. Distinctive:

    Use imperative mood: "add feature" not "added feature" or "adds feature"

    line 88
  14. Distinctive:

    No period at the end

    line 90
  15. Very specific:

    In footer: Add BREAKING CHANGE: footer

    line 110
  16. Very specific:

    Use Refs: footer to link related issues

    line 167
  17. Distinctive:

    Keep the same type and scope if changes are minor (typos, formatting)

    line 181
  18. Very specific:

    Add (amend) note in body if helpful for context

    line 183
  19. Distinctive:

    Don't modify unless user explicitly requests it

    line 195
  20. Distinctive:

    If creating manual merge commit, use format:

    line 196
  21. Distinctive:

    Follow Conventional Commits format for each commit message

    line 209
  22. Distinctive:

    If no changes to commit:

    line 214
  23. Distinctive:

    Don't create empty commits unless explicitly requested

    line 216
  24. Distinctive:

    If requested, use git commit --allow-empty with appropriate message

    line 217
  25. Distinctive:

    If changes span multiple concerns:

    line 221
  26. Distinctive:

    Preferred: Create separate commits for each concern

    line 222
  27. Distinctive:

    Alternative: Use a single commit with multiple scopes if changes are tightly coupled

    line 223
  28. Distinctive:

    Ask the user if unsure about splitting commits

    line 224
  29. Distinctive:

    Always check status first: - Never assume what files changed

    line 235
  30. Distinctive:

    Collaborate with humans: - Ask before staging, discarding, or committing

    line 237
  31. Distinctive:

    One logical change per commit: - Keep commits focused and atomic

    line 238
  32. Distinctive:

    Never commit without user approval: - Always confirm before executing git commit

    line 246
  33. Distinctive:

    Handle conflicts gracefully: - If staging fails, explain why and suggest solutions

    line 249
  34. Distinctive:

    Respect user preferences: - If user has commit message preferences, follow them

    line 250

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Commits

When to Use

Use this skill when:

  • The user asks to commit changes, create a commit, or stage files
  • You need to commit code changes after making modifications
  • The user wants to create a commit message following Conventional Commits
  • You need to handle special commit scenarios (revert, amend, merge, rebase)

Core Workflow

Follow this workflow for every commit:

  1. Check repository status
    • Run git status to see all changes (staged, unstaged, untracked)
    • Identify which files were modified, added, deleted, or renamed
  2. Review changes to understand scope
    • Read diffs for modified files using git diff (unstaged) or git diff --cached (staged)
    • Read new files that were added
    • Understand the purpose and impact of changes
    • Identify the scope (e.g., auth, api, ui, docs)
  3. Collaborate on staging
    • Present the list of changed files to the user
    • Ask which files should be included in the commit
    • Stage files using git add <file> or git add -p for partial staging
    • Discard unwanted changes only with explicit user approval using git restore <file> or git checkout -- <file>
  4. Determine commit type and scope
    • Analyze changes to identify the appropriate type (feat, fix, docs, etc.)
    • Determine scope from the files changed (e.g., feat(auth), fix(api))
    • Check for breaking changes (API changes, config changes, etc.)
  5. Create commit message
    • Write a clear, concise description following Conventional Commits format
    • Include body if additional context is needed
    • Add breaking change footer if applicable
  6. Execute commit
    • Run git commit -m "<message>" or git commit for multi-line messages
    • Verify the commit was created successfully

Commit Message Format

Follow the Conventional Commits specification:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types

  • feat: New feature (correlates with MINOR in SemVer)
  • fix: Bug fix (correlates with PATCH in SemVer)
  • docs: Documentation changes
  • style: Code style changes (formatting, missing semicolons, etc.)
  • refactor: Code refactoring without changing functionality
  • perf: Performance improvements
  • test: Adding or updating tests
  • build: Build system or dependency changes
  • ci: CI/CD configuration changes
  • chore: Other changes that don't modify src or test files
  • revert: Reverting a previous commit

Scope

Scope is optional and should be a noun describing the codebase section:

  • feat(auth): Authentication feature
  • fix(api): API bug fix
  • docs(readme): README documentation
  • refactor(utils): Utility functions refactoring

Description

  • Use imperative mood: "add feature" not "added feature" or "adds feature"
  • Lowercase (except for proper nouns)
  • No period at the end
  • Be specific and concise
  • Focus on what changed, not why (why goes in body if needed)

Body (Optional)

  • Provide additional context about the change
  • Explain the "why" behind the change
  • Reference related issues: Closes #123 or Fixes #456
  • Separate from description by blank line

Breaking Changes

Indicate breaking changes in two ways:

  1. In type/scope: Append ! before colon
    feat(api)!: change authentication endpoint
  2. In footer: Add BREAKING CHANGE: footer
    feat(api): change authentication endpoint
    
    BREAKING CHANGE: The /auth endpoint now requires API key in header instead of query parameter

Examples

Simple feature commit

feat(auth): add JWT token refresh endpoint

Adds POST /auth/refresh endpoint that accepts refresh token and returns new access token.
Implements token rotation for enhanced security.

Bug fix with scope

fix(api): prevent null pointer in user validation

When user object is null, the validation middleware now returns 400 instead of crashing.

Documentation update

docs(readme): update installation instructions

Adds Node.js 18+ requirement and clarifies environment variable setup.

Breaking change

feat(api)!: migrate to v2 authentication

BREAKING CHANGE: Authentication now uses Bearer tokens instead of API keys.
Update your clients to use Authorization header.

Revert commit

revert: feat(api): add rate limiting

This reverts commit abc123def456.

Rate limiting caused issues with batch operations.
Refs: #789

Edge Cases

Reverting Commits

When reverting:

  1. Use type revert
  2. Reference the commit SHA(s) being reverted in the body
  3. Explain why the revert is necessary
  4. Use Refs: footer to link related issues
revert: feat(api): add caching layer

This reverts commit abc123def456.

Caching caused stale data issues in production.
Refs: #456

Amending Commits

When amending (git commit --amend):

  • Keep the same type and scope if changes are minor (typos, formatting)
  • Change type/scope if the amendment significantly alters the commit's purpose
  • Add (amend) note in body if helpful for context
fix(api): correct typo in error message

(amend) Fixed typo: "eror" -> "error"

Merge Commits

For merge commits created by git merge:

  • Git automatically creates merge commit messages
  • Don't modify unless user explicitly requests it
  • If creating manual merge commit, use format:
merge: integrate feature-branch into main

Merges feature-branch that adds user authentication.
Resolves conflicts in auth middleware.

Rebase Commits

During interactive rebase (git rebase -i):

  • Each commit can be reworded individually
  • Follow Conventional Commits format for each commit message
  • Maintain logical grouping of changes

Empty Commits

If no changes to commit:

  • Inform the user that there are no changes
  • Don't create empty commits unless explicitly requested
  • If requested, use git commit --allow-empty with appropriate message

Multiple Related Changes

If changes span multiple concerns:

  • Preferred: Create separate commits for each concern
  • Alternative: Use a single commit with multiple scopes if changes are tightly coupled
  • Ask the user if unsure about splitting commits

Example of splitting:

feat(auth): add login endpoint
feat(auth): add logout endpoint
docs(auth): update API documentation

Best Practices

  1. Always check status first - Never assume what files changed
  2. Read diffs before committing - Understand the full scope of changes
  3. Collaborate with humans - Ask before staging, discarding, or committing
  4. One logical change per commit - Keep commits focused and atomic
  5. Write clear descriptions - Future you (and other agents) will thank you
  6. Use scopes consistently - Establish and follow project conventions
  7. Reference issues - Link commits to issues/tickets when applicable
  8. Be specific - "fix bug" is less helpful than "fix null pointer in user validation"

Collaboration Guidelines

  • Never commit without user approval - Always confirm before executing git commit
  • Present options clearly - Show what will be committed and ask for confirmation
  • Explain your reasoning - Share why you chose a particular type/scope
  • Handle conflicts gracefully - If staging fails, explain why and suggest solutions
  • Respect user preferences - If user has commit message preferences, follow them

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.