← スキル一覧に戻る

git-best-practices
by heykvnzhao
⭐ 0🍴 0📅 2026年1月22日
SKILL.md
name: git-best-practices description: Safe-by-default git workflow and Conventional Commits. Triggers on git operations, reviewing diffs, staging files, creating commits, or branch changes. Prevents destructive operations without consent.
Git Best Practices
Safety Rules
- Read-only by default:
git status,git diff,git logare 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 --hardcleanrestorerm- Force push
Commit Planning
When reviewing changes for commits:
- Review all staged and unstaged changes
- Identify untracked files, ignored files, and anything that should not be committed
- Propose clean commit groups that are logically related and minimal
- Explain which files belong to each commit and why
- If there are dependencies between commits, order them
- If files should be removed or ignored, say so explicitly
Conventional Commits
Format: <type>[optional scope][optional !]: <description>
Types
| Type | Use for |
|---|---|
feat | New features |
fix | Bug fixes |
docs | Documentation only |
style | Formatting, whitespace (no code change) |
refactor | Code change that neither fixes nor adds |
perf | Performance improvements |
test | Adding or correcting tests |
build | Build system or dependencies |
ci | CI configuration |
chore | Other changes (tooling, config) |
revert | Reverting 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:
- Short summary of proposed commits
- 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
レビュー
💬
レビュー機能は近日公開予定です