Commits

From JetBrains/intellij-community · View interactive version

Commits is an AI agent skill from the GitHub repository JetBrains/intellij-community. Read before each commit, amend or reword: the subject SafePush accepts and the body.

How to use this skill

Skill file

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/commits/SKILL.md -->

Commits

Scope

Message

IDEA-12345 <subject>              # a change with a ticket: the id, then one sentence
<label> <subsystem>: <subject>    # a change with no ticket

or a subsystem: the id already names the area. IDEA-12345 skip a generated file in the inspection, not

IDEA-12345 the inspection skips a generated file or IDEA-12345 fix inspections: generated files.

A test, a docs, or a cleanup commit of a ticket takes the same form;

the body says that it is a test or a docs change. A module AGENTS.md can require a subsystem, and its rule wins.

the rest must pass SafePush alone.

Body

Write a body unless the change is mechanical (a typo, an import, a format pass). Tests and cleanups need one too.

why. Skip an obvious decision and a detail that the diff shows. Write code names in backticks.

passes its tests. Give a measurement that caused the change in the lead or in its decision.

remaining work in words.

Passing the message

In a POSIX shell, use a quoted heredoc:

git commit -F - <<'EOF'
IDEA-12345 concise subject

Why the change was made and what was decided.
EOF

In PowerShell, pass one -m per paragraph, also with --amend. Do not pipe a here-string into -F -.

Windows PowerShell adds a BOM to the subject, and SafePush rejects it.

git commit -m "IDEA-12345 concise subject" -m "Why the change was made and what was decided." -m "IJ-MR-100"

Do not write the message to a file outside the workspace, such as /tmp: that asks for a filesystem approval and leaves a plaintext draft behind. If you need a file, give it a name unique to your session under the gitignored out/, such as out/commit-message-<session>.txt. Several sessions share one working copy, and a peer can overwrite a shared file name between your write and your commit.

Examples

IJAI-3334 name the step of the published-surface wait in the editor service test and dump the state

The test failed once on TeamCity with no log line in its 10 s window, and 208 local runs did not reproduce it.
The helper now waits for the subscription and then for the apply, under one deadline, and a failure adds the
state of the test backend and a coroutine dump. No product code changes.

A change with no ticket, with a Branch Deck prefix:

(dev-dist-cache) setup build: write the pinned Qodana build date into the dev dist launch model

QD-16701 added -Dqodana.build.date=<yyyyMMddHHmm> to the qodana command of the production product-info.json.
`computeProductLaunchModel` gave no date to `QodanaProductProperties`, so the dev dist model had no such argument.
`DistProductLaunchModelTest` compares both files byte for byte, and it failed.

The model now states the token @@build_date@@, next to @@build_number@@. product-files replaces it with the date
of --build-date-seconds, which the action already receives. A test exclusion would hide a real difference
of the dev dist qodana command, so the tool writes the argument as production does.

Other cases, such as isolated commits and misc triage: 2_Commits.md. To push, use the safe-push skill.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.