gemit-workflow
npx machina-cli add skill znkd/tentacles/gemit-workflow --openclawGemit 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.cjsto 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 updateand 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.
- If
- 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 pushand provide the remote URL if successful.
Source
git clone https://github.com/znkd/tentacles/blob/main/skills/gemit-workflow/SKILL.mdView on GitHub Overview
Gemit Workflow standardizes the Git process: staging, analyzing, committing, and syncing with safety checks. It uses a specialized orchestration script (scripts/workflow.cjs) to run Git operations with deterministic reliability and provides bilingual feedback (English and Chinese) throughout the flow.
How This Skill Works
It acts as a Git Expert and runs the bundled script workflow.cjs to perform staged operations in order: stage (or update), analyze, and then commit with a generated Conventional Commits message, followed by sync-status and push. It interprets statuses like CLEAN, UNPUSHED, and RISK:HIGH to drive decisions, generates the commit note from the diff, and prompts for confirmation in both English and Chinese.
When to Use It
- Standardizing a team Git workflow across multiple repos
- Safely staging files and avoiding unintended changes when sensitive files are present
- Generating Conventional Commits messages automatically from diffs
- Ensuring sync readiness before pushing (pull or ahead) and handling conflicts
- Guiding a guided push with interactive confirmations
Quick Start
- Step 1: Start the workflow by running node scripts/workflow.cjs stage (or node scripts/workflow.cjs update if you passed --update)
- Step 2: Let the tool analyze the changes and present a generated Conventional Commits message for review
- Step 3: Confirm the message, resolve any sync prompts (pull if needed), and push when ready
Best Practices
- Always review the generated Conventional Commits message before committing
- Use the update path only when you explicitly intend to refresh the workflow state
- Pay attention to RISK:HIGH warnings about massive deletions and adjust accordingly
- Leverage bilingual prompts to avoid misinterpretation in English and Chinese
- Test the workflow on a feature/branch before applying to main or release branches
Example Use Cases
- A developer follows Gemit to stage changes, analyzes the diff, and commits with an automatically generated Conventional message
- A team prevents staging of sensitive files unless the user confirms awareness, reducing risk
- A release branch uses Gemit to ensure a clean, tracked push with a standardized commit message
- During sync, a conflict is detected after a pull prompt and is resolved manually with guidance from the tool
- Post-push, CI verifies that commits adhere to the Conventional Commits style and the staged workflow is consistent