Stage, commit, and push in one step from inside an AI coding agent.
gitpush detects whether you're in Claude Code or Codex, writes a
meaningful, change-specific commit message, and pushes — with a clean author
identity.
No
Co-Authored-By. No AI profile or avatar on your GitHub commits. The commit stays under your own identity.
Via the skills.sh CLI:
# project-local
npx skills add anilsoylu/gitpush
# or globally for all repos
npx skills add -g anilsoylu/gitpush
# target a specific agent
npx skills add anilsoylu/gitpush --agent claude-code
npx skills add anilsoylu/gitpush --agent codexRepo: https://github.com/anilsoylu/gitpush
Just tell your agent:
gitpush "feat: add login validation"
or simply "commit and push" / "kaydet ve gönder". The skill will:
- Detect the tool (Claude Code vs Codex) from the environment.
git add -A.- Commit with your message — no AI signature.
git push(sets upstream automatically on the first push).
Run the script directly if you like:
bash skills/gitpush/scripts/gitpush.sh -m "fix: handle empty cart"| Flag | Meaning |
|---|---|
--auto |
Write a detailed message (subject + bullet body) with the cheap/low-effort model (~zero tokens from your main session). |
--no-body |
With --auto, produce only the subject line. |
-m "msg" |
Provide the commit subject yourself. |
--no-push |
Commit only. |
--deeplink |
Opt in to a claude:// / codex:// deep-link trailer (off by default). |
--coauthor |
Opt in to a Co-Authored-By trailer (off by default). |
--tool claude|codex |
Force tool detection. |
--dry-run |
Preview without changing anything. |
Everything that puts an AI footprint on the commit is strictly opt-in.
Writing a commit message normally makes your main (expensive) agent read the
diff — that burns tokens, especially on big changes. --auto offloads it:
bash skills/gitpush/scripts/gitpush.sh --autoIt spawns a separate, throwaway call on the cheapest setting of whichever tool you're in:
- Claude →
claude -p --model haiku --effort lowwith thinking disabled. - Codex →
codex exec -c model_reasoning_effort=low.
This runs in its own process and does not change your interactive session's
model or effort — your Opus/high-effort session stays exactly as it is. If the
cheap model can't be reached, it falls back to a heuristic message. Tune the
model via GITPUSH_CLAUDE_MODEL / GITPUSH_CODEX_MODEL.
By default --auto writes a detailed message — a Conventional-Commits
subject plus a bullet body describing each change:
feat: add navigation link for documentation and update ignore files
- Add a documentation link in the site header pointing to docs.launchly.dev
- Exclude the docssite directory in .dockerignore and .gitignore
- Add a navDocs entry to each locale JSON for the new link
Pass --no-body (or GITPUSH_BODY=0) for a single-line subject instead.
--tool claude|codex forces the generator regardless of where you're running.
So from a Claude session you can have Codex write the commit:
bash skills/gitpush/scripts/gitpush.sh --auto --tool codexPrefer a callable tool over a skill file? mcp/server.js is a zero-dependency
Node stdio MCP server that exposes a gitpush tool, so Claude Code, Codex,
Cursor, OpenCode, Windsurf, and other MCP clients can stage + commit + push
directly. The tool argument selects the target generator (e.g. call with
{auto:true, tool:"codex"}). Per-client config is in
skills/gitpush/mcp/README.md.
# Claude Code, for example:
claude mcp add gitpush -- node ~/.claude/skills/gitpush/mcp/server.jsWant it to commit + push automatically every time the agent finishes? Wire the
opt-in Stop hook. It only fires when GITPUSH_AUTO=1 is set, so it never
runs by accident.
⚠️ Heads up: auto mode runsgit add -Aand pushes unattended. It commits anything not in your.gitignore— including.envfiles and secrets. Only turn it on in repos with a solid.gitignore, never in one holding credentials.
Claude Code — add to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{ "hooks": [ { "type": "command",
"command": "GITPUSH_AUTO=1 bash ~/.claude/skills/gitpush/hooks/gitpush-stop-hook.sh" } ] }
]
}
}Codex — point its session-end / stop hook at the same script with
GITPUSH_AUTO=1.
- Claude Code is detected via
CLAUDECODE=1/CLAUDE_CODE_SESSION_ID. - Otherwise the agent context is treated as Codex; the thread id (used only
for the optional deep link) is resolved from
~/.codex/sessions/**/rollout-*.jsonlby matching the session'scwdto the current repo. - Override anytime with
--tool claude|codex.
gitpython3(optional — only speeds up Codex thread resolution; there's a pure shell fallback).
gitpush/
└── skills/
└── gitpush/
├── SKILL.md # skill definition (skills.sh / Agent Skills format)
├── scripts/gitpush.sh # core: detect → add → commit → push
└── hooks/gitpush-stop-hook.sh# optional opt-in auto mode
MIT © Anil Soylu