# Commit And Push

> Creates atomic conventional git commits using git-agent and pushes changes to the remote repository.

Creates atomic conventional git commits using git-agent and pushes changes to the remote repository.

- Page: https://ss33.ai/skills/fradser/commit-and-push-91807717017
- Publisher: fradser
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Source control & code review](https://ss33.ai/skills/category/software-development-t44z8z/source-control-and-code-review-jebezw)
- License: MIT
- Source: https://github.com/fradser/dotclaude/blob/f55ac1cea49240ca09c981e43e08f3bc1bc5b6ed/git-agent/skills/commit-and-push/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/fradser/commit-and-push-91807717017

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`

> **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.
