ablevarghese/ios-claude-toolkit/heimdall-git

Claude Code and agent skill by ablevarghese/ios-claude-toolkit

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Done for now, wrap up, end of session, save progress, save my work, upload, publish, commit, push, sync. Git operations with conventional commits, safe push, and branch management. Trigger on: committing, pushing, branching, merge conflicts, tagging releases, 'upload changes', 'ship it', 'let me save this', or any signal the user is finished working and wants to preserve their changes. Also handles branch creation, conflict resolution, and trunk-based workflow. Enforces branch verification before every operation.

Install

npx vskill@latest install ablevarghese/ios-claude-toolkit/heimdall-git

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ablevarghese/ios-claude-toolkit/heimdall-git.

HEIMDALL — Git Operations & Version Control

Git workflow skill covering conventional commits, safe push, branch management, conflict resolution, and release tagging. Every git operation begins with branch verification.

Iron Law: "Verify branch before EVERY git operation. No exception."

Phase Gate: PRE-OPERATION (Before EVERY Git Command)

Cannot execute ANY git command until:

  • [ ] git branch --show-current — verified you're on the correct branch
  • [ ] git status — reviewed for unexpected changes

This gate applies to EVERY git operation, EVERY time. Not just the first one. Branch switches happen silently (stash pop, rebase, checkout). Always verify.

If on wrong branch: git checkout <correct-branch> FIRST. Never rename branches as a workaround.


Pre-Operation Safety Protocol

Every git operation — commit, push, merge, rebase, cherry-pick, tag — must start with this protocol. No shortcuts.

bash
# Step 1: Verify branch
CURRENT_BRANCH=$(git branch --show-current)
echo "Current branch: $CURRENT_BRANCH"
# Step 2: Check for stashed changes that might be forgotten
STASH_COUNT=$(git stash list | wc -l)
if [ "$STASH_COUNT" -gt 0 ]; then
echo "WARNING: $STASH_COUNT stashed changes exist"
git stash list
fi
# Step 3: Check for uncommitted changes
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "Uncommitted changes detected:"
git status --short
fi
# Step 4: Verify you're not on a detached HEAD
if [ -z "$CURRENT_BRANCH" ]; then
echo "ERROR: Detached HEAD state. Checkout a branch before proceeding."
exit 1
fi

Why this protocol: Agents, parallel sessions, stash operations, and cherry-picks can silently change the current branch. Committing to the wrong branch causes hours of cleanup. This 4-step check takes 2 seconds and prevents those hours.


SOP-1: Smart Commit

Full Commit Workflow
bash
# 1. VERIFY BRANCH (mandatory first step)
git branch --show-current
# 2. Review what changed
git status
git diff --stat
# 3. Stage specific files (NEVER use git add -A blindly)
# Review each file before staging
git add Sources/Services/TransferService.swift
git add Tests/TransferServiceTests.swift
# 4. Verify staged changes are correct
git diff --cached --stat
git diff --cached # Read the actual diff
# 5. Generate conventional commit message
# Analyze the diff to determine type and scope
git commit -m "feat(transfers): implement recipient validation with balance check"
Commit Message Generation Algorithm
1. Analyze changed files:
- What directories/modules were touched? → This is the SCOPE
- What's the nature of the change? → This determines the TYPE
2. Determine TYPE from the diff:
- New functionality added? → feat
- Bug fixed? → fix
- Code restructured without behavior change? → refactor
- Tests added/changed? → test
- Documentation updated? → docs
- Performance improved? → perf
- Dependencies/tooling changed? → chore
- CI/CD changed? → ci
- Build system changed? → build
- Code style/formatting? → style
- Security fix? → security
3. Determine SCOPE from changed file paths:
- Sources/Services/Transfer* → transfers
- Sources/ViewModels/Auth* → auth
- Sources/Infrastructure/Supabase* → db
- Tests/* → (use the module being tested)
4. Write description:
- Lowercase
- Imperative mood ("add", not "adds" or "added")
- Under 50 characters
- Describes WHAT was done, not HOW
5. Format: type(scope): description
Commit Message Examples
Diff ShowsCommit Message
New async method in TransferService + testsfeat(transfers): add recipient validation
Fixed nil crash in UserViewModelfix(profile): handle missing user gracefully
Moved validation from VM to Servicerefactor(auth): extract validation to service layer
Added test for edge casetest(payments): cover zero-amount transfer rejection
Updated dependency versionschore(deps): update Supabase SDK to 2.5.0
Improved query performanceperf(transfers): batch recipient lookups
Fixed token refresh race conditionsecurity(auth): serialize token refresh requests
Phase Gate: PRE-COMMIT

Cannot `git commit` until:

  • [ ] git diff --cached --stat reviewed — you know what you're committing
  • [ ] No .env, credential, or secret files staged
  • [ ] Commit message follows conventional format: type(scope): description
  • [ ] Staged files are specific (not git add -A or git add .)

Proof: List the files being committed and the commit message before executing.

Multi-Line Commit Messages (When Needed)

Use HEREDOC syntax for commits that need a body:

bash
git commit -m "$(cat <<'EOF'
feat(transfers): implement scheduled transfer support
- Add ScheduledTransfer entity with recurrence rules
- Create ScheduledTransferService with CRON-based scheduling
- Add database migration for scheduled_transfers table
- Wire up DI container registration
Closes #142
EOF
)"

SOP-2: Safe Push

bash
# 1. VERIFY BRANCH
CURRENT_BRANCH=$(git branch --show-current)
echo "Pushing from: $CURRENT_BRANCH"
# 2. Check what will be pushed
git log origin/$CURRENT_BRANCH..HEAD --oneline
# If this shows nothing, there's nothing to push
# 3. Verify no secrets in staged commits
git log origin/$CURRENT_BRANCH..HEAD -p | grep -iE "(api_key|secret|password|token|sk_live|sk_test)" && echo "WARNING: Possible secret detected!" || echo "No secrets detected"
# 4. Push
git push origin $CURRENT_BRANCH
Never Force Push to Protected Branches
PROTECTED BRANCHES: main, master, develop, release/*
Force push to these branches:
- Destroys other developers' work
- Breaks CI/CD pipelines
- Corrupts shared history
- Is NEVER justified
If you think you need to force push to main:
1. Stop
2. Explain the situation to the owner
3. Use a different strategy (revert commit, fixup commit)

SOP-3: Branch Management

Creating Feature Branches
bash
# 1. Start from up-to-date main
git checkout main
git pull origin main
# 2. Create feature branch with descriptive name
git checkout -b feature/scheduled-transfers
# 3. Push branch to remote to establish tracking
git push -u origin feature/scheduled-transfers
Branch Naming Convention
PrefixPurposeExample
feature/New featurefeature/scheduled-transfers
fix/Bug fixfix/transfer-amount-rounding
refactor/Code restructurerefactor/di-container-simplification
chore/Maintenance taskchore/update-dependencies
release/Release preparationrelease/1.2.0
hotfix/Emergency production fixhotfix/auth-token-refresh
Merging Feature Branches
bash
# 1. Update main
git checkout main
git pull origin main
# 2. Merge with merge commit (preserves branch history)
git merge --no-ff feature/scheduled-transfers
# 3. Push
git push origin main
# 4. Delete merged branch
git branch -d feature/scheduled-transfers
git push origin --delete feature/scheduled-transfers

SOP-4: Conflict Resolution

Conflict Resolution Decision Tree
START: You have a merge conflict.
Q1: What type of conflict is it?
├── CONTENT conflict (same lines changed by both sides)
│ Q2: Do both changes need to be kept?
│ ├── YES → Manually combine both changes. Test the result.
│ └── NO → Keep the correct version. Verify with tests.
│
├── RENAME conflict (file moved/renamed on one side, edited on other)
│ → Accept the rename. Apply the edits to the new location.
│
├── DELETE conflict (file deleted on one side, edited on other)
│ Q3: Should the file exist?
│ ├── YES → Keep the file with edits.
│ └── NO → Accept the deletion. Verify no broken references.
│
└── BINARY conflict (non-mergeable files like images, assets)
→ Choose one version. Cannot merge binary files.
Conflict Resolution Workflow
bash
# 1. Identify conflicting files
git status # Shows files with "both modified"
# 2. For each conflicting file:
# a. Open the file
# b. Find conflict markers: <<<<<<<, =======, >>>>>>>
# c. Understand BOTH sides of the conflict
# d. Choose the correct resolution (may combine both)
# e. Remove ALL conflict markers
# f. Test the resolved code
# 3. Stage resolved files
git add path/to/resolved/file.swift
# 4. Complete the merge
git commit -m "merge: resolve conflicts from feature/scheduled-transfers"
# 5. Verify
git log --oneline -5 # Confirm merge commit exists
Post-Resolution Verification

After resolving conflicts:

  1. Build the project — it must compile
  2. Run tests — all must pass
  3. Review the resolution diff — ensure no accidental deletions
  4. Check for leftover conflict markers: grep -r "<<<<<<" Sources/

SOP-5: Bulk Commit (20+ Changed Files)

When staging 20+ files, the standard "stage specific files" approach needs structure:

Step 1: Categorize changes

bash
# Group by change type
git diff --name-only --diff-filter=A # New files
git diff --name-only --diff-filter=M # Modified files
git diff --name-only --diff-filter=D # Deleted files

Step 2: Consider splitting into logical commits If changes span multiple concerns, split into separate commits:

bash
# Commit 1: Database changes
git add Backend/supabase/migrations/*.sql
git commit -m "feat(database): add recurring_transfers table with RLS"
# Commit 2: Domain layer
git add Sources/Domain/Models/*.swift Sources/Domain/Ports/*.swift
git commit -m "feat(domain): add RecurringTransfer model and port"
# Commit 3: Implementation
git add Sources/Infrastructure/*.swift Sources/Presentation/*.swift
git commit -m "feat(transfers): implement recurring transfer service and UI"
# Commit 4: Tests
git add Tests/**/*.swift
git commit -m "test(transfers): add recurring transfer test coverage"

Step 3: If single commit is appropriate For bulk changes that are genuinely one concern (e.g., rename, formatting):

bash
# Review ALL changes first
git diff --stat
# Stage by directory (more controlled than git add -A)
git add Sources/
git add Tests/
git diff --cached --stat # Verify what's staged

Decision tree: Split or single?

  • Different concerns (feature + tests + migration)? → Split into logical commits
  • Same concern (bulk rename, formatting, dependency update)? → Single commit is fine
  • Unsure? → Split. Atomic commits are easier to revert, bisect, and review.

Conventional Commit Types

TypeWhen to UseExample
featNew feature or capabilityfeat(auth): add biometric login
fixBug fixfix(transfer): correct amount rounding
docsDocumentation onlydocs(readme): update setup instructions
testTest additions or fixestest(payment): add edge case coverage
refactorCode restructure, no behavior changerefactor(di): simplify container registration
perfPerformance improvementperf(list): implement lazy loading
choreMaintenance, dependency updateschore(deps): update Stripe SDK to 3.0
ciCI/CD configurationci(fastlane): add test lane
buildBuild system changesbuild(spm): add new package dependency
styleCode style/formatting onlystyle: apply swiftformat rules
securitySecurity fix or improvementsecurity(auth): patch token refresh vulnerability

Branch Strategy (Trunk-Based Development)

main (protected, always deployable)
│
├── Direct commits for small changes (<1 hour of work)
│
├── feature/* branches for larger work (>1 hour)
│ └── Merge via PR with squash or merge commit
│
├── hotfix/* branches for emergency fixes
│ └── Merge directly to main, then backport if needed
│
└── release/* branches for release preparation
└── Tag with version, merge back to main

This is the start of the file. Read the full SKILL.md on GitHub.

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ablevarghese/ios-claude-toolkit/heimdall-git/badge)](https://verified-skill.com/skills/ablevarghese/ios-claude-toolkit/heimdall-git)

Something wrong with this skill or its page? Tell us.