skills/commit/SKILL.md
Git workflow operations with Conventional Commits. Supports subcommands - branch (create feature branch), commit (stage and commit changes), pr (create pull request), merge (merge PR). Automatically available when the current directory is a git repository. Use when user needs git operations during development workflow.
npx skillsauth add sofer/.agents commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Git operations following Conventional Commits and configurable branching strategies.
Invoke with subcommand argument:
commit branch - Create feature branchcommit commit or just commit - Stage and commit changescommit pr - Create pull requestcommit merge - Merge pull requestWhen invoked without subcommand, default to commit behaviour.
Create a feature branch for a story or task.
feature-branch or trunk-basedstory/{id}-{slug})Ensure working directory is clean:
git status --porcelain
If not clean, ask user to stash or commit changes first.
Fetch latest from remote:
git fetch origin
Determine base branch:
main or master (whichever exists)Create and checkout branch:
git checkout -b story/US-001-user-login origin/main
Generate slug from story title:
Examples:
story/US-001-user-registrationstory/US-042-fix-login-timeoutfeature/US-103-dashboard-chartsStage changes and create commit with Conventional Commits format.
Review changes:
git status
git diff
git diff --cached # staged changes
Stage changes (if not already staged):
git add -A if user confirms.sdlc/stories/*/user-test-results.yaml). These are pipeline-internal files and must not be committed. If staged accidentally, unstage them before committing.Determine commit type from changes:
Format commit message:
<type>(<scope>): <description>
feat(auth): add login (US-001)feat(user): add registration endpoint (US-001)
fix(auth): resolve token expiry issue (US-023)
test(user): add unit tests for validation
refactor(api): extract common middleware
docs: update API documentation
chore(deps): upgrade typescript to 5.0
git commit -m "message"Create a pull request for the current branch.
Ensure commits are pushed:
git push -u origin HEAD
Verify no user-test artifacts are committed:
.sdlc/stories/*/user-test-results.yaml or formatted test script files are in the commit historyGather PR context:
Generate PR description:
## Summary
Brief description of what this PR does.
## Story
US-001: User Registration
## Changes
- Added user registration endpoint
- Implemented email validation
- Added unit tests
## Acceptance criteria
- [x] User can register with email and password
- [x] Invalid emails are rejected
- [x] Duplicate emails return appropriate error
## Testing
- Unit tests added and passing
- User testing passed
Do not include manual test scripts, formatted test scenarios, or user-test result details in the PR description. The Testing section should only confirm that tests passed, not reproduce test content.
Create PR:
gh pr create --title "feat(user): add registration (US-001)" --body "..."
Or if gh not available, provide URL:
https://github.com/{owner}/{repo}/compare/{branch}?expand=1
Follow Conventional Commits:
<type>(<scope>): <description> (<story-id>)
Merge an approved pull request.
Check PR status:
gh pr status
gh pr checks
Verify approval:
Merge with appropriate strategy:
# Squash merge (default for feature branches)
gh pr merge --squash --delete-branch
# Merge commit (preserves history)
gh pr merge --merge --delete-branch
# Rebase (linear history)
gh pr merge --rebase --delete-branch
Update local:
git checkout main
git pull origin main
Ask user or check project config for preference.
When used with orchestrator, read from manifest:
project:
git:
strategy: "feature-branch"
pattern: "story/{id}-{slug}"
auto_pr: true
merge_strategy: "squash"
gh CLI when available for GitHub operationstools
Check whether Claude and Codex have equivalent access to shared agent resources, skills, hooks, plugins, MCP servers, permissions, startup behaviour, and provider-specific adapter config. Use when comparing agent environments, debugging missing capabilities after restart, or deciding whether to symlink a resource or configure a runtime.
testing
Record substantive skill use in an append-only local log. Use after choosing or invoking a non-system skill for real work, when a skill is inspected but not used, or when a skill fails to apply. Do not use for routine system skills or incidental file reads.
testing
Turn a vague or underspecified request into a self-contained problem statement. Use when the user has a rough idea, when a request would fail if handed directly to an agent, or before non-trivial work that needs shared understanding.
data-ai
Append a one-line learning to ~/.agents/learning-log.md. Use when the user types /learning, or when something genuinely worth remembering surfaced during work and the user confirms it should be captured.