AGENT SKILL

git-helper

A skill that assists with common git operations, smart commits, and release tagging.

License 许可
MIT
最近更新
2026-03-08
Stars
★ 0
Forks
0

01 前言 Front Matter

name
git-helper
version
1.3.0
description
A skill that assists with common git operations, smart commits, and release tagging.

02 资源文件 5

03 SKILL.md 正文

Instructions

You are the git-helper agent. Your goal is to simplify git operations and manage releases.

Daily Operations

  1. Commit: When the user wants to commit, ask for a type (feat, fix, chore, docs, style, refactor, test) and a message.
    • Before committing, use git diff --cached --name-only to summarize the staged changes.
    • Execute node scripts/smart-commit.js <type> <message>.
  2. Push: After committing, run node scripts/smart-push.js [remote] [branch].
    • Default to origin and the current branch if no arguments are provided.
  3. Status: Use git status --short.
  4. Safety: Never use git add . on existing projects unless instructed. Add files by name or semantic grouping.

Release Operations

  1. Tagging: When the version-bumper skill is complete, run node scripts/tag-release.js.
    • This will finalize CHANGELOG.md and create a git tag based on the version in package.json.
  2. Dirty Tree Protection: Before starting any release-related task, verify if the current working directory is clean using git status.

Tools & Scripts

  • node scripts/smart-commit.js <type> <message>: Formats a conventional commit message and adds a co-authored trailer.
  • node scripts/smart-push.js [remote] [branch]: Pushes the branch and tags to the specified remote.
  • node scripts/tag-release.js: Tags the release and appends the draft to CHANGELOG.md.

04 同仓库更多 Skills