Agent skill
writing-git-commits
Write clean, atomic conventional commits from staged or uncommitted changes. Use when asked to commit, generate commit messages, or clean up git history.
Install this agent skill to your Project
npx add-skill https://github.com/edmundmiller/dotfiles/tree/main/config/agents/skills/writing-git-commits
SKILL.md
Writing Git Commits
Workflow
- Inspect —
diffs --staged(staged) anddiffs(unstaged); fallback togit diff --statwhen raw line stats required2. Group — cluster related changes into atomic commits (one logical change per commit) - Order — commit foundational changes first (deps, config, types), then features, then tests
- Write — craft each message per the format below
- Stage & commit —
git add -porgit add <paths>thengit commit -m "..."
Message Format
<type>(<scope>): <subject>
[optional body]
[optional footer]
Types
| Type | When |
|---|---|
feat |
New feature or capability |
fix |
Bug fix |
refactor |
Code change that neither fixes nor adds |
docs |
Documentation only |
test |
Adding or updating tests |
chore |
Build, CI, deps, tooling |
style |
Formatting, whitespace, semicolons |
perf |
Performance improvement |
Rules
- Subject: imperative mood, lowercase, no period, ≤72 chars
- Scope: optional, the module/area affected (e.g.,
auth,pi,nix) - Body: wrap at 72 chars, explain what and why (not how)
- Footer:
Closes #123,BREAKING CHANGE: ... - Atomic: each commit compiles/passes independently
- No mixed concerns: don't combine a bugfix with a refactor
Examples
feat(pi): add diff-renderer extension
chore: update flake inputs
fix(auth): prevent token refresh race condition
Tokens were being refreshed concurrently, causing 401s for
in-flight requests. Added a mutex around the refresh call.
Closes #42
refactor(shell): extract zsh plugin config to module
Grouping Heuristics
- Same file touched for different reasons → separate commits
- Multiple files for one feature → single commit
- Formatting/whitespace mixed with logic → split them
- Dependency updates → own commit (
chore(deps): ...) - Generated files (lockfiles, schemas) → commit with the change that caused them
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
zbench
Benchmark interactive zsh performance with zsh-bench and track regressions. Use when benchmarking shell startup, comparing zsh latency after config changes, investigating slow shell, or running git bisect on performance. Trigger phrases: "benchmark zsh", "shell is slow", "zbench", "zsh-bench", "shell startup time", "profile zsh", "zsh performance".
nix-rebuild
Rebuild nix-darwin/NixOS system after dotfiles changes. Use when config files managed by Nix (lazygit, ghostty, etc.) need to be regenerated, or after editing any .nix file in the dotfiles repo.
hass-config-flow
Interact with Home Assistant via the REST API on a NixOS host. Use when adding integrations, querying entities, managing config flows, creating API tokens, or automating HA setup programmatically. Also covers identifying device protocols (Matter, Zigbee, Thread, HomeKit) from the device registry. Trigger phrases: "add HA integration", "configure home assistant", "query HA entities", "create HA token", "HA REST API", "pair homekit", "set up matter in HA", "add spotify to HA", "is this device zigbee or thread", "what protocol is this device", "move devices to ZHA", "identify matter devices".
hass-declarative
Manage Home Assistant automations, scenes, and scripts declaratively via NixOS modules. Covers adding/editing/removing entities in the domain-based Nix structure, the ensureEnabled wrapper (initial_state enforcement), the sweep service that cleans orphaned entities, entity identity (IDs, slugs, unique_ids), the eval test assertions, and the build-time manifest. Trigger phrases: "add HA automation", "new scene", "new script", "remove automation", "declarative HA", "sweep unmanaged", "entity drift", "ghost entity", "orphaned automation", "HA domain file", "eval-automations test", "hass assertion", "ensureEnabled", "initial_state".
agenix-secrets
Create, edit, and wire up agenix-encrypted secrets in this dotfiles repo. Use when adding API keys, tokens, credentials, passwords, or any sensitive values to NixOS host configs. Trigger phrases: "add a secret", "encrypt with agenix", "new age secret", "hide this value", "agenix secret".
linear
Read-only Linear issue access via the Linear GraphQL API.
Didn't find tool you were looking for?