tylores/dotfiles/git-rules
Claude Code and agent skill by tylores/dotfiles
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Enforces Conventional Commits 1.0.0, linear git history branching, and strict Inside-Out layer isolation.
Install
npx vskill@latest install tylores/dotfiles/git-rulesSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as tylores/dotfiles/git-rules.
Global Git Architecture & Commit Standards
Context
This playbook enforces strict repository hygiene across all local and remote operations. It mandates Conventional Commits and ensures clean, linear branching habits to keep the codebase history deterministic, traceable, and scannable.
Trigger Conditions
Activate this skill automatically whenever a task involves staging files, creating branches, executing git commands, generating commit messages, or writing pre-commit / CI automation hooks.
Core Directives
1. Mandatory Conventional Commits
All proposed commit messages or squash-merge descriptions generated by the agent MUST strictly conform to the Conventional Commits 1.0.0 specification.
- Format:
<type>(<optional-scope>): <description> - Types Allowed:
feat: A new user-facing or architectural feature.fix: A bug or runtime exception fix.docs: Documentation changes only (README, inline comments).style: Changes that do not affect the meaning of the code (white-space, formatting, linting fixes).refactor: A code change that neither fixes a bug nor adds a feature.perf: A code change that improves performance.test: Adding missing tests or correcting existing tests.chore: Updating build tasks, dependencies, package manager configs, or dotfiles.- Grammar Rule: The description must be in lowercase, imperative mood, and short (under 50 characters). Do not end the description with a period.
- Example:
feat(http): implement value federate publication loop
2. Clean Branching & Multi-Tenant Isolation
- No Direct Mutations to Main: The agent is strictly forbidden from committing code directly to protected primary branches (
main,master,dev,release). - Branch Naming Standard: When proposing or creating a new branch, names must use a slash-separated namespace matching the task type:
feature/<short-descriptive-name>bugfix/<short-descriptive-name>chore/<short-descriptive-name>- Linear History Enforcement: Prioritize linear history. When integrating upstream changes, always use rebase methodology (
git pull --rebaseorgit rebase origin/main) instead of generating messy merge commits.
3. Staging and Scope Limitations
- Atomic Commits Only: Keep commits small and focused on a single logical change. Do not bundle a bugfix, a test adjustment, and a formatting cleanup into a single sweeping commit block.
- Verify Untracked Garbage: Ensure swap files (
*.swp), system dotfiles, compiled binaries, or caching nodes (__pycache__/,target/) are never staged or committed.
4. Strict Layer Isolation Check (Commit-Time Only)
The Inside-Out Blueprint is strictly a commit-time standard to organize repository commit history. During active development, you may edit files across all layers together so they compile and can be verified. This layer check only applies when preparing or staging commits:
- Layer 1 (Definition): Purely additive structural scaffolding (e.g., new structs, types, enums, interfaces, database schemas, constants). No business logic loops.
- Layer 2 (Implementation): Business plumbing, data wiring, algorithms, or function logic modifying the active behavior of the app.
- Layer 3 (Verification): Test suites, unit tests, mock frameworks, test data fixtures (
*_test.go,test.rs, etc.).
Layer Verification Protocol (Staging/Commit Phase Only):
- Allow Multi-Layer Workspace Editing: Do not block editing or testing files across layers in the active workspace.
- Detect Overlap in Staged Changes: Before proposing or executing a git commit, evaluate only the staged changes (
git diff --cached). If they span more than ONE layer: - Provide Split Guidance: Prepend a highly visible `[WARNING: LAYER MIXING DETECTED]` header. Do not proceed with committing the mixed changes. Instead, guide the user on how to split the staged changes (using
git add -p,git restore --staged, or specific paths) so that each layer is committed separately.
5. Commit & Branch Integration Protocol (User-Led Flow)
To support the user's preference to manually inspect, copy-paste, and run Git commands, the agent must adhere to the following workflow for all workspace changes:
- Provide Clear, Copy-Pasteable Command Blocks: Instead of executing Git commands autonomously, prioritize generating exact, copy-pasteable shell command blocks.
- Staging & Committing:
``bash git add <files> git commit -m "<type>(<scope>): <description>" ``
- Branch Management:
``bash git checkout -b <branch-name> ``
- Rebasing / Upstream Alignment:
``bash git fetch origin git rebase origin/main ``
- Pushing (Always with Safety):
``bash git push origin <branch-name> --force-with-lease ``
- Explicit Fallback Option: Always include a concise note below the command block stating that the user can copy and run the commands, or ask the agent to execute them (e.g., "You can copy and run these commands, or simply reply with 'Run these' to have me execute them on your behalf").
- Atomic Step Division: Never combine unrelated Git commands (e.g., staging and pushing) into a single line unless they are logically coupled. Present them as separate steps to let the user execute them at their own pace.
Hard Constraints (Banned Actions)
- CRITICAL: Do not use or suggest raw
--forceflags under any circumstances. Always use--force-with-leaseif a remote tracking branch must be overridden. - CRITICAL: Never generate generic, lazy commit messages like "fix bug," "update code," "wip," or "changes."
- CRITICAL: Do not stage modified configuration properties (
*.toml,*.json) alongside code enhancements unless they are explicitly required for the code to compile.
Verification Protocol
- Lint Validation: If the repository utilizes local verification layers (like
husky,commitlint, or pre-commit hooks), run or verify against those hooks before declaring a repository state as clean. - Layer Isolation Check: Always perform the Layer Verification Protocol (Layer 1, 2, 3 overlap detection) before presenting any commit message.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbotfiles/.gemini/antigravity-cli/skills/git-rules/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tylores/dotfiles/git-rules)