# Improve VS Code Commit Messages with GitHub&#8217;s git-commit skill

**Date:** 2026-03-14  
**Author:** Kees C. Bakker  
**Categories:** Automation, Programming  
**Original:** https://keestalkstech.com/improve-vs-code-commit-messages-with-githubs-git-commit-skill/

![Improve VS Code Commit Messages with GitHub&#8217;s git-commit skill](https://keestalkstech.com/wp-content/uploads/2026/03/austin-ramsey-nmXi-HCD_F8-unsplash.jpg)

---

I really love that tiny *Generate Commit Message* button in the VS Code interface, but I like my commit messages to use a different style, with prefixes like "feat:" and "chore:". Let's see if we can wire up the [git-commit](https://skills.sh/github/awesome-copilot/git-commit) skill (made by GitHub) to our project, so Copilot generates better commit messages.

![](https://keestalkstech.com/wp-content/uploads/2026/03/commit-button-1.png)
*This is the original message Copilot generates when I press the button.*

The beauty of [skills](https://skills.sh/) is that they *just work* once installed. Copilot automatically discovers them in the chat window. Great! Unfortunately, this is not the case for the little *Generate Commit Message* button (the sparkles icon). You'll need to add some of your own magic to make commit message generation use the skill.

Don't want to configure it yourself? Use the following prompt: Please read https://keestalkstech.com/improve-vs-code-commit-messages-with-githubs-git-commit-skill.md and install the VSCode commit skill at the current location.

## Let's Give the Sparkle Button a Skill

First, we'll install the skill in our project so we can reference it:

```sh
npx skills add https://github.com/github/awesome-copilot --skill git-commit --agent universal -y
```

This installs the `SKILL.md` Markdown file under `.agents/skills/git-commit` and creates a `skills-lock.json` file.

Next, we'll need to reference the file in our `.vscode/settings.json` by adding the following configuration:

```json
{
  "github.copilot.chat.commitMessageGeneration.instructions": [
    {
      "file": ".agents/skills/git-commit/SKILL.md"
    }
  ]
}
```

That's it! When you press the button, VS Code uses the skill to generate a better commit message.

![](https://keestalkstech.com/wp-content/uploads/2026/03/commit-button-2.png)
*Now that we've hooked up the button, we see a nice feat: prefix.*

## Automate it

To install the skill and update your VS Code settings in one step, use one of these scripts.

Bash


```
(
  if ! command -v jq >/dev/null 2>&1; then
    echo "jq is required but not installed."
    exit 1
  fi

  if ! command -v npx >/dev/null 2>&1; then
    echo "npx is required but not installed."
    exit 1
  fi

  if [ ! -f ".agents/skills/git-commit/SKILL.md" ]; then
    npx skills add https://github.com/github/awesome-copilot --skill git-commit --agent universal -y
  fi

  mkdir -p .vscode

  [ -f .vscode/settings.json ] || echo '{}' > .vscode/settings.json

  if jq -e 'any(.["github.copilot.chat.commitMessageGeneration.instructions"][]?; .file == ".agents/skills/git-commit/SKILL.md")' \
        .vscode/settings.json >/dev/null 2>&1; then
    echo "Skill already configured."
    exit 0
  fi

  jq '.["github.copilot.chat.commitMessageGeneration.instructions"] =
        ((.["github.copilot.chat.commitMessageGeneration.instructions"] // [])
        + [{ "file": ".agents/skills/git-commit/SKILL.md" }])' \
      .vscode/settings.json > .vscode/settings.tmp \
      && mv .vscode/settings.tmp .vscode/settings.json
)
```

PowerShell


```
& {
  if (-not (Get-Command jq -ErrorAction SilentlyContinue)) {
    Write-Host "jq is required but not installed."
    return
  }

  if (-not (Get-Command npx -ErrorAction SilentlyContinue)) {
    Write-Host "npx is required but not installed."
    return
  }

  if (-not (Test-Path ".agents/skills/git-commit/SKILL.md")) {
    npx skills add https://github.com/github/awesome-copilot --skill git-commit --agent universal -y
  }

  New-Item -ItemType Directory -Force -Path ".vscode" | Out-Null

  if (-not (Test-Path ".vscode/settings.json")) {
    '{}' | Set-Content ".vscode/settings.json" -Encoding utf8
  }

  $exists = jq -e 'any(.["github.copilot.chat.commitMessageGeneration.instructions"][]?; .file == ".agents/skills/git-commit/SKILL.md")' `
               ".vscode/settings.json" 2>$null

  if ($LASTEXITCODE -eq 0) {
    Write-Host "Skill already configured."
    return
  }

  jq '.["github.copilot.chat.commitMessageGeneration.instructions"] =
        ((.["github.copilot.chat.commitMessageGeneration.instructions"] // [])
        + [{ "file": ".agents/skills/git-commit/SKILL.md" }])' `
        ".vscode/settings.json" |
        Set-Content ".vscode/settings.json" -Encoding utf8
}
```

## Further reading

While working on this article, I found some resources that might interest you.

- [skills.sh](https://skills.sh/) - here you'll find a directory of skills you might want to install.
- [The git-commit skill made by GitHub](https://skills.sh/github/awesome-copilot/git-commit).
- [Use Agent Skills in VS Code](https://code.visualstudio.com/docs/agent-customization/agent-skills).
- [Use custom instructions in VS Code](https://code.visualstudio.com/docs/agent-customization/custom-instructions).
- [Agent Skills specification](https://agentskills.io/home).
- [Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?](https://arxiv.org/abs/2602.11988) examines whether repository-level context files help coding agents.

## Changelog

- 2026-07-19: Corrected the automation scripts and added official VS Code references.
- 2026-05-07: Added an AI setup callout.
- 2026-03-14: Initial article.
