skills/moai-foundation-git/SKILL.md
Enterprise GitFlow automation, PR policy enforcement, Git 2.47-2.50 features, trunk-based development, comprehensive branching strategies, commit conventions, GitHub CLI 2.83.0 integration
npx skillsauth add ajbcoding/claude-skill-eval moai-foundation-gitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Field | Value | | ----- | ----- | | Skill Name | moai-foundation-git | | Version | 4.0.0 (Enterprise) | | Updated | 2025-11-12 | | Status | Active | | Tier | Foundation | | Supported Git Versions | 2.47+, 2.48, 2.49, 2.50 (November 2025) | | GitHub CLI | 2.63.0+ (GitHub Copilot Agent support) | | Key Features | GitFlow, Trunk-Based, Hybrid Strategies, Incremental MIDX, Session Persistence |
Comprehensive Git workflow automation and PR policy enforcement for MoAI-ADK workflows, supporting multiple branching strategies, latest Git 2.47-2.50 features, and GitHub CLI automation.
Enterprise v4.0.0 Capabilities:
%(is-base:) atomAutomatic triggers:
Manual reference:
Best for: Team collaboration, code review, quality gates
develop ──┬─→ feature/SPEC-001 → [TDD: RED, GREEN, REFACTOR] → PR → merge → develop
├─→ feature/SPEC-002 → [TDD: RED, GREEN, REFACTOR] → PR → merge → develop
└─→ feature/SPEC-003 → [TDD: RED, GREEN, REFACTOR] → PR → merge → develop
↓
main (release)
Workflow:
# Create feature branch
git checkout develop
git pull origin develop
git checkout -b feature/SPEC-001
# TDD: RED phase
git commit -m "🔴 RED: test_user_authentication_failed_on_invalid_password
# TDD: GREEN phase
git commit -m "🟢 GREEN: implement_user_authentication
# TDD: REFACTOR phase
git commit -m "♻️ REFACTOR: improve_auth_error_handling
# Create PR
gh pr create --draft --base develop --head feature/SPEC-001
# After review and approval
git push origin feature/SPEC-001
gh pr ready
gh pr merge --squash --delete-branch
Advantages:
Disadvantages:
Best for: Solo/trusted developers, rapid prototyping
develop ──→ [TDD: RED, GREEN, REFACTOR] → push → (CI/CD gates) → develop
Workflow:
git checkout develop
git pull origin develop
# TDD: RED phase
git commit -m "🔴 RED: test_database_connection_pool"
# TDD: GREEN phase
git commit -m "🟢 GREEN: implement_database_pool"
# TDD: REFACTOR phase
git commit -m "♻️ REFACTOR: optimize_pool_performance"
git push origin develop
Advantages:
Disadvantages:
Best for: Mixed team (some features need review, others don't)
Behavior: When creating each SPEC with /alfred:1-plan, ask user:
Which git workflow for this SPEC?
Options:
- Feature Branch + PR (team review, quality gates)
- Direct Commit (rapid development, trusted path)
Advantages:
Disadvantages:
What it does: Faster repository updates for monorepos with many packfiles.
# Enable experimental MIDX (Git 2.47+)
git config --global gc.writeMultiPackIndex true
git config --global feature.experimental true
# Result: Faster operations on large repos
# Typical improvement: 20-30% faster pack operations
# Check MIDX status
git verify-pack -v .git/objects/pack/multi-pack-index
Use case: MoAI-ADK monorepo optimization
# Before optimization
$ git gc --aggressive
Counting objects: 250000
Packing objects: 100%
Duration: 45 seconds
# After MIDX optimization
$ git gc --aggressive
Counting objects: 250000
Packing objects: 100%
Duration: 28 seconds (38% faster)
What it does: Identify which branch a commit likely originated from.
# Old way (complex):
git for-each-ref --format='%(refname:short) %(objectname)'
# New way (Git 2.47+):
git for-each-ref --format='%(if)%(is-base:develop)%(then)Based on develop%(else)Not base%(end)'
# Example output:
refs/heads/feature/SPEC-001 Based on develop
refs/heads/feature/SPEC-002 Based on develop
refs/heads/hotfix/urgent-bug Not base
Git backfill - Smart partial clone fetching:
git backfill --lazy
# Fetches only necessary objects for working directory
# Use case: Monorepos with 50K+ files
Git survey - Identify repository data shape issues:
git survey
# Output:
# Monorepo efficiency: 87%
# Largest directories: src/legacy (45MB), docs (12MB)
# Recommendation: Consider sparse checkout for legacy
| Version | Feature | Benefit | |---------|---------|---------| | 2.48 | Experimental backfill | 30% faster on monorepos | | 2.48 | Improved reftable support | Better concurrent access | | 2.49 | Platform compatibility policy | Stable C11 support | | 2.49 | VSCode mergetool integration | Native IDE support | | 2.50 | Enhanced ref verification | Stronger integrity checks |
<emoji> <TYPE>: <description>
<body (optional)>
@<TAG>:<ID>
RED - Failing tests (TDD Red phase)GREEN - Passing implementation (TDD Green phase)REFACTOR - Code improvement (TDD Refactor phase)BUG - Bug fix (outside TDD)FEAT - Feature addition (outside TDD)DOCS - Documentation onlySECURITY - Security fix (critical)🔴 RED: test_user_login_with_invalid_credentials
Test that login fails gracefully with invalid password.
---
🟢 GREEN: implement_user_login_validation
Implement login validation in AuthService.
---
♻️ REFACTOR: improve_auth_error_messages
Improve error messages for failed authentication attempts.
@<DOMAIN>:<IDENTIFIER>:<COMPONENT> (optional)
Examples:
# Feature 1: Copilot Agent Support
gh agent-task create --custom-agent my-agent "Review code for security"
# Feature 2: Enhanced Release Management
gh release create v1.0.0 --notes "Release notes" --draft
# Feature 3: Improved PR Automation
gh pr create --title "Feature" --body "Description" --base develop
# Feature 4: Workflow Improvements (up to 10 nested reusable workflows)
gh workflow run ci.yml --ref develop
# Create draft PR
gh pr create --draft --title "WIP: Feature Name" --base develop
# List open PRs with author
gh pr list --author @me --state open
# Merge PR with squash
gh pr merge 123 --squash --delete-branch
# View PR reviews
gh pr view 123 --json reviews
# Merge multiple related PRs
gh pr merge 123 --squash && gh pr merge 124 --squash
/alfred:1-plan "Feature name"
└─→ Create feature/SPEC-XXX branch
└─→ Ask: Which workflow? (Feature Branch or Direct)
└─→ Create SPEC document
/alfred:2-run SPEC-XXX
├─→ RED phase: Write failing tests
├─→ GREEN phase: Implement code
└─→ REFACTOR phase: Improve code
/alfred:3-sync auto SPEC-XXX
├─→ Run quality gates (coverage ≥85%)
├─→ Create PR (if Feature Branch workflow)
│ └─→ gh pr create --base develop
├─→ Generate documentation
└─→ Merge to develop (if ready)
└─→ gh pr merge --squash --delete-branch
Location: .moai/config/config.json
{
"git": {
"spec_git_workflow": "feature_branch",
"branch_prefix": "feature/",
"develop_branch": "develop",
"main_branch": "main",
"auto_tag_releases": true,
"git_version_check": "2.47.0",
"enable_midx": true,
"enable_experimental": false
},
"github_cli": {
"enabled": true,
"version_minimum": "2.63.0",
"copilot_agent": false
}
}
Valid spec_git_workflow values:
"feature_branch" - Always PR (recommended for teams)"develop_direct" - Always direct commit (fast track)"per_spec" - Ask user for each SPEC (flexible)Enforced before merge:
Repository: moai-adk (250K objects, 45 packfiles)
Before MIDX optimization:
- Pack time: 45s
- Repack time: 38s
- Clone time: 12s
After MIDX (Git 2.47+):
- Pack time: 28s (38% faster)
- Repack time: 22s (42% faster)
- Clone time: 9s (25% faster)
Storage overhead: +2% (acceptable tradeoff)
# Enable MIDX for large repos
git config --global gc.writeMultiPackIndex true
git config --global gc.multiPackIndex true
# Use packfiles with bitmap
git config --global repack.writeBitmaps true
# Enable incremental pack files
git config --global feature.experimental true
✅ DO:
❌ DON'T:
| Issue | Solution |
|-------|----------|
| Merge conflicts | Rebase on develop before merge |
| PR stuck in draft | Use gh pr ready to publish |
| Tests failing in CI | Run tests locally before push |
| Large pack file | Enable MIDX: git config gc.writeMultiPackIndex true |
| Session lost | Check .moai/sessions/ for recovery checkpoints |
| Version | Date | Key Changes | |---------|------|-------------| | 4.0.0 | 2025-11-12 | Git 2.47-2.50 support, MIDX optimization, Hybrid strategies | | 2.1.0 | 2025-11-04 | Three workflows (feature_branch, develop_direct, per_spec) | | 2.0.0 | 2025-10-22 | Major update with latest tools, TRUST 5 integration |
moai-alfred-agent-guide - Workflow orchestrationmoai-foundation-trust - Quality gate enforcementmoai-alfred-session-state - Git session persistencemoai-foundation-tags - TAG managementLearn more in reference.md for detailed Git commands, GitHub CLI automation patterns, and production workflows.
Skill Status: Production Ready | Last Updated: 2025-11-12 | Enterprise v4.0.0
content-media
Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.
development
Transform learning content (like YouTube transcripts, articles, tutorials) into actionable implementation plans using the Ship-Learn-Next framework. Use when user wants to turn advice, lessons, or educational content into concrete action steps, reps, or a learning quest.
tools
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
tools
Replace with description of the skill and when Claude should use it.