AgentSkillsCN

Commit

提交

SKILL.md

/commit — Generate Conventional Commit

Usage

/commit

Description

Stages changes, generates a conventional commit message referencing the PRD item, and commits. Ensures build and tests pass first.

Instructions

  1. Run git status and git diff --staged to understand changes.

  2. If nothing is staged, identify relevant changed files and stage them. Do NOT stage CLAUDE.md or PROMPT.md unless explicitly instructed.

  3. Run the build command. If it fails, stop and report.

  4. Run the test command. If it fails, stop and report.

  5. Generate a conventional commit message:

    code
    type(scope): description
    
    [optional body explaining why]
    
    refs: PRD task description
    

    Types: feat, fix, refactor, test, docs, chore, style

  6. Present the commit message to the user for approval.

  7. After approval, commit.

  8. Remind the user to update PRD.md, AGENTS.md, and PROGRESS.md if not yet done.

Model

haiku