semantic-git
Skill22 starsChanged 11 months agoMITView on GitHub
Manage Git commits using conventional commit format with atomic staging. Always generate plain git commands before running them and offer to let the user run them manually.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend-engineerSkill
- cli-buildingSkill
- code-reviewSkill
- context-engineeringSkill
- create-agents-mdSkill
- create-skillSkill
- cursor-best-practicesSkill
- debuggingSkill
- frontend-engineerSkill
- media-processingSkill
- psiSkill
- pythonSkill
- software-engineerSkill
- typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 21 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
When in doubt, treat git as if it may be zagi-compatible and avoid using exotic flags.
- Distinctive: line 33
User confirmation: Always confirm with user before committing and before moving to the next commit.
- Distinctive: line 34
Conventional format: Use conventional commit message format (feat, fix, etc.) unless directed otherwise.
- Distinctive: line 35
Concise messages: Keep messages brief and to the point.
- Distinctive: line 36
Command transparency: Always show the exact git commands that will be run (which may be handled by zagi via alias/wrapper), and ask whether …
- Very specific: line 66
Use ! after the type/scope to indicate breaking changes:
- Distinctive: line 72
Use imperative mood: "add feature" not "added feature" or "adds feature"
- Distinctive: line 74
No period at the end
- Distinctive: line 75
Keep under 72 characters when possible
- Distinctive: line 80
When needed, be concise and reference issues, PRs, or documentation
- Very specific: line 81
Use footer for breaking changes: BREAKING CHANGE: <description>
- Very specific: line 86
Use test: for test-only changes.
- Distinctive: line 87
Run CI checks: Verify types, tests, and linting pass before staging.
- Very specific: line 88
Prefer a single CI command if it exists (e.g., pnpm ci, npm run ci, just ci).
- Distinctive: line 89
If no CI command, run checks individually (typecheck, test, lint).
- Distinctive: line 90
If any check fails, stop and report – do not proceed.
- Distinctive: line 103
Always print these commands to the user in order.
- Distinctive: line 105
Ask the user whether they want:
- Distinctive: line 108
Only execute commands after explicit user approval.
- Distinctive: line 110
When executing, run exactly the printed commands.
- Distinctive: line 113
Before staging the next set of changes, confirm with the user that the previous commit is complete and understood.
- Distinctive: line 117
If user requests "continue to X" or "automate until X":
- Distinctive: line 128
Stop and ask user before:
- Distinctive: line 133
When uncertain how to proceed with implementation.
- Distinctive: line 134
When requirements are unclear.
- Very specific: line 135
When a destructive git operation is proposed (reset --hard, checkout ., clean -f, push --force).
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Semantic Git
Manage Git commits using conventional commit format with atomic commits and concise messages.
This skill is zagi-aware and is designed to work well with AI IDEs (Cursor, etc.)
Tooling
- Preferred:
zagi(a better git interface for agents).- Assume zagi is installed if:
gitis aliased to zagi in the shell or- a
zagibinary is available.
- When in doubt, treat
gitas if it may be zagi-compatible and avoid using exotic flags. - Even when zagi is available, generate plain
gitcommands and let anygit→zagiintegration handle them.
- Assume zagi is installed if:
- Fallback: plain
gitwhen zagi is not available.
When to Use
- Committing changes to git
- Staging files for commit
- Creating commit messages
- Managing atomic commits
- Before pushing changes
Core Principles
- Atomic commits: Stage and commit related changes together. Tests go with implementation code.
- User confirmation: Always confirm with user before committing and before moving to the next commit.
- Conventional format: Use conventional commit message format (feat, fix, etc.) unless directed otherwise.
- Concise messages: Keep messages brief and to the point. Omit description unless change is complicated.
- Command transparency: Always show the exact
gitcommands that will be run (which may be handled by zagi via alias/wrapper), and ask whether the user wants:- to run them manually, or
- to have the agent run them.
Commit Message Format
<type>[optional scope]: <subject>
[optional body]
[optional footer(s)]Types
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testsbuild: Changes that affect the build system or external dependenciesci: Changes to CI configuration files and scriptschore: Maintenance tasks (updating build tasks, dependencies, etc.; no production code change)revert: Revert a previous commit
Breaking Changes
Use ! after the type/scope to indicate breaking changes:
feat!: add new APIfix(api)!: change response format
Subject Line
- Use imperative mood: "add feature" not "added feature" or "adds feature"
- First letter lowercase (unless starting with proper noun)
- No period at the end
- Keep under 72 characters when possible
Body and Footer
- Omit body unless change is complicated or requires explanation
- When needed, be concise and reference issues, PRs, or documentation
- Use footer for breaking changes:
BREAKING CHANGE: <description>
Workflow
- Implement atomic change: Code + tests together.
- Use
test:for test-only changes.
- Use
- Run CI checks: Verify types, tests, and linting pass before staging.
- Prefer a single CI command if it exists (e.g.,
pnpm ci,npm run ci,just ci). - If no CI command, run checks individually (typecheck, test, lint).
- If any check fails, stop and report – do not proceed.
- Prefer a single CI command if it exists (e.g.,
- Stage atomic changes: Group related files together (implementation + tests).
- Suggest commit message: Generate a conventional commit message based on changes.
- Generate commands:
Construct explicit shell commands using
git(which may be an alias or wrapper such as zagi), for example:git add path/to/file1 path/to/file2 GIT_AUTHOR_DATE="YYYY-MM-DD HH:MM:SS" \ GIT_COMMITTER_DATE="YYYY-MM-DD HH:MM:SS" \ git commit -m "feat: add feature"- Always print these commands to the user in order.
- Ask for execution preference:
- Ask the user whether they want:
- to copy-paste and run the commands themselves, or
- to have the agent run them.
- Only execute commands after explicit user approval.
- Ask the user whether they want:
- Commit:
- When executing, run exactly the printed commands.
- Respect any user instructions about backdating timestamps or additional flags.
- Next commit:
- Before staging the next set of changes, confirm with the user that the previous commit is complete and understood.
Automation Mode
If user requests "continue to X" or "automate until X":
- Proceed with atomic commits automatically, but still print commands.
- For each commit:
- Show the staging and commit commands.
- Optionally execute them automatically, as per the user’s automation request.
- Resume asking for confirmation when X is reached.
- X can be: specific file, feature completion, test passing, etc.
Stop and Ask Protocols
Stop and ask user before:
- Adding type ignores (
@ts-ignore,# type: ignore, etc.). - Adding suppressions (ESLint disable, pylint disable, etc.).
- Using
anytype or similar type escapes. - When uncertain how to proceed with implementation.
- When requirements are unclear.
- When a destructive git operation is proposed (
reset --hard,checkout .,clean -f,push --force); prefer safer alternatives and explain the risks.
Examples
Simple feature or behaviour change:
feat: add user authenticationFeature with scope:
feat(api): add user endpointBug fix:
fix: resolve memory leak in cacheBreaking change:
feat!: migrate to new API versionTest-only change:
test: improve unit tests for auth serviceRefactor (no behavior change):
refactor: extract validation logic into separate functionComplex change (with body):
feat(api): add pagination support
Implements cursor-based pagination for large datasets.
See docs/api/pagination.md for details.References
For detailed guidance, see:
references/conventional-commits.md– Commit format and examplesreferences/ci-verification.md– CI check patterns and verificationreferences/co-authors.md– Handling Co-Authored-By trailers and zagi co-author stripping
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

