Agent skill
commit-and-push
Create a well-formatted git commit and push to remote repository
Install this agent skill to your Project
npx add-skill https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/aiwg-utils/skills/commit-and-push
SKILL.md
Commit and Push
You are a Git Version Control Specialist. Create clear, well-structured commits following project conventions.
Task
When invoked with /commit-and-push [commit-message-summary]:
- Review changes using
git statusandgit diff --stat - Stage appropriate files (exclude generated files, secrets)
- Craft commit message following conventions below
- Commit with proper formatting (HEREDOC for multi-line)
- Push to remote repository
Commit Message Format
<type>(<scope>): <subject>
<body>
<footer>
Type (Required)
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Formatting, no code changerefactor: Code change that neither fixes bug nor adds featureperf: Performance improvementtest: Adding or correcting testschore: Build process or auxiliary toolsci: CI/CD configurationbuild: Build system or dependenciesrevert: Reverts a previous commit
Scope (Optional)
Component or area affected. Project-specific scopes for AIWG:
agents,commands,templates,tools,docs,intake,flowscli,config,tests,api,ui
Subject (Required)
- Imperative mood ("add feature" not "added feature")
- Lowercase first letter, no period at end
- Maximum 50 characters
- Be specific and concise
Body (Optional but Recommended for Multi-Area Changes)
- Separate from subject with blank line
- Wrap at 72 characters
- Explain what and why, not how
- Use bullet points for multiple changes
- Reference issues if applicable
Footer (Optional)
- Breaking changes:
BREAKING CHANGE: <description> - Issue references:
Closes #123,Fixes #456,Refs #789
CRITICAL: No AI Attribution
DO NOT include in commit messages:
Generated with Claude Codeor any AI tool nameCo-Authored-By: Claudeor any AI co-author- Any AI tool attribution or signatures
Workflow
Step 1: Review Changes (stat-first approach)
git status
git diff --stat # file-level summary, not full content
git diff --cached --stat # staged changes summary
git log --oneline -5 # recent commit style reference
Only read full diff for specific files when the stat is insufficient to understand the change:
git diff -- <specific-file> # targeted full diff when needed
Rule: For files you already modified in this session, the stat is sufficient. Only read full diffs for unfamiliar files or when the filename alone doesn't clarify the change.
Step 2: Stage Files
Stage specific files by name. Exclude: .env, secrets, dist/, build/, node_modules/, *.log, IDE files.
git add path/to/file1 path/to/file2
If files are unrelated (e.g., bug fix + docs), make separate commits.
Step 3: Commit
Standard:
git commit -m "type(scope): subject"
HEREDOC (for messages with body/footer):
git commit -m "$(cat <<'EOF'
type(scope): subject
Body paragraph explaining the change.
- Bullet point 1
- Bullet point 2
Closes #123
EOF
)"
DO NOT use: --no-verify, --allow-empty-message, --amend (unless explicitly correcting last commit).
Step 4: Push
git push
NEVER force push to shared branches unless explicitly required and safe.
References
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/README.md — aiwg-utils addon overview
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/human-authorization.md — Confirmation before destructive git operations
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/instruction-comprehension.md — Correct interpretation of commit message intent
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for AIWG versioning and release workflow
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
research-document
Generate summaries and literature notes from research papers
research-archive
Package research artifacts for long-term archival
research-cite
Format citations and generate bibliographies
induct-research
Induct research sources into a research repository. Point at an issue, a single file, a directory of papers, or a URI and the skill reads, annotates, and files structured induction tasks — one per source. Similar to address-issues but for research corpora instead of code backlogs.
research-provenance
Query provenance chains and artifact relationships
research-quality
Assess source quality using GRADE methodology
Didn't find tool you were looking for?