| name | git |
| description | Internal skill — called by other skills after code is approved and tested. Commits and pushes changes to main. Handles missing git identity and GitHub auth in plain English for non-technical users. |
Git Skill
Commit and push approved changes to main. This skill is called internally — never triggered directly by the user.
Steps
1 — Check git identity
Run: git config user.name and git config user.email
If either is empty, ask the user:
"Before I can save your changes, I need a name and email to label them with. What should I use? (These are just labels — they can be anything.)"
Then run:
git config --global user.name "NAME"
git config --global user.email "EMAIL"
2 — Check remote access
Run: git ls-remote --heads origin (10-second timeout)
If it fails, tell the user:
"I can't reach GitHub right now. This usually means you're not logged in yet. Please run this in your terminal and tell me when it's done: gh auth login"
Wait for confirmation, then retry once.
If it still fails:
"I wasn't able to connect to GitHub. Your changes are saved on your computer — you can push them later by saying 'push my changes'."
Stop here. Do not proceed to step 3.
3 — Commit and push
git add -A
git commit -m "COMMIT_MESSAGE"
git push origin main
Generate COMMIT_MESSAGE from the feature description — short, plain English, no jargon (e.g. add search box, add login form).
If push fails with a conflict:
- Run:
git pull --rebase origin main then git push origin main
- If that also fails, tell the user:
"I ran into a conflict saving your changes. This is rare — please ask a developer for help."
- Stop.
4 — Confirm
Tell the user:
"Done! Your changes are saved and GitHub is building the latest version."