AgentSkillsCN

commit-work

为ECSdb工作生成格式规范的Git提交

SKILL.md
--- frontmatter
name: commit-work
description: Create a properly formatted git commit for ECSdb work
argument-hint: "[type] [ticket-id] [message]"
disable-model-invocation: true
allowed-tools: Bash, Read

Commit Work

Create a properly formatted commit for the ECSdb project.

Arguments

  • $0 = commit type (feat, test, fix, docs, refactor, chore)
  • $1 = ticket ID (e.g., 02-004)
  • $2 = commit message description

Pre-Commit Checklist

Before committing, verify:

bash
# 1. Run tests
cargo test

# 2. Run clippy
cargo clippy

# 3. Check formatting
cargo fmt --check

If ANY of these fail, DO NOT COMMIT. Fix the issues first.

Commit Format

bash
git add -A
git commit -m "$(cat <<'EOF'
$0: $2 [TICKET-$1]

<detailed description if needed>
EOF
)"

Commit Types

TypeWhen to Use
featNew feature implementation
testAdding or updating tests
fixBug fixes
docsDocumentation updates
refactorCode restructuring without behavior change
choreBuild, dependencies, tooling

Examples

Test commit:

bash
/commit-work test 02-004 "add ComponentData serialization tests"

Results in:

code
test: add ComponentData serialization tests [TICKET-02-004]

Feature commit:

bash
/commit-work feat 02-011 "implement fjall StorageEngine adapter"

Results in:

code
feat: implement fjall StorageEngine adapter [TICKET-02-011]

Documentation commit:

bash
/commit-work docs 02-004 "mark ticket complete in sprint README"

Results in:

code
docs: mark ticket complete in sprint README [TICKET-02-004]

Post-Commit

After committing, show the git log:

bash
git log --oneline -3

Remember

  • Small, focused commits
  • One logical change per commit
  • Never commit with failing tests
  • Always include ticket ID for traceability