Skip to content

swell-agents/coding-skills / skills/committing-changes

committing-changes

Verified

Commit via feature branch + PR + git hooks; never push main, never merge.

FileKindSize
SKILL.mdskill md4.5 KB
reference/commit-md-original.mdmarkdown1.5 KB
reference/git-rule.mdmarkdown670 B
reference/hook-troubleshooting.mdmarkdown2.3 KB
scripts/commit-msgexecutablescript1006 B
scripts/install-hooks.shexecutablescript747 B
scripts/install-pr-size-workflow.shexecutablescript1.4 KB
scripts/pre-commitexecutablescript1.2 KB
scripts/pre-pushexecutablescript504 B
templates/gitattributes.exampleother672 B
templates/pr-size.ymlconfig1.4 KB

scripts/commit-msg

View on GitHub
#!/bin/bash
# Commit-msg hook: Enforce commit message rules

MSG_FILE="$1"
MSG=$(head -1 "$MSG_FILE")

# Skip merge commits
if echo "$MSG" | grep -qE '^Merge '; then
    exit 0
fi

# Rule 1: First line must not be empty
if [[ -z "$MSG" ]]; then
    echo "ERROR: Commit message is empty."
    exit 1
fi

# Rule 2: First line max 72 chars
if [[ ${#MSG} -gt 72 ]]; then
    echo "ERROR: Subject line is ${#MSG} chars (max 72)."
    echo "  -> $MSG"
    exit 1
fi

# Rule 3: Must start with a capital letter (imperative mood)
if ! echo "$MSG" | grep -qE '^[A-Z]'; then
    echo "ERROR: Subject must start with a capital letter (imperative mood)."
    echo "  -> $MSG"
    exit 1
fi

# Rule 4: Must not end with a period
if echo "$MSG" | grep -qE '\.$'; then
    echo "ERROR: Subject must not end with a period."
    echo "  -> $MSG"
    exit 1
fi

# Rule 5: No Co-Authored-By lines
if grep -qiE '^Co-Authored-By:' "$MSG_FILE"; then
    echo "ERROR: Co-Authored-By lines are not allowed."
    exit 1
fi

exit 0
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall