| name | codewith-git-ship |
| description | Create logical commits and push Codewith changes safely. Use when asked to review current changes, split work into commits, avoid unrelated local work, push to GitHub, reconcile a dirty hasna/codewith checkout, or prepare commits before publishing. |
Codewith Git Ship
Overview
Use this skill to move Codewith repo changes from working tree to GitHub without mixing unrelated work. This repo is hasna/codewith, a Codewith fork of upstream Codex.
Guardrails
- Never revert or overwrite user changes unless the user explicitly asks.
- Never use
git reset --hard or git checkout -- <path> for cleanup without explicit approval.
- Use non-interactive Git commands.
- Stage only explicit paths for the intended change. Avoid broad
git add . in a dirty worktree.
- Keep commits logical and reviewable; prefer multiple focused commits over one mixed commit.
Workflow
- Inspect current state:
git status --short
git branch --show-current
git log --oneline --decorate -8
git remote -v
- If the active checkout has unrelated local work, create or reuse a clean temporary worktree from
origin/main and work there:
git fetch origin main
git worktree add --detach /tmp/codewith-current.<suffix> origin/main
- Identify intended change groups with
git diff --stat, git diff -- <path>, and git status --short. Read enough surrounding code to understand ownership and tests.
- For each logical commit:
git add <explicit paths>
git diff --cached --stat
git diff --cached --check
git diff --cached -- <representative paths>
git commit -m "<type(scope): summary>"
- Verify the commit stack before pushing:
git status --short
git log --oneline --decorate origin/main..HEAD
- Push the intended branch or detached-HEAD commit to GitHub:
git push origin HEAD:main
- Confirm remote state:
git ls-remote origin main
git log --oneline --decorate -5
Dirty Worktree Triage
When the user says to include "only what's right now", treat that as a request to isolate the current intended change from other local work. Do not assume every modified file in the root checkout is part of the requested commit.
If the intended change cannot be separated without risking user work, stop and summarize the exact conflicting paths instead of committing.
Reporting
Report commit hashes, push target, and any tests or validation that were run. Mention unresolved dirty files only when they are in the relevant checkout and were intentionally left alone.