commits

GitHub

指导如何创建、修改和重命名 IntelliJ 提交,确保符合 SafePush/Patronus 规范。涵盖标题格式(行为/非行为变更)、正文撰写(ASD-STE100 英语)、跨平台安全输入方法(POSIX/PowerShell)及最佳实践,避免 CI 失败。

.agents/skills/commits/SKILL.md DetachHead/rebased

Trigger Scenarios

生成或修改 Git 提交信息 处理 Windows PowerShell 下的 git commit 命令 检查提交是否符合项目规范

Install

npx skills add DetachHead/rebased --skill commits -g -y
More Options

Non-standard path

npx skills add https://github.com/DetachHead/rebased/tree/master/.agents/skills/commits -g -y

Use without installing

npx skills use DetachHead/rebased@commits

指定 Agent (Claude Code)

npx skills add DetachHead/rebased --skill commits -a claude-code -g -y

安装 repo 全部 skill

npx skills add DetachHead/rebased --all -g -y

预览 repo 内 skill

npx skills add DetachHead/rebased --list

SKILL.md

Frontmatter
{
    "name": "commits",
    "description": "Create, amend, or rename IntelliJ commits and write commit messages."
}

Commits

SafePush/Patronus rejects malformed commit messages, so a bad subject line costs a CI round trip.

Subject line

IDEA-12345 <subject>              # behavioral change — ticket, no subsystem prefix
<label> <subsystem>: <subject>    # clearly non-behavioral change
  • A behavioral change needs a YouTrack ticket. If you are unsure whether it is behavioral, it is.
  • Labels: tests, cleanup, refactor, docs, format, style, setup, misc.
  • Never begin a subject with WIP, fixup!, squash!, or amend!, and never use Conventional Commits (fix(scope): …).

Body

Write a body for every change except a mechanical one (a typo, an import, a format pass). This includes a non-production change. Say why you made the change and what you decided. The diff already shows what changed. Write the body in ASD-STE100 Simplified Technical English, as the repository guide (AGENTS.md, section Writing) defines it. A requested suffix such as IJ-MR-100 goes in its own trailing paragraph.

Safe message input

On POSIX shells, pass a multiline commit message through stdin with -F - and a quoted heredoc:

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

Explain why the change was made and what was decided.
EOF

On PowerShell, do not pipe a here-string into git commit -F -. Windows PowerShell may add a Unicode BOM to the first line, producing a malformed subject that SafePush rejects. Pass one paragraph per -m argument instead; the same form is safe with git commit --amend:

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

After committing or amending from PowerShell, inspect git cat-file commit HEAD and confirm that the subject begins directly with the ticket or label, without an invisible BOM.

Do not stage commit messages in /tmp, /private/tmp, or another path outside the workspace. That can require an extra filesystem-access approval and leaves a plaintext artifact behind. If a reusable draft is genuinely needed, keep it under the repository's gitignored out/ directory, for example out/commit-message.txt.

Before writing

  1. git status --short and git diff --stat for scope. Read the full diff only for changes you did not make yourself in this session, and file by file when it is large.
  2. One commit does one thing — no cleanup or refactoring mixed into a behavior change. When unsure, split.

Examples

MRI-3589 harden single-flight recursion checks

Track active single-flight computations in coroutine context so recursive
awaits fail fast in both the owning coroutine and child coroutines.

IJ-MR-100
tests cidr: migrate JUnit 5 coverage

Convert remaining JUnit 4 suites under cidr/coverage to JUnit 5.
Parametrized tests now use @MethodSource instead of the Theories runner.

Uncovered case (isolated-commit algorithm, misc triage): 2_Commits.md. Pushing: use the safe-push skill.

Version History

  • 2af32ff Current 2026-09-22 01:02

    更新触发条件至行为变更判断;明确 PowerShell 下避免 BOM 问题;细化 ASD-STE100 英文写作要求及临时文件存储规范。

  • 1f8708d 2026-08-16 15:38

Same Skill Collection

.agents/skills/actions/SKILL.md
.agents/skills/bazel-test-migration/SKILL.md
.agents/skills/code-style/SKILL.md
.agents/skills/compare-python-typecheckers/SKILL.md
.agents/skills/conda-env-tests/SKILL.md
.agents/skills/debugging/SKILL.md
.agents/skills/driver-ui-tests/SKILL.md
.agents/skills/eel/SKILL.md
.agents/skills/extract-module/SKILL.md
.agents/skills/fix-project-leak-from-tc-report/SKILL.md
.agents/skills/icon-resources/SKILL.md
.agents/skills/icons/SKILL.md
.agents/skills/ide-diagnostics-mcp/SKILL.md
.agents/skills/jewel-markdown/SKILL.md
.agents/skills/jewel-pr-preparer/SKILL.md
.agents/skills/jewel-release-helper/SKILL.md
.agents/skills/jna/SKILL.md
.agents/skills/kotlin-ui-dsl/SKILL.md
.agents/skills/kotlin-ui-swing-component-architecture/SKILL.md
.agents/skills/module-dependencies/SKILL.md
.agents/skills/module-set-pluginization/SKILL.md
.agents/skills/notebook-for-experiment/SKILL.md
.agents/skills/platform-coroutines-structured-concurrency/SKILL.md
.agents/skills/plugin-model-analyzer/SKILL.md
.agents/skills/poly-context/SKILL.md
.agents/skills/poly-symbols/SKILL.md
.agents/skills/pseudo-kmp/SKILL.md
.agents/skills/registry/SKILL.md
.agents/skills/remote-dev/SKILL.md
.agents/skills/safe-push/SKILL.md
.agents/skills/ssr/SKILL.md
.agents/skills/symbols-api/SKILL.md
.agents/skills/testing-internals/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/treehouse/SKILL.md
.agents/skills/ui-accessibility/SKILL.md
.agents/skills/writing-tests/SKILL.md
.agents/skills/youtrack-community/SKILL.md
.claude/skills/actions/SKILL.md
.claude/skills/bazel-test-migration/SKILL.md
.claude/skills/code-style/SKILL.md
.claude/skills/commits/SKILL.md
.claude/skills/compare-python-typecheckers/SKILL.md
.claude/skills/conda-env-tests/SKILL.md
.claude/skills/debugging/SKILL.md
.claude/skills/driver-ui-tests/SKILL.md
.claude/skills/eel/SKILL.md
.claude/skills/extract-module/SKILL.md
.claude/skills/fix-project-leak-from-tc-report/SKILL.md

Metadata

Files
0
Version
3f96186
Hash
3cccdf68
Indexed
2026-08-16 15:38

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 00:50
浙ICP备14020137号-1