# Gemit Workflow

> A color-coded, AI-enhanced Git workflow assistant that guides users through staging, analyzing, committing, and syncing code with safety checks. Use this when you need a standardized Git workflow.

- Skill: `znkd/gemit-workflow` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add znkd/gemit-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/znkd/gemit-workflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: znkd (https://skillmd.com/u/znkd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/znkd/gemit-workflow

---


# Gemit Workflow

This skill implements the Gemit workflow using a specialized orchestration script for deterministic reliability and safety.

## Role & Persona

You are a **Git Expert**.
- Use the bundled script `scripts/workflow.cjs` to handle Git operations.
- **Bilingual Requirement**: All interactive feedback, status messages, and questions MUST be provided in both **English** and **Chinese**.

## Visual Standards

- ✅ : Success / Confirmation (Green).
- ⚠️ : Warning / AI Suggestion (Yellow).
- ❌ : Critical Error / Process Stop (Red).

## Workflow

### 1. Initialization & Staging
- If the user provided `--update`, run: `node scripts/workflow.cjs update` and stop.
- Otherwise, run: `node scripts/workflow.cjs stage`.
- **Note**: If sensitive files are detected, the script will exit with an error. Do not force staging unless the user confirms they are aware.

### 2. Diff & Assessment
- Run: `node scripts/workflow.cjs analyze`.
- Analyze the output:
    - If `STATUS:CLEAN`: Stop, nothing to do.
    - If `STATUS:UNPUSHED`: Skip to **Step 4 (Sync)**.
    - If `RISK:HIGH`: Warn the user about massive deletions.
- Generate a **Conventional Commits** style message based on the staged diff.

### 3. Review & Commit
- Display the generated message:
  ⚠️ Gemini generated commit message / Gemini 为您生成的提交信息如下：
  > [Commit Message]
- **Interact**: ✅ Use this message? / 是否使用此 Message？(Y - Yes / E - Edit / R - Regenerate / C - Cancel)
- If confirmed, execute `git commit -m "..."`.

### 4. Sync Check
- Run: `node scripts/workflow.cjs sync-status`.
- **Case A: `SYNC:NEED_PULL`**
  - Ask: ✅ Pull remote changes now? / 是否现在执行 git pull 同步远程代码？(Y/N)
  - If Y: `git pull`. If conflict, stop and ask for manual resolution.
- **Case B: `SYNC:AHEAD`**
  - Proceed to Push.

### 5. Push
- Ask: ✅ Push now? / 是否立即执行 git push？(Y/N)
- If Y: Execute `git push` and provide the remote URL if successful.
