بنقرة واحدة
commit-message
// Use this skill when asked to write or draft a commit message. It ensures commit messages follow the conventions in CONTRIBUTING.md.
// Use this skill when asked to write or draft a commit message. It ensures commit messages follow the conventions in CONTRIBUTING.md.
| name | commit-message |
| description | Use this skill when asked to write or draft a commit message. It ensures commit messages follow the conventions in CONTRIBUTING.md. |
This skill drafts commit messages that follow the conventions in CONTRIBUTING.md.
Follow these steps to draft a commit message:
Gather Context: Understand what changed and why.
git diff --staged to see staged changes.git diff to see unstaged changes.git log --oneline -10 to see recent commit style for reference.Determine the Type: Choose the conventional commit type based on the nature of the change:
feat: A new featurefix: A bug fixdocs: Documentation only changestest: Adding or updating testsrefactor: Code change that neither fixes a bug nor adds a featurechore: Changes to the build process or auxiliary toolsDetermine the Package: Identify the Go package most affected by the
change. Use the package path relative to the module root (for example,
internal/librarian or cli).
Draft the First Line: Write the first line following the format
<type>(<package>): <description>.
Draft the Main Content: After a blank line, write the body of the commit message in plain prose paragraphs. Do NOT create a commit — only display the message.
Reference Issues: If the change fixes an issue, add a blank line followed by:
Fixes https://github.com/googleapis/librarian/issues/<number> if the
change fully resolves the issue.For https://github.com/googleapis/librarian/issues/<number> if the
change is a partial step towards resolving the issue.Present the Message: Print the full commit message to the terminal so the user can review it before committing. Do NOT create a commit — only display the message.
feat(internal/librarian): add version subcommand
A version subcommand is added to librarian, which prints the current version of
the tool.
The version follows the versioning conventions described at
https://go.dev/ref/mod#versions.
Fixes https://github.com/googleapis/librarian/issues/238
Helps create a GitHub issue that strictly follows the conventions in CONTRIBUTING.md. Use this skill when asked to create, draft, or open a GitHub issue or bug report.
Helps review your own pull request or local changes before opening a PR. Analyzes diffs against project conventions and checks out branches locally to ensure you can apply changes. Requires the `gh` and `git` CLI tools.