Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add FradSer/dotclaude --skill commit-and-push -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/commit-and-push/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/commit-and-push/

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

Similar skills

All skills for Git and GitHub →

From the same set16

The whole set →
patent-architect patent-architect searches prior art through SerpAPI or WebSearch and drafts Chinese patent application forms. Handy when documenting technical innovations. CX Codex +1 622installs behavior-driven-development behavior-driven-development — a BDD skill for feature work, bug fixes, and executable tests. It turns behavior examples into failing tests before implementation. CX Codex +1 151installs executing-plans executing-plans — a skill for Claude Code, Codex, and Cursor. Executes written implementation plans in task batches using isolated coordinator sub-agents and a single final commit. CX Codex +1 126installs brainstorming brainstorming — a skill for Claude Code and five other tools that turns raw ideas into ready BDD specs. It researches your codebase autonomously and commits the technical design without asking questions mid-run. CX Codex +1 124installs writing-plans writing-plans — a skill for Claude Code, Codex, Cursor and other platforms that transforms a finished design into an executable implementation plan. CX Codex +1 123installs refactor-project refactor-project — a skill for Claude Code, Codex, Cursor and other agents that runs automated refactoring across every file in the project at once. Cuts duplication, normalises patterns, and strips legacy code in a single pass. CX Codex +1 122installs plugin-best-practices plugin-best-practices validates Claude Code plugin structure, manifests, and architecture against framework standards. Ensures your plugin meets requirements before marketplace submission. CX Codex +1 121installs commit This skill creates atomic conventional commits through git-agent. Use it when a short intent should become a focused Git commit. CX Codex +1 121installs

Project sponsors

Companies that keep this analytics open