Skip to content
Back to skills

Commit

ASecurity

Commits the current task's changes locally — stages only owned files, writes the message in the repo's format, lets pre-commit hooks run. Use for /haechi:commit, when a unit of work is done and needs its local commit, or when the user asks to commit.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 19, 2026
ai-agentsgoshellbashgit

Security analysis

A100/100

Scanned November 19, 2026

npx -y skills add jisuzzzz/haechi --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jisuzzzz-commit/badge)](https://www.skillsdirectory.com/skills/jisuzzzz-commit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: commit
description: Commits the current task's changes locally — stages only owned files, writes the message in the repo's format, lets pre-commit hooks run. Use for /haechi:commit, when a unit of work is done and needs its local commit, or when the user asks to commit.
---

# Commit

Works with Git on any host. Follow repository instructions and the shared authorization and completion rules.

Resolve the current branch with `git branch --show-current`. Use repository instructions for the base and protected branches. Use the local remote HEAD (`git symbolic-ref --short refs/remotes/origin/HEAD`) to find the default branch when needed. Do not infer branch rules from history. Before committing on a base or protected branch, create a task branch using the session's naming rule. If branch safety remains unclear, ask only about that choice. A local commit needs no Git host login.

## 1. Review

Run these together:

```bash
git status
git diff --staged
git diff
git log --oneline -10
```

No changes: say so and stop.

## 2. Stage

- Stage only the files the current task owns, by name: `git add src/orders/formatDate.ts test/orders/formatDate.test.ts`. Never `git add -A` or `git add .` without reading the status first — the tree can hold another session's work.
- Never stage secrets: `.env` files, keys, tokens, credentials. If one shows up in the diff, leave it out and tell the user.
- Files already staged that the task does not own may be another session's: do not unstage them. Commit only your paths instead (`git commit -F - -- <your files>`) and say so.
- Note every changed file you leave unstaged and the reason. You report it at the end.

## 3. Message

- Use the format in the repository instructions. If they give no format, use the recent log already collected in Review. With no history, use a concise imperative subject describing the change.
- The subject says what changed. The body is optional and says why.
- One commit per unit of work. Split only when the kinds of diff differ — a file move and a behavior change go in separate commits, as the refactor playbook says (/haechi:refactor).
- End with the attribution trailer the environment asks for, if any.
- Pass the message through a single-quoted heredoc in a POSIX shell. PowerShell can corrupt non-ASCII arguments to native programs.

```bash
git commit -F - <<'EOF'
fix(orders): keep the time zone when formatting due dates

formatDate dropped the offset, so orders due at 23:30 showed the next day.
EOF
```

## 4. Hooks

- pre-commit hooks run. Never pass `--no-verify`.
- A hook fails: read its output, fix the cause, stage the fix and commit again. The commit did not happen, so this is a new commit, not an amend.
- A hook changes files (a formatter, for example) and the commit stops: stage those files and commit again.
- Never amend a commit that is already pushed.

## 5. After the commit

- Push only with user authorization. Reuse authorization already given for this push; otherwise ask first.
- Merging into the base or a protected branch is not part of this skill. Merge requests go through /haechi:mr.

## Report

- The commit hash and subject, one line per commit.
- What stayed uncommitted, each file with the reason (another task's file, a secret, generated output).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.