git-works-push

Commits working tree changes with AI-generated Chinese messages and pushes to origin dev.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/lechao365/AndroidSystemEnhance --skill git-works-push-lechao365
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-works-push
Source: https://github.com/lechao365/AndroidSystemEnhance/tree/main/harness/skills/git-works-push
Command: npx skills add https://github.com/lechao365/AndroidSystemEnhance --skill git-works-push-lechao365

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Manually writing consistent commit messages and safely pushing verified code changes is error-prone: wrong branches get pushed, unverified code slips in without receipts, credentials leak into commits, and failed CI goes unnoticed. This Skill automates the collect-diff → generate-message → commit → push pipeline with six hard guardrails. ## Core Features & Use Cases - Guarded commit and push: Enforces six pre-commit gates including branch guard (never main/master), Chinese commit message prefix validation, baseline declaration registration, untracked-file whitelist, credential scanning, and receipt-to-commit-scope binding. - AI-generated Chinese commit messages: Collects the working tree diff (with degradation sampling for large diffs) and generates a message following the <中文type>(<scope>): <subject> format with six allowed types. - CI gate before push: Checks the GitHub Actions run conclusion of the previously pushed commit and blocks on failure, with an explicit GWP_SKIP_CI_CHECK=1 escape hatch. - Use Case: After cross-device edits are verified on a Raspberry Pi build, run this Skill to commit the code plus verification receipts in one batch and push to origin dev, with automatic remote SHA verification. ## Quick Start Ask the AI to commit and push the current dev branch changes using git-works-push after verification receipts are in place.

Frequently Asked Questions about git-works-push

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit and push dev branch changes with git-works-push?

Ensure you are on the dev branch with verification receipts in data/verify-results/, let the AI generate a Chinese commit message from the diff, then run git_works_push.sh --message-file <file>. The script commits, pushes to origin dev, and verifies the remote SHA matches local HEAD.

What commit message format does git-works-push require?

The first line must be <中文type>(<scope>): <subject> where type is one of 新增/修复/重构/文档/构建/杂项. English prefixes like feat or fix are rejected to prevent commit style drift.

Why does git-works-push reject my push with RECEIPT_MISSING?

The commit scope contains code/ business source files but no verification receipt commit_scope exists. Run /workspace-verify first to produce a receipt, or set LGW_ALLOW_NO_RECEIPT=1 as an emergency escape hatch for manual scenarios.

Can git-works-push commit to the main branch?

No. The script hard-blocks pushes to main or master and rejects any commit when the current branch is not dev, including detached HEAD states. It only handles the dev branch contract.

What happens when the pre-push CI check fails?

If the previously pushed commit's GitHub Actions run concluded failure or timed_out, the push is blocked fail-closed. API errors degrade to warnings, and you can explicitly set GWP_SKIP_CI_CHECK=1 only when no CI exists.

Why does git-works-push reject untracked files?

Only whitelisted paths (data/verify-results/, data/baselines/, harness/, code/, docs/, .github/, .githooks/, requirements.txt) may be added as untracked files. Anything outside the list is rejected to prevent git add -A from swallowing runtime or local artifacts.