commit-code

Automate pre-commit validation and dependency management for Go microservices.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/microservices-agent-skills --skill commit-code-vesviet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-code
Source: https://github.com/vesviet/microservices-agent-skills/tree/main/skills/commit-code
Command: npx skills add https://github.com/vesviet/microservices-agent-skills --skill commit-code-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of committing code by enforcing validation rules, managing dependencies, and ensuring adherence to project conventions, preventing common errors and inconsistencies.

Core Features & Use Cases

  • Pre-commit Validation: Runs linters and checks for critical rules before allowing a commit.
  • Dependency Management: Guides users on correctly updating and managing Go module dependencies, especially the common package.
  • Workflow Enforcement: Ensures necessary regeneration steps (proto, wire) and adherence to conventional commit messages.
  • Use Case: After making changes to a microservice, use this skill to automatically run golangci-lint, regenerate wire_gen.go if needed, and format your commit message correctly before pushing.

Quick Start

Use the commit-code skill to prepare and commit your latest changes to the 'user-service' repository.

Frequently Asked Questions about commit-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate pre-commit validation for microservices?

Automating pre-commit validation for microservices enforces rules like zero golangci-lint warnings and correct common package commits. It runs linters, regenerates wire_gen.go, and checks dependencies before allowing a commit.

Why does my git commit fail due to go.mod replace directives?

Git commit validation fails because go.mod replace directives are strictly prohibited. You must remove all replace directives from go.mod and correctly manage the common package dependency order before committing.

What's the best way to manage proto and wire regeneration before a git commit?

Managing proto and wire regeneration requires running make api for proto changes and regenerating wire for DI changes. This ensures generated code is updated correctly before creating a conventional commit.

How do I format conventional commit messages for microservice updates?

Formatting conventional commit messages requires structuring your commit log according to project conventions. This workflow guides you through updating CHANGELOG.md and formatting the message correctly after validating dependencies.

Can I use this workflow to update GitOps configurations alongside code changes?

Yes, you can use this workflow to handle GitOps configurations. It guides the process for updating GitOps configs alongside enforcing dependency management and zero golangci-lint warnings for microservice repositories.