スキル一覧に戻る
heykvnzhao

git-best-practices

by heykvnzhao

0🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


Git Best Practices

Safety Rules

  • Read-only by default: git status, git diff, git log are always safe
  • Push requires explicit request: Never push unless user asks
  • Checkout allowed for: PR review, explicit user request
  • Branch changes require consent: Ask before creating/switching branches
  • Destructive ops forbidden unless explicit user consent:
    • reset --hard
    • clean
    • restore
    • rm
    • Force push

Commit Planning

When reviewing changes for commits:

  1. Review all staged and unstaged changes
  2. Identify untracked files, ignored files, and anything that should not be committed
  3. Propose clean commit groups that are logically related and minimal
  4. Explain which files belong to each commit and why
  5. If there are dependencies between commits, order them
  6. If files should be removed or ignored, say so explicitly

Conventional Commits

Format: <type>[optional scope][optional !]: <description>

Types

TypeUse for
featNew features
fixBug fixes
docsDocumentation only
styleFormatting, whitespace (no code change)
refactorCode change that neither fixes nor adds
perfPerformance improvements
testAdding or correcting tests
buildBuild system or dependencies
ciCI configuration
choreOther changes (tooling, config)
revertReverting a previous commit

Scope

  • Use the smallest sensible scope
  • Omit scope if unclear or too broad
  • Examples: feat(auth):, fix(api):, docs(readme):

Breaking Changes

Mark with ! before the colon OR add a BREAKING CHANGE: footer:

feat(api)!: remove deprecated endpoints

BREAKING CHANGE: /v1/users endpoint removed, use /v2/users

Body and Footers

  • Use body only when the subject line needs elaboration
  • Footers follow git-trailer style: Token: value
  • Common footers: BREAKING CHANGE:, Fixes:, Refs:, Co-authored-by:

Examples

feat(auth): add OAuth2 login flow

fix: prevent race condition in queue processing

docs: update API authentication examples

refactor(db)!: migrate from MySQL to PostgreSQL

BREAKING CHANGE: database connection config format changed

Workflow

After reviewing changes, end with:

  1. Short summary of proposed commits
  2. Clear question for next steps (stage/commit/push)

If anything is ambiguous, ask short, direct questions with options.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です