Skip to main content

git-workflow

Use this skill when making commits, creating branches, or managing version control. Defines commit message format, branching strategy, and PR conventions for this project.

来源信息

仓库
aboodedc/dalil_alhakam
最近来源活动
2026年10月5日 20:04
检测到的 SKILL.md 语言
英语
星标
0
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
git-workflow
description
Use this skill when making commits, creating branches, or managing version control. Defines commit message format, branching strategy, and PR conventions for this project.
# Git Workflow Skill ## Overview Standardized Git workflow for consistent version control, meaningful commit history, and clean branching. --- ## 1. Commit Message Format Use **Conventional Commits**: ``` <type>(<scope>): <short description> [optional body] ``` ### Types | Type | When to Use | | :--------- | :---------------------------------------------- | | `feat` | New feature or functionality | | `fix` | Bug fix | | `ui` | UI/styling changes only | | `refactor` | Code restructuring without behavior change | | `docs` | Documentation changes | | `chore` | Build, config, dependencies | | `test` | Adding or updating tests | | `perf` | Performance improvement | ### Scope Use the route or component name: ``` feat(dashboard): add stats cards section fix(auth): handle expired token redirect ui(header): update mobile nav breakpoint refactor(search): extract filter logic to hook chore: update shadcn button component ``` ### Rules - **Lowercase** everything. - **No period** at the end. - **Max 72 characters** for the first line. - Use **imperative mood**: "add feature" not "added feature". - Reference task IDs when applicable: `feat(search): add filter panel (TASK-012)` --- ## 2. Branching Strategy ``` main (production-ready) ├── dev (integration branch) │ ├── feat/TASK-001-search-page │ ├── fix/TASK-005-login-redirect │ └── ui/TASK-008-dark-mode ``` ### Branch Naming ``` <type>/TASK-<id>-<short-kebab-description> ``` Examples: - `feat/TASK-001-search-page` - `fix/TASK-005-login-redirect` - `ui/TASK-008-responsive-header` - `refactor/TASK-012-extract-hooks` --- ## 3. Commit Granularity ### One logical change per commit ```bash # ✅ Good — focused commits git commit -m "feat(dashboard): add stats-cards component" git commit -m "feat(dashboard): add chart-section component" git commit -m "feat(dashboard): compose page from sections" # ❌ Bad — monolithic commit git commit -m "feat: build entire dashboard page" ``` --- ## 4. Pre-Commit Checks Before committing, always run: ```bash npx tsc --noEmit # Type check npm run lint # ESLint ``` If either fails, fix before committing.
在 GitHub 查看