Agent Skills: Git Commit Skill

Stage and commit uncommitted changes with conventional commit messages. Use for committing changes or grouping commits by topic.

UncategorizedID: tyrealq/q-skills/commit

Install this agent skill to your local

pnpm dlx add-skill https://github.com/TyrealQ/q-skills/tree/HEAD/skills/commit

Skill Files

Browse the full folder contents for commit.

Download Skill

Loading file tree…

skills/commit/SKILL.md

Skill Metadata

Name
commit
Description
Stage and commit uncommitted changes with conventional commit messages. Use for committing changes or grouping commits by topic.

Git Commit Skill

Workflow

Step 1: Review changes

Run both commands to get the full picture:

git status --short
git diff --cached --name-status

git status --short shows unstaged modifications and untracked files. git diff --cached catches files that are already staged but not yet committed. Use the union of both outputs.

If both commands return empty, report "nothing to commit" and stop.

Classify each change:

  • M — modified, ?? — untracked, D — deleted, R — renamed, A — staged new file

Step 2: Analyze changes and verify consistency

Classify file paths

| Path pattern | Type | |---|---| | posts/, articles/, content/ | content/writing | | .claude/skills/ | skill config | | src/, *.go, *.py, *.ts, *.R, *.r | code/scripts | | *.md | documentation | | *.json, *.yaml, *.toml, *.csv | config/data |

Cascade check (skip if no scripts or data files changed)

If any modified files are scripts or data files:

  • Identify downstream files: Find all markdown reports, appendices, and documentation that reference outputs or data from the modified files — search for filename references, table headers, variable names, and output patterns
  • Verify consistency: Check that numbers, table data, file paths, and cross-references in downstream files match the current state of the modified scripts and their outputs
  • Fix discrepancies: Update any stale numbers, outdated references, or mismatched data in downstream files. Include these fixes in the commit

CLAUDE.md freshness (always run)

If the working directory has a CLAUDE.md, read it and compare against the current project state — not just the changes being committed, but also decisions made during the session, new or renamed files on disk, and structural changes. Update CLAUDE.md before proceeding if any section reflects outdated state.

Step 3: Decide commit strategy

  • Single topic: one commit for all files
  • Multiple topics: group by directory/topic, one commit per group

Grouping priority:

  1. Content (one commit per article/document unit)
  2. Skills (one commit per skill)
  3. Code changes (group by module)
  4. Config files (group together)

Step 4: Generate commit message

Follow conventional commits format from rules/git-workflow.md:

<type>: <description>

Types: feat, fix, refactor, docs, test, chore, perf, ci

Examples:

  • docs: add exploratory analysis notebook
  • feat: add batch processing to pipeline
  • fix: correct citation formatting in report
  • chore: update project config

Keep descriptions concise (under 70 chars).

Step 5: Stage and commit

git add <file1> <file2> ...
git commit -m "<message>"

Rules:

  • Specify files explicitly — never use git add . or git add -A
  • Exclude temp files (*.bak-*, .DS_Store, node_modules/)

Step 6: Confirm

Run: git log --oneline -3