commit-and-push — Claude Code skill: atomic commits and push
commit-and-push — a skill for Claude Code, Codex, Cursor, and other platforms that generates atomic commits using Conventional Commits standard via git-agent and pushes them to the remote repository.
MIT 126 installs ★ 597 updated 2026-11-06
npx skills add FradSer/dotclaude --skill commit-and-push -a claude-codeWhat commit-and-push does
The skill takes your change description (intent), passes it to git-agent, which generates a structured commit message following Conventional Commits, and then pushes the branch to the remote repository.
The implementation detects the active AI model from environment variables, supports the --co-author parameter to specify a co-author, and includes a --no-stage option if files are already staged. On authentication errors, it retries with --free. If git-agent is not installed, the skill reports an error and asks you to install the tool or run git commands manually.
For a deterministic commit message—like chore: bump version to 0.11.0—pass the full conventional message as the intent; it will be used verbatim.
What it helps with
- generate an atomic commit with automatic Conventional Commits message
- combine commit and push in one action with current AI model detection
- add a co-author to a commit via the --co-author flag
- create a commit when files are already in the staging area
Example prompts for the agent
- Commit and push these changes
- Create an atomic commit with the intent 'add API request caching' and push
- Make a commit with co-author Jane Smith and push to the remote
How to install commit-and-push
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a claude-code2Manually: put the files in place
~/.claude/skills/commit-and-push/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/commit-and-push/
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a codex2Manually: put the files in place
.agents/skills/commit-and-push/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a cursor2Manually: put the files in place
.cursor/skills/commit-and-push/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install FradSer/dotclaude git-agent/skills/commit-and-push2Manually: put the files in place
.github/skills/commit-and-push/SKILL.md1Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a gemini-cli2Platform CLI
gemini skills install https://github.com/FradSer/dotclaude --path git-agent/skills/commit-and-pushManually: put the files in place
.devin/skills/commit-and-push/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add FradSer/dotclaude --skill commit-and-push -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about commit-and-push
How do I install commit-and-push in Claude Code?
Run npx skills add FradSer/dotclaude --skill commit-and-push -a claude-code, then open ~/.claude/skills/commit-and-push/SKILL.md.
What does commit-and-push do?
The skill creates a structured commit via git-agent based on your description (intent), following Conventional Commits format, then pushes the branch to the remote repository.
What do I need to use this skill?
You need git-agent version 0.7.0 or higher installed. The skill automatically detects your AI model from environment variables (PI_MODEL and others). If git-agent is not found, the skill will report an error and suggest installing it manually.
Source text
SKILL.md · MIT
--- name: commit-and-push description: Creates atomic conventional git commits using git-agent and pushes changes to the remote repository. Use when the user asks to "commit and push", "commit with git-agent", or wants an atomic AI-generated commit followed by a push. user-invocable: true argument-hint: "[intent or --co-author]" allowed-tools: ["Bash(git-agent:*)", "Bash(git:*)"] --- CRITICAL: - Do NOT run `git status`, `git diff`, `git log`, or any other read commands before `git-agent commit`. - Execute `git-agent commit` directly. `git-agent` (v0.7.0+) automatically detects active model attribution from session environment variables (`PI_MODEL`, etc.). ## Execution 1. Derive a concise one-sentence intent from the conversation or `$ARGUMENTS`. 2. Pass `--co-author "<co-author>"` if explicitly specified in `$ARGUMENTS` or user instructions. 3. Run primary commit command: ```bash git-agent commit --intent "<intent>" ``` 4. If specific files are already staged, pass `--no-stage`: ```bash git-agent commit --no-stage --intent "<intent>" ``` 5. On auth error (401), retry with `--free`: ```bash git-agent commit --free --intent "<intent>" ``` 6. **Fallback** (if `git-agent` binary is not found): report the error and ask the user to install git-agent or run git commands manually. 7. Push to remote repository: ```bash git push ``` (If upstream is not set, use `git push -u origin <branch>`). CLI Reference: `../../references/cli.md` Attribution & retry-ladder reference: `../../references/coauthor-attribution.md` (covers `--no-attribution` and the `--free` retry) > **Deterministic messages:** When an exact commit message is required (e.g. version bump `chore: bump version to 0.11.0`), pass the full conventional message as the `--intent` value. The intent is used as the commit subject verbatim.
© FradSer · MIT · FradSer/dotclaude