Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Conventional Commits Instructions for VS Code & Copilot

A structured, XML-based instruction template for VS Code and GitHub Copilot to automatically generate clean, single-line Conventional Commits with expressive emoji prefixes in English.

💡 Why This Exists

VS Code's automatic commit message generator can produce inconsistent formatting, missing types, or redundant file listings when using free-form prompts.

An XML instruction template enforcing scopeless, emoji-prefixed Conventional Commits 1.0.0 standards.

🚀 Quick Setup

1. Add the Instruction File

Create the instruction file inside your project's .github directory:

# Path: .github/commit-message-instructions.md

Copy the contents of commit-message-instructions.md directly into that file.

2. Configure VS Code Settings

Link the file inside your project or workspace settings.

Project-Level Settings (.vscode/settings.json):

{
  "github.copilot.chat.commitMessageGeneration.instructions": [
    {
      "file": ".github/commit-message-instructions.md"
    }
  ]
}

Workspace Settings (.code-workspace):

{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "github.copilot.chat.commitMessageGeneration.instructions": [
      {
        "file": ".github/commit-message-instructions.md"
      }
    ]
  }
}

🎨 Commit Types & Emoji Mapping

All generated commits strictly follow the <emoji> <type>: <description> syntax without parentheses or scopes:

Emoji Type Purpose Example
feat A new feature ✨ feat: add OAuth2 login support
🐛 fix A bug fix 🐛 fix: resolve null pointer exception in user service
📝 docs Documentation only changes 📝 docs: update installation instructions
🎨 style Formatting, whitespace, or UI styling 🎨 style: format code with prettier
♻️ refactor Code restructuring without logic changes ♻️ refactor: extract validation logic to middleware
perf Performance improvements ⚡ perf: implement lazy loading for gallery
🧪 test Adding or updating tests 🧪 test: add unit tests for login validation
📦 build Build system or external dependencies 📦 build: upgrade React to v19
🤖 ci CI/CD configuration files and scripts 🤖 ci: add GitHub Actions workflow for testing
🔧 chore Setup, tooling, configs, or dependencies 🔧 chore: initialize next.js project with tailwind css
revert Reverting previous commits ⏪ revert: revert "feat: add OAuth2 login support"
💥 feat!/fix! Breaking changes 💥 feat!: change response format for user endpoints

📋 Core Rules

  1. English Only: All commit messages are written strictly in English.
  2. No Scopes: No parentheses or scopes (use <emoji> <type>: <description> directly).
  3. Imperative Mood: Present-tense action verbs (add not added or adds).
  4. Casing & Punctuation: Entire subject line is lowercase; no trailing period.
  5. Length Limits: Subject line limited to 50 characters when possible, max 72.
  6. Single-Line for Setup & Chores: Initial setup, chores, configuration, and dependencies never generate bodies, file lists, or bullet points.
  7. Body Constraints: Optional bodies are reserved only for complex features or breaking changes, wrapped at 72 characters and explaining what and why, not how.

🙏 Acknowledgments

This instruction template is inspired by and adapted from:

📄 License

MIT License. See LICENSE for more information.

About

XML-based Conventional Commits instruction template with emoji prefixes for VS Code and GitHub Copilot.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors