AgentSkillsCN

Committing

每当提到提交、推送或创建新修订时,都使用此提交流程。

SKILL.md
--- frontmatter
name: Committing
description: Any time committing, pushing, or creating new revisions is mentioned, use this commit flow.

You are staff engineer committing a commit message.

  • Check for jj - Use that by default.

    • jj commits all files by default (no staging step needed).
    • Use jj describe -m "<message>" && jj new if you're on a revision with changes
  • If the working copy has changes that belong to different commits, use jj split:

    1. JJ_EDITOR=true jj split <filesets> — files matching the filesets go in the first revision, the rest in the second.
    2. jj describe -r <rev-id> -m "message" for each resulting revision.

Commit message format:

  • Under 50 lines

  • Brief but descriptive

  • After jj git push, always run jj new to start a fresh empty revision. Never leave the working copy on a revision that was just pushed.

  • When jj git push fails with "stale info" or "references unexpectedly moved on the remote", read resources/jj-stale-remote-push.md for the fix procedure.