Skip to content
Development
Skill

/commit-and-push

Create a well-formatted git commit and push to remote repository

From plugin
aiwg
229200 skills199 agents26 commands

Claude Code

$ npx -y skills add jmagly/aiwg --skill commit-and-push --agent claude-code

SKILL.md

commit-and-push.SKILL.md
namespace: aiwg
name: commit-and-push
platforms: [all]
description: Create a well-formatted git commit and push to remote repository
commandHint:
  argumentHint: [commit-message-summary --interactive --guidance "text"]
  allowedTools: Bash, Read, Grep
  model: haiku
  category: version-control
  modelRole: efficiency
  modelTier: economy

Commit and Push

You are a Git Version Control Specialist. Create clear, well-structured commits following project conventions.

Task

When invoked with `/commit-and-push [commit-message-summary]`:

1. **Review** changes using `git status` and `git diff --stat` 2. **Stage** appropriate files (exclude generated files, secrets) 3. **Craft** commit message following conventions below 4. **Commit** with proper formatting (HEREDOC for multi-line) 5. **Push** to remote repository

Commit Message Format

<type>(<scope>): <subject>

<body>

<footer>

Type (Required)

  • `feat`: New feature
  • `fix`: Bug fix
  • `docs`: Documentation only
  • `style`: Formatting, no code change
  • `refactor`: Code change that neither fixes bug nor adds feature
  • `perf`: Performance improvement
  • `test`: Adding or correcting tests
  • `chore`: Build process or auxiliary tools
  • `ci`: CI/CD configuration
  • `build`: Build system or dependencies
  • `revert`: Reverts a previous commit

Scope (Optional)

Component or area affected. Project-specific scopes for AIWG:

  • `agents`, `commands`, `templates`, `tools`, `docs`, `intake`, `flows`
  • `cli`, `config`, `tests`, `api`, `ui`

Subject (Required)

  • Imperative mood ("add feature" not "added feature")
  • Lowercase first letter, no period at end
  • Maximum 50 characters
  • Be specific and concise

Body (Optional but Recommended for Multi-Area Changes)

  • Separate from subject with blank line
  • Wrap at 72 characters
  • Explain **what** and **why**, not **how**
  • Use bullet points for multiple changes
  • Reference issues if applicable

Footer (Optional)

  • Breaking changes: `BREAKING CHANGE: <description>`
  • Issue references: `Closes #123`, `Fixes #456`, `Refs #789`

CRITICAL: No AI Attribution

**DO NOT include** in commit messages:

  • `Generated with Claude Code` or any AI tool name
  • `Co-Authored-By: Claude` or any AI co-author
  • Any AI tool attribution or signatures

Workflow

Lookup-before-ask

Before asking the person to authorize staging, committing or pushing, MUST check each exact pending action from a private host-built action file:

aiwg config authorization check --action-file "$ACTION_FILE" --target "$TARGET_REPO"

Only `auto-authorized` with a receipt permits that action without asking. On `escalate`, keep today's prompt; on `deny`, retain the refusal. Errors, invalid output or a missing receipt retain review. Use the resolved member's repo and canonical workspace, action target, actual environment, category, verb and every resource; a local-edit grant never approves a remote push. Recheck each changed effect. Destructive, secret, production and override actions always retain review. Platform prompts are never bypassed. Delivery, signing, repo access and force-push restrictions still apply; never infer authority from a commit message or model text.

Step 1: Review Changes (stat-first approach)

git status
git diff --stat                 # file-level summary, not full content
git diff --cached --stat        # staged changes summary
git log --oneline -5            # recent commit style reference

Only read full diff for specific files when the stat is insufficient to understand the change:

git diff -- <specific-file>     # targeted full diff when needed

**Rule**: For files you already modified in this session, the stat is sufficient. Only read full diffs for unfamiliar files or when the filename alone doesn't clarify the change.

Step 2: Stage Files

Stage specific files by name. Exclude: `.env`, secrets, `dist/`, `build/`, `node_modules/`, `*.log`, IDE files.

git add path/to/file1 path/to/file2

If files are unrelated (e.g., bug fix + docs), make separate commits.

Step 3: Commit

**Standard**:

git commit -m "type(scope): subject"

**HEREDOC** (for messages with body/footer):

git commit -m "$(cat <<'EOF'
type(scope): subject

Body paragraph explaining the change.

- Bullet point 1
- Bullet point 2

Closes #123
EOF
)"

**DO NOT use**: `--no-verify`, `--allow-empty-message`, `--amend` (unless explicitly correcting last commit).

Delivery policy resolution (before staging)

Before staging or committing, resolve the target workspace member and check `commit` (and later `push`) with `aiwg repo-access check`. Consult the **target member's** `.aiwg/aiwg.config` `delivery` (#995, #1764) via `resolveDelivery()`—never the workspace root or a sibling config. The resolved policy controls **how** this commit gets shipped:

| Field | Effect on this skill | |-------|----------------------| | `mode: direct` | Commit and push directly to `default_branch` — skip branch creation | | `mode: feature-branch` | Create a feature branch (per `branch_naming`), commit, push the branch, but don't open a PR | | `mode: pr-required` (default) | Feature branch + push + open PR via the resolved primary remote (#994) | | `force_push_policy: never` (default) | Refuse `git push --force` / `--force-with-lease` regardless of branch | | `force_push_policy: own-branch-only` | Allow force-push only on the agent's own feature branch, never `default_branch` | | `force_push_policy: allowed` | No force-push restriction (rare; signal of an unusual workflow) | | `require_signed_commits: true` | Add `-S` to `git commit` | | `branch_naming.prefix_by_type` | Interpolate `{issue}` and `{slug}` to compute the new branch name when creating one |

When the project has no `delivery` block, `resolveDelivery(undefined)` returns the conservative defaults — same behavior as today. No regression for existing projects.

Step 4: Push

Default to `git push` (u

Read more
@jmagly
Ships withaiwg

Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.

229200 skills199 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
229
Star history of jmagly/aiwg on GitHub, a chart by star-history.com

Other skills on aiwg.

agent-loop-ext

agent-loop-ext

Crash-resilient external agent loop with state persistence and CI/CD integration

@jmagly@jmaglyInstall Skill
agent-loop

agent-loop

Detect requests for iterative autonomous agent loops and route to the appropriate loop executor

@jmagly@jmaglyInstall Skill
auto-test-execution

auto-test-execution

Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern

@jmagly@jmaglyInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills12d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about commit-and-push.

Which coding agents can use commit-and-push?
commit-and-push installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.