commit

This skill should be used when the user asks to "commit changes", "push my code", "commit and push", "save my work", or wants to stage all changes and push to remote.

5 stars

Best use case

commit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when the user asks to "commit changes", "push my code", "commit and push", "save my work", or wants to stage all changes and push to remote.

Teams using commit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/commit/SKILL.md --create-dirs "https://raw.githubusercontent.com/ianphil/genesis/main/.github/skills/commit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/commit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How commit Compares

Feature / AgentcommitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when the user asks to "commit changes", "push my code", "commit and push", "save my work", or wants to stage all changes and push to remote.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Commit

Stage changes, record observations, commit, and push.

## Phase 1: Review Changes

```bash
git status
git diff --stat
git diff
```

Understand what changed and why. This context feeds Phase 2.

## Phase 2: Write Working Memory

**This phase is mandatory.** Every commit must evaluate whether observations belong in `.working-memory/log.md`.

### Setup (first time only)

If `.working-memory/` does not exist in the repo root:

```bash
mkdir .working-memory
```

Create `.working-memory/memory.md`:

```markdown
# Working Memory — Memory
```

Create `.working-memory/log.md`:

```markdown
# Working Memory — Log
```

### Append Observations

Reflect on the **entire session** — not just the diff. Consider:

- Architecture patterns or gotchas discovered
- Build/test commands that aren't documented
- Surprising behavior, race conditions, edge cases
- File relationships or conventions not obvious from code
- Dependency quirks or version constraints

**Append** to `.working-memory/log.md` using this exact format:

```markdown
## YYYY-MM-DD
- <area>: <one-line observation>
- <area>: <one-line observation>
```

If today's date header already exists, append bullets under it. Otherwise create a new header.

### What NOT to write

- Anything already in `README.md` or `AGENTS.md`
- Generic statements ("the code is well-structured")
- Descriptions of what you just changed — that's what the commit message is for

### When to skip

Only skip if **genuinely nothing new was learned** in this session. This should be rare. If you touched code, you almost certainly learned something. When in doubt, write a note.

## Phase 3: Commit

```bash
git log -3 --oneline
```

Match the existing commit style. Stage files explicitly:

```bash
git add <changed files>
git add .working-memory/log.md          # always include if modified
git add .working-memory/memory.md       # include if created
```

Prefer `git add <file>` over `git add -A`.

Commit message format:

```
<type>: <short description>

<optional body explaining why>
```

Types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`

## Phase 4: Push

```bash
git push
```

If push is rejected (behind remote):

```bash
git pull --rebase
git push
```

## Phase 5: Refresh Briefing

After a successful push, refresh the condensed briefing:

```bash
# Only if .working-memory/briefing.md exists
if [ -f .working-memory/briefing.md ]; then
  echo "Briefing refresh: review .working-memory/briefing.md for staleness"
fi
```

## Rules

- Do NOT add Co-Authored-By, Signed-off-by, or any trailer attributions
- Do NOT use `git add -A` unless every changed file should be staged
- Do NOT skip Phase 2 without explicitly stating why nothing was learned
- If on `main` or `master`, warn the user before pushing

Related Skills

daily-report

5
from ianphil/genesis

Generates a comprehensive daily report covering ADO work items, Teams chats, calendar, email, local mind next-actions, and inbox notes. Run this each morning to get a scannable summary of everything you need to know to start your day. Use when user asks for "daily report", "morning briefing", or "what's on my plate today".

caveman-commit

9
from wahidyankf/open-sharia-enterprise

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

git-precommit

9
from u9401066/pubmed-search-mcp

Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates, and MCP tool count sync. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.

git-commits

9
from jpoutrin/product-forge

Git commit best practices with conventional commits format and atomic commit principles. Use when committing code to ensure clear, meaningful commit history with proper type prefixes and semantic versioning support.

commit

9
from jpoutrin/product-forge

Guided git commit with atomic commit analysis and conventional commit format

incremental-commits

9
from aspiers/ai-config

Break multi-file changes into atomic commits ordered by dependency. Use for refactors, breaking API changes, or features touching 3+ files.

git-commit

9
from aspiers/ai-config

Create well-formatted commits following conventional commits style with proper atomic commits and descriptive messages

commit-error-handling

8
from dhofheinz/open-plugins

Handle git errors and edge cases gracefully

commit-best-practices

8
from dhofheinz/open-plugins

Enforce git commit best practices and workflow guidance

commit-analysis

8
from dhofheinz/open-plugins

Analyze git changes to understand nature, scope, and commit type for intelligent message generation

atomic-commit

8
from dhofheinz/open-plugins

Guide splitting large commits into atomic, focused commits

update-precommit

8
from reidemeister94/development-skills

Use when user wants to update .pre-commit-config.yaml hooks to their latest versions from GitHub