Skip to main content

commit

Create git commits for dotfiles changes, grouping by component with conventional prefix style

Informations de source

Dépôt
meain/dotfiles
Dernière activité de la source
16 juin 2026 à 04:12
Langue détectée de SKILL.md
anglais
Étoiles
285
Forks
10

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
commit
description
Create git commits for dotfiles changes, grouping by component with conventional prefix style
When the user asks you to commit changes in this dotfiles repo, follow these steps: ## Important Context - This is a **stow-based dotfiles** repo using **git** (not jj) - Changes are organized by component directories: `emacs/`, `zsh/`, `home-manager/`, `scripts/`, etc. - Commits follow the format: `[component] brief description` - Each component's changes should be a **separate commit** - Do NOT add `Co-Authored-By` lines unless the user asks for it ## Steps ### 1. Understand Current State Run these in parallel: ```bash git status git diff --staged git diff git log --oneline -10 ``` ### 2. Group Changes by Component - Look at modified file paths and group them by their top-level directory (e.g. `emacs/`, `zsh/`, `home-manager/`) - Files in the same component that are part of the same logical change go in one commit - If a component has unrelated changes, split into separate commits ### 3. Draft Commit Messages For each group, draft a message following the existing style: - Format: `[component] brief-area: what changed` - Examples from this repo: - `[emacs] fix dired block brackets` - `[zsh] tweak how reporoot and gitroot is set` - `[scripts] ,markdown-to-pdf: use gfm input format and fix parameter handling` - `[home-manager] add emacs-lsp-booster package` - Use a sub-area (e.g. `utils:`, `web:`) when it clarifies which part of the component changed - Keep the first line short and lowercase - Add a detailed body (separated by blank line) when the reasoning behind the change is not obvious from the diff ### 4. Create Commits For each group, stage the relevant files and commit: ```bash git add <specific-files> && git commit -m "$(cat <<'EOF' [component] brief description Optional detailed explanation of why this change was made, if not obvious from the diff itself. EOF )" ``` - **Stage specific files** — never use `git add -A` or `git add .` - Issue all `git add && git commit` calls as **parallel tool calls in a single response** so the user can approve them all at once ### 5. Verify and Report Run `git log --oneline -5` to confirm all commits were created, then show the output to the user. ## Guidelines - Do NOT push unless explicitly requested - Do NOT commit files containing secrets - If the user has both staged and unstaged changes, ask which to include - Prefer fewer commits when changes are closely related within a component - **Skip `claude/.claude/settings.json` model changes** — the `"model"` field changes frequently and is not worth tracking; omit it from commits unless other meaningful settings changed alongside it - **Scope commits to what the user named** — if the user says "commit the gptel changes", stage and commit only that file; don't expand to other changed files unless asked
Voir sur GitHub