agentleFS
digital-go-jpdigital-go-jp/design-system-example-components-react/.agents/skills/create-commit/SKILL.md

create-commit

Skill685 starsChanged 26 days agoMITView on GitHub

Stage files, generate a commit message in this repo's Conventional Commits style, and commit after user approval.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-pr.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 11 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Commit messages follow Conventional Commits, and the conventions in AGENTS.md § _Commit messages_.

    line 15
  2. Distinctive:

    If there are no changes at all, stop and tell the user there is nothing to commit.

    line 28
  3. Very specific:

    If there are unstaged changes, use AskUserQuestion (multiSelect: true) to ask which files to stage:

    line 30
  4. Distinctive:

    If files are already staged, mention them in the question text so the user knows what is already in the index.

    line 34
  5. Distinctive:

    If everything is already staged, skip to step 2.

    line 36
  6. Distinctive:

    After the selection, stage with git add (specific files.

    line 38
  7. Distinctive:

    If empty, stop and tell the user there is nothing to commit.

    line 50
  8. Distinctive:

    Read the full file for new files.

    line 59
  9. Distinctive:

    Check git log --oneline -5 to follow recent style.

    line 60
  10. Distinctive:

    If the user requests changes, revise and ask again.

    line 66
  11. Distinctive:

    After the commit, show the result:

    line 89
  12. Very specific:

    If a pre-commit hook fails, fix the underlying issue and create a new commit — do not amend or skip hooks (--no-verify) without explicit …

    line 95
  13. Very specific:

    Component PascalCase: when the change is to one component: feat(ProgressIndicator), refactor(Button), fix(FileUpload).

    line 125
  14. Very specific:

    Skill name (kebab-case): when the change is to one skill: docs(port-html-to-react), docs(write-tests).

    line 126
  15. Distinctive:

    Use the body when the description alone doesn't convey the why.

    line 141

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Context

  • Current git status: !git status
  • Current git diff (staged and unstaged changes): !git diff HEAD
  • Current branch: !git branch --show-current
  • Recent commits: !git log --oneline -10

General rules

  • Commit messages follow Conventional Commits, and the conventions in AGENTS.md § Commit messages.
  • Description: English, imperative mood (e.g. "add", not "added" / "adds"), no leading capital, no trailing period, ≤ 72 characters.
  • Body (when included): English, wrap at ~72 characters, blank line after the description, explain what / why (not how).
  • For breaking changes, add ! after the type or type+scope (e.g. feat!:, feat(Button)!:).

Workflow

1. Check changes and stage files

git status --short

If there are no changes at all, stop and tell the user there is nothing to commit.

If there are unstaged changes, use AskUserQuestion (multiSelect: true) to ask which files to stage:

  • First option: "Stage all" — stages every unstaged/untracked file.
  • Then list each individual unstaged/untracked file.

If files are already staged, mention them in the question text so the user knows what is already in the index.

If everything is already staged, skip to step 2.

After the selection, stage with git add (specific files; avoid git add -A / git add . so we don't accidentally pick up secrets or large binaries):

git add <file1> <file2> ...

2. Verify staged changes

git diff --cached --stat

If empty, stop and tell the user there is nothing to commit.

3. Analyze the diff and draft a commit message

git diff --cached

For large diffs (>500 lines), start with --stat and read key files selectively. If needed for context:

  • Read the full file for new files.
  • Check git log --oneline -5 to follow recent style.

Draft a Conventional Commits message in this repo's style — see Commit message format below — and present it to the user via AskUserQuestion for approval:

  • Option 1: Approve.
  • Option 2: Request changes (user provides feedback via "Other").

If the user requests changes, revise and ask again. Do not run git commit until the user approves.

4. Execute the commit

Once approved:

git commit -m "<approved description>"

For multi-line messages (body / footer), use a HEREDOC:

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

<body>

<footer>
EOF
)"

After the commit, show the result:

git log --oneline -1

If a pre-commit hook fails, fix the underlying issue and create a new commit — do not amend or skip hooks (--no-verify) without explicit user approval.

Commit message format

<type>(<optional scope>): <description>

<optional body>

<optional footer(s)>

Type

  • feat — new feature (e.g. a new component, a new prop)
  • fix — bug fix
  • docs — documentation / agent rules / skill changes
  • refactor — code change that neither fixes a bug nor adds a feature
  • perf — performance improvement
  • test — adding or correcting tests
  • build — build system / dependencies (npm, vite, tsconfig)
  • ci — CI configuration
  • chore — other changes that don't modify src or test files
  • style — formatting only (Biome rarely produces these as standalone commits — most style fixes ride along with feature work)
  • revert — reverting a previous commit

Scope

Pick the most specific scope that applies, or omit it for cross-cutting changes:

  • Component PascalCase when the change is to one component: feat(ProgressIndicator), refactor(Button), fix(FileUpload).
  • Skill name (kebab-case) when the change is to one skill: docs(port-html-to-react), docs(write-tests).
  • No scope for cross-cutting changes: docs: trim Tech stack versions to majors.

Examples from this repo's history:

feat(ProgressIndicator): add pause/resume control to loop stories
refactor(ProgressIndicator): derive indeterminate state from value presence
docs(port-html-to-react): add src/index.ts re-export, drop animation pause rule
docs(review): drop the file length guideline
docs: trim Tech stack versions to majors

Body

Use the body when the description alone doesn't convey the why. Skip it for trivial changes.

  • Wrap at ~72 characters per line.
  • Blank line between description and body.
  • Bullet points are fine when listing multiple distinct points.

Footer

  • Reference related issues or PRs: Closes #123, Refs #456.
  • Breaking changes: BREAKING CHANGE: <description>.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.